summaryrefslogtreecommitdiffstats
path: root/src/detection/host/host_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/detection/host/host_bsd.c')
-rw-r--r--src/detection/host/host_bsd.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/detection/host/host_bsd.c b/src/detection/host/host_bsd.c
new file mode 100644
index 0000000..3eb547d
--- /dev/null
+++ b/src/detection/host/host_bsd.c
@@ -0,0 +1,26 @@
+#include "host.h"
+#include "common/settings.h"
+#include "common/smbios.h"
+
+const char* ffDetectHost(FFHostResult* host) {
+ ffSettingsGetFreeBSDKenv("smbios.system.product", &host->name);
+ ffCleanUpSmbiosValue(&host->name);
+ ffSettingsGetFreeBSDKenv("smbios.system.family", &host->family);
+ ffCleanUpSmbiosValue(&host->family);
+ ffSettingsGetFreeBSDKenv("smbios.system.version", &host->version);
+ ffCleanUpSmbiosValue(&host->version);
+ ffSettingsGetFreeBSDKenv("smbios.system.sku", &host->sku);
+ ffCleanUpSmbiosValue(&host->sku);
+ ffSettingsGetFreeBSDKenv("smbios.system.serial", &host->serial);
+ ffCleanUpSmbiosValue(&host->serial);
+ ffSettingsGetFreeBSDKenv("smbios.system.uuid", &host->uuid);
+ ffCleanUpSmbiosValue(&host->uuid);
+ ffSettingsGetFreeBSDKenv("smbios.system.maker", &host->vendor);
+ ffCleanUpSmbiosValue(&host->vendor);
+
+#ifdef __x86_64__
+ ffHostDetectMac(host);
+#endif
+
+ return NULL;
+}