Skip to content

Commit

Permalink
api: doxygen: Add Doxygen sections
Browse files Browse the repository at this point in the history
Add a Doxygen introduction to seccomp.h.in and add an
API section to api.c.

Signed-off-by: Tom Hromatka <[email protected]>
  • Loading branch information
drakenclimber committed Jan 19, 2022
1 parent abae4a2 commit ec5f257
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
22 changes: 21 additions & 1 deletion include/seccomp.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/**
/*
* Seccomp Library
*
* Copyright (c) 2021,2022 Microsoft corporation <[email protected]>
* Copyright (c) 2018-2022 Oracle <[email protected]>
* Copyright (c) 2019 Cisco Systems <[email protected]>
* Copyright (c) 2012,2013 Red Hat <[email protected]>
* Author: Paul Moore <[email protected]>
Expand Down Expand Up @@ -35,6 +37,24 @@
extern "C" {
#endif

/*! \mainpage libseccomp
*
* \section intro_sec Introduction
*
* @c The libseccomp library provides an easy to use, platform independent,
* interface to the Linux Kernel's syscall filtering mechanism. The libseccomp
* API is designed to abstract away the underlying BPF based syscall filter
* language and present a more conventional function-call based filtering
* interface that should be familiar to, and easily adopted by, application
* developers.
*
* View the entire
* <a href="https://github.com/seccomp/libseccomp/blob/main/README.md">README</a>
* for more information
*
* Libcgroup's C APIs are outlined in the @ref APIs "APIs" section.
*/

/*
* version information
*/
Expand Down
9 changes: 9 additions & 0 deletions src/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
#include "helper.h"
#include "system.h"

/**
* @defgroup APIs
* @{
*/

#define API __attribute__((visibility("default")))

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

return rc;
}

/**
* @}
*/

0 comments on commit ec5f257

Please sign in to comment.