summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2013-01-07 17:56:58 -0500
committerPaul Moore <pmoore@redhat.com>2013-01-15 16:50:34 -0500
commitc190887dd7f8863729faea78eef1ad9df20ad773 (patch)
treed9d72eb40edc3ca19c627353b6227ad73ca06d42
parent6220c8c0fc479d97b6d3e3166a4e46fbfe25a3c0 (diff)
downloadlibseccomp-c190887dd7f8863729faea78eef1ad9df20ad773.tar.gz
doc: add the manpages for the new syscall resolving APIs
Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r--doc/Makefile2
-rw-r--r--doc/man/man3/seccomp_syscall_resolve_name.335
-rw-r--r--doc/man/man3/seccomp_syscall_resolve_name_arch.31
-rw-r--r--doc/man/man3/seccomp_syscall_resolve_num_arch.31
4 files changed, 31 insertions, 8 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 2c77ec9..66810bf 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -42,6 +42,8 @@ MAN3 = \
man/man3/seccomp_rule_add_exact.3 \
man/man3/seccomp_syscall_priority.3 \
man/man3/seccomp_syscall_resolve_name.3 \
+ man/man3/seccomp_syscall_resolve_name_arch.3 \
+ man/man3/seccomp_syscall_resolve_num_arch.3 \
man/man3/seccomp_export_bpf.3 \
man/man3/seccomp_export_pfc.3 \
man/man3/seccomp_attr_set.3 \
diff --git a/doc/man/man3/seccomp_syscall_resolve_name.3 b/doc/man/man3/seccomp_syscall_resolve_name.3
index 227deb5..e0282bb 100644
--- a/doc/man/man3/seccomp_syscall_resolve_name.3
+++ b/doc/man/man3/seccomp_syscall_resolve_name.3
@@ -1,4 +1,4 @@
-.TH "seccomp_syscall_resolve_name" 3 "16 August 2012" "paul@paul-moore.com" "libseccomp Documentation"
+.TH "seccomp_syscall_resolve_name" 3 "7 January 2013" "paul@paul-moore.com" "libseccomp Documentation"
.\" //////////////////////////////////////////////////////////////////////////
.SH NAME
.\" //////////////////////////////////////////////////////////////////////////
@@ -10,6 +10,9 @@ seccomp_syscall_resolve_name \- Resolve a syscall name
.B #include <seccomp.h>
.sp
.BI "int seccomp_syscall_resolve_name(const char *" name ");"
+.BI "int seccomp_syscall_resolve_name_arch(uint32_t " arch_token ","
+.BI " const char *" name ");"
+.BI "char *seccomp_syscall_resolve_num_arch(uint32_t " arch_token ", int " num ");"
.sp
Link with \fI\-lseccomp\fP.
.fi
@@ -19,23 +22,39 @@ Link with \fI\-lseccomp\fP.
.P
The
.BR seccomp_syscall_resolve_name ()
-function resolves the commonly used syscall name to the syscall number used by
-the kernel and the rest of the libseccomp API.
+and
+.BR seccomp_syscall_resolve_name_arch()
+functions resolve the commonly used syscall name to the syscall number used by
+the kernel and the rest of the libseccomp API. The
+.BR seccomp_syscall_resolve_num_arch()
+function resolves the syscall number used by the kernel to the commonly used
+syscall name.
+.P
+The caller is responsible for freeing the returned string from
+.BR seccomp_syscall_resolve_num_arch() .
.\" //////////////////////////////////////////////////////////////////////////
.SH RETURN VALUE
.\" //////////////////////////////////////////////////////////////////////////
.P
-The associated syscall number is returned, with the negative pseudo syscall
+In the case of
+.BR seccomp_syscall_resolve_name ()
+and
+.BR seccomp_syscall_resolve_name_arch()
+the associated syscall number is returned, with the negative pseudo syscall
number being returned in cases where the given syscall does not exist for the
architeture. The value
.BR __NR_SCMP_ERROR
-is returned in case of error.
-.P
-In all cases, the return value is suitable for use in any libseccomp API
-function which requires the syscall number, examples include
+is returned in case of error. In all cases, the return value is suitable for
+use in any libseccomp API function which requires the syscall number, examples include
.BR seccomp_rule_add ()
and
.BR seccomp_rule_add_exact ().
+.P
+In the case of
+.BR seccomp_syscall_resolve_num_arch()
+the associated syscall name is returned and it remains the callers
+responsibility to free the returned string via
+.BR free (3).
.\" //////////////////////////////////////////////////////////////////////////
.SH EXAMPLES
.\" //////////////////////////////////////////////////////////////////////////
diff --git a/doc/man/man3/seccomp_syscall_resolve_name_arch.3 b/doc/man/man3/seccomp_syscall_resolve_name_arch.3
new file mode 100644
index 0000000..f6d4472
--- /dev/null
+++ b/doc/man/man3/seccomp_syscall_resolve_name_arch.3
@@ -0,0 +1 @@
+.so man3/seccomp_syscall_resolve_name.3
diff --git a/doc/man/man3/seccomp_syscall_resolve_num_arch.3 b/doc/man/man3/seccomp_syscall_resolve_num_arch.3
new file mode 100644
index 0000000..f6d4472
--- /dev/null
+++ b/doc/man/man3/seccomp_syscall_resolve_num_arch.3
@@ -0,0 +1 @@
+.so man3/seccomp_syscall_resolve_name.3