Skip to content

Commit b242d41

Browse files
committed
api: doxygen: Add Doxygen sections
Add a Doxygen introduction to seccomp.h.in and add an API section to api.c. Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
1 parent 1cc1b2c commit b242d41

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

include/seccomp.h.in

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
/**
1+
/*
22
* Seccomp Library
33
*
4+
* Copyright (c) 2021,2022 Microsoft corporation <paulmoore@microsoft.com>
5+
* Copyright (c) 2018-2022 Oracle <tom.hromatka@oracle.com>
46
* Copyright (c) 2019 Cisco Systems <pmoore2@cisco.com>
57
* Copyright (c) 2012,2013 Red Hat <pmoore@redhat.com>
68
* Author: Paul Moore <paul@paul-moore.com>
@@ -35,6 +37,24 @@
3537
extern "C" {
3638
#endif
3739

40+
/*! \mainpage libseccomp
41+
*
42+
* \section intro_sec Introduction
43+
*
44+
* @c The libseccomp library provides an easy to use, platform independent,
45+
* interface to the Linux Kernel's syscall filtering mechanism. The libseccomp
46+
* API is designed to abstract away the underlying BPF based syscall filter
47+
* language and present a more conventional function-call based filtering
48+
* interface that should be familiar to, and easily adopted by, application
49+
* developers.
50+
*
51+
* View the entire
52+
* <a href="https://github.com/seccomp/libseccomp/blob/main/README.md">README</a>
53+
* for more information.
54+
*
55+
* Libseccomp's C APIs are outlined in the @ref APIs "APIs" section.
56+
*/
57+
3858
/*
3959
* version information
4060
*/

src/api.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
#include "helper.h"
3939
#include "system.h"
4040

41+
/**
42+
* @defgroup APIs
43+
* @{
44+
*/
45+
4146
#define API __attribute__((visibility("default")))
4247

4348
const struct scmp_version library_version = {
@@ -765,3 +770,7 @@ API int seccomp_export_bpf_mem(const scmp_filter_ctx ctx, void *buf,
765770

766771
return rc;
767772
}
773+
774+
/**
775+
* @}
776+
*/

0 commit comments

Comments
 (0)