1seccomp_version(3)         libseccomp Documentation         seccomp_version(3)
2
3
4

NAME

6       seccomp_version - Query the libseccomp version information
7

SYNOPSIS

9       #include <seccomp.h>
10
11       struct scmp_version {
12            unsigned int major;
13            unsigned int minor;
14            unsigned int micro;
15       }
16
17       const struct scmp_version *seccomp_version(void);
18
19       Link with -lseccomp.
20

DESCRIPTION

22       The seccomp_version() and seccomp_reset() functions return a pointer to
23       a scmp_version struct which contains the  version  information  of  the
24       currently  loaded  libseccomp  library.   This  function can be used by
25       applications that need to verify that they are  linked  to  a  specific
26       libseccomp version at runtime.
27
28       The  caller should not attempt to free the returned scmp_version struct
29       when finished.
30

RETURN VALUE

32       The seccomp_version() function returns  a  pointer  to  a  scmp_version
33       structure  on  success, NULL on failure.  The caller should not attempt
34       to free the returned structure.
35

EXAMPLES

37       #include <seccomp.h>
38
39       int main(int argc, char *argv[])
40       {
41            const struct scmp_version *ver;
42
43            ver = seccomp_version();
44            if (ver == NULL)
45                 goto err;
46
47            /* ... */
48
49            return 0;
50
51       err:
52            return -1;
53       }
54

NOTES

56       While the seccomp filter can be generated independent  of  the  kernel,
57       kernel  support is required to load and enforce the seccomp filter gen‐
58       erated by libseccomp.
59
60       The libseccomp project site, with more information and the source  code
61       repository,  can  be  found  at  https://github.com/seccomp/libseccomp.
62       This tool, as well as the libseccomp library, is currently under devel‐
63       opment,  please  report any bugs at the project site or directly to the
64       author.
65

AUTHOR

67       Paul Moore <paul@paul-moore.com>
68
69
70
71
72paul@paul-moore.com            18 February 2016             seccomp_version(3)
Impressum