mirror of
https://github.com/netbirdio/netbird.git
synced 2025-07-19 23:48:30 +02:00
28 lines
703 B
Go
28 lines
703 B
Go
//go:build ios
|
|
// +build ios
|
|
|
|
package system
|
|
|
|
import (
|
|
"context"
|
|
"runtime"
|
|
|
|
"github.com/netbirdio/netbird/version"
|
|
)
|
|
|
|
// GetInfo retrieves and parses the system information
|
|
func GetInfo(ctx context.Context) *Info {
|
|
|
|
// Convert fixed-size byte arrays to Go strings
|
|
sysName := extractOsName(ctx, "sysName")
|
|
swVersion := extractOsVersion(ctx, "swVersion")
|
|
|
|
gio := &Info{Kernel: sysName, OSVersion: swVersion, Core: swVersion, Platform: "unknown", OS: sysName, GoOS: runtime.GOOS, CPUs: runtime.NumCPU()}
|
|
// systemHostname, _ := os.Hostname()
|
|
gio.Hostname = extractDeviceName(ctx, "hostname")
|
|
gio.WiretrusteeVersion = version.NetbirdVersion()
|
|
gio.UIVersion = extractUserAgent(ctx)
|
|
|
|
return gio
|
|
}
|