AUDIT\_DETECT\_MACHINE(3) Linux Audit API AUDIT\_DETECT\_MACHINE(3)

# [NAME](#NAME)

audit\_detect\_machine - Detects the current machine type

# [SYNOPSIS](#SYNOPSIS)

```
#include <libaudit.h>
```

```
int audit_detect_machine(void);
```

# [DESCRIPTION](#DESCRIPTION)

audit\_detect\_machine queries uname and converts the kernel machine string to an enum value defined in machine\_t. The machine type is needed for any use of the audit\_name\_to\_syscall function.

# [RETURN VALUE](#RETURN_VALUE)

Returns -1 if an error occurs; otherwise, the return value is the machine's type.

# [SEE ALSO](#SEE_ALSO)

[**uname**(3)](/man/os/audit/uname.3), [**audit\_name\_to\_syscall**(3)](/man/os/audit/audit_name_to_syscall.3).

# [AUTHOR](#AUTHOR)

Steve Grubb

Oct 2006 Red Hat

---

Document: audit_detect_machine(3) from audit 4.2.1-r1 (Chainguard OS)
Source: https://github.com/linux-audit/audit-userspace
