AUDIT\_NAME\_TO\_SYSCALL(3) Linux Audit API AUDIT\_NAME\_TO\_SYSCALL(3)

# [NAME](#NAME)

audit\_name\_to\_syscall - Convert the syscall name to the numeric syscall value

# [SYNOPSIS](#SYNOPSIS)

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

```
int audit_name_to_syscall(const char *sc, int machine);
```

# [DESCRIPTION](#DESCRIPTION)

**audit\_name\_to\_syscall**() converts the syscall name to the numeric syscall value. *sc* is the syscall name. *machine* is the enum value of the machine type defined in machine\_t. *machine* can be obtained by calling [**audit\_detect\_machine**(3)](/man/os/audit/audit_detect_machine.3).

# [RETURN VALUE](#RETURN_VALUE)

Returns -1 if an error occurs; otherwise, the return value is the numeric syscall value.

# [SEE ALSO](#SEE_ALSO)

[**audit\_syscall\_to\_name**(3)](/man/os/audit/audit_syscall_to_name.3), [**audit\_detect\_machine**(3)](/man/os/audit/audit_detect_machine.3).

# [AUTHOR](#AUTHOR)

Steve Grubb

Nov 2021 Red Hat

---

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