summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2012-11-26 11:20:55 -0500
committerPaul Moore <pmoore@redhat.com>2012-11-26 11:20:55 -0500
commit27f5c8598d3415faf901a8a9e714ee0ef0ca3875 (patch)
tree825d3124261f5bfe85c38ac03ae4c7f715a58519 /doc
parent300d5f23017233945a741c85038649466e30ee9c (diff)
downloadlibseccomp-27f5c8598d3415faf901a8a9e714ee0ef0ca3875.tar.gz
api: add an API to query the system's architecture
In C we add seccomp_arch_native(void), in Python we add Arch.system(). Both functions return an architecture token value. Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile2
-rw-r--r--doc/man/man3/seccomp_arch_add.311
-rw-r--r--doc/man/man3/seccomp_arch_native.31
3 files changed, 11 insertions, 3 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 348a04b..2c77ec9 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -47,6 +47,8 @@ MAN3 = \
man/man3/seccomp_attr_set.3 \
man/man3/seccomp_attr_get.3 \
man/man3/seccomp_arch_add.3 \
+ man/man3/seccomp_arch_exist.3 \
+ man/man3/seccomp_arch_native.3 \
man/man3/seccomp_arch_remove.3 \
man/man3/seccomp_merge.3
diff --git a/doc/man/man3/seccomp_arch_add.3 b/doc/man/man3/seccomp_arch_add.3
index 7315e9c..99d9cc7 100644
--- a/doc/man/man3/seccomp_arch_add.3
+++ b/doc/man/man3/seccomp_arch_add.3
@@ -1,8 +1,8 @@
-.TH "seccomp_arch_add" 3 "28 September 2012" "paul@paul-moore.com" "libseccomp Documentation"
+.TH "seccomp_arch_add" 3 "26 November 2012" "paul@paul-moore.com" "libseccomp Documentation"
.\" //////////////////////////////////////////////////////////////////////////
.SH NAME
.\" //////////////////////////////////////////////////////////////////////////
-seccomp_arch_add, seccomp_arch_remove, seccomp_arch_exist \- Manage seccomp filter architectures
+seccomp_arch_add, seccomp_arch_remove, seccomp_arch_exist, seccomp_arch_native \- Manage seccomp filter architectures
.\" //////////////////////////////////////////////////////////////////////////
.SH SYNOPSIS
.\" //////////////////////////////////////////////////////////////////////////
@@ -15,6 +15,7 @@ seccomp_arch_add, seccomp_arch_remove, seccomp_arch_exist \- Manage seccomp filt
.B #define SCMP_ARCH_X86
.B #define SCMP_ARCH_X86_64
.sp
+.BI "uint32_t seccomp_arch_native();"
.BI "int seccomp_arch_exist(const scmp_filter_ctx " ctx ", uint32_t " arch_token ");"
.BI "int seccomp_arch_add(scmp_filter_ctx " ctx ", uint32_t " arch_token ");"
.BI "int seccomp_arch_remove(scmp_filter_ctx " ctx ", uint32_t " arch_token ");"
@@ -41,7 +42,11 @@ should be the
.BR SCMP_ARCH_*
defined constants; with the
.BR SCMP_ARCH_NATIVE
-constant always referring to the native compiled architecture.
+constant always referring to the native compiled architecture. The
+.BR seccomp_arch_native ()
+function returns the system's architecture such that it will match one of the
+.BR SCMP_ARCH_*
+constants.
.P
When a seccomp filter is initialized with the call to
.BR seccomp_init (3)
diff --git a/doc/man/man3/seccomp_arch_native.3 b/doc/man/man3/seccomp_arch_native.3
new file mode 100644
index 0000000..f72602b
--- /dev/null
+++ b/doc/man/man3/seccomp_arch_native.3
@@ -0,0 +1 @@
+.so man3/seccomp_arch_add.3