Skip to content

Commit f1b0b83

Browse files
committed
Build Doxygen web site
Make use of the nice documenting comments I've added over the years to build some developer documentation. The generated pages are not installed (but could be if there is demand). Signed-off-by: Chuck Lever <[email protected]>
1 parent b8aba79 commit f1b0b83

File tree

9 files changed

+2926
-1
lines changed

9 files changed

+2926
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ configure.ac~
55
configure
66
configure~
77
cscope.*
8+
docs/doxygen/
89
Makefile
910
Makefile.in
1011
.deps/

Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ AUTOMAKE_OPTIONS = foreign
2020

2121
EXTRA_DIST = autogen.sh CONTRIBUTING.md LICENSE.txt \
2222
README.md SECURITY.md
23-
SUBDIRS = etc man src systemd
23+
SUBDIRS = docs etc man src systemd
24+
2425
MAINTAINERCLEANFILES = Makefile.in cscope.* ktls-utils*.tar.gz

configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ PKG_CHECK_MODULES([LIBNL_GENL3], libnl-genl-3.0 >= 3.1)
6464
AC_SUBST([LIBNL_GENL3_CFLAGS])
6565
AC_SUBST([LIBNL_GENL3_LIBS])
6666

67+
AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, false)
68+
if test "$DOXYGEN" = false; then
69+
AC_MSG_WARN([Doxygen not found - documentation will not be built])
70+
fi
71+
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$DOXYGEN" != "false"])
72+
6773
AC_CHECK_LIB([gnutls], [gnutls_handshake_set_secret_function],
6874
[AC_DEFINE([HAVE_GNUTLS_QUIC], [1],
6975
[Define to 1 if you have the gnutls_handshake_set_secret_function function.])])
@@ -94,6 +100,8 @@ fi
94100
AC_SUBST([AM_CPPFLAGS])
95101

96102
AC_CONFIG_FILES([Makefile \
103+
docs/Doxyfile \
104+
docs/Makefile \
97105
etc/Makefile \
98106
etc/tlshd/Makefile \
99107
man/Makefile \

docs/Doxyfile.in

Lines changed: 2836 additions & 0 deletions
Large diffs are not rendered by default.

docs/Makefile.am

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#
2+
# Copyright (c) 2025 Oracle and/or its affiliates.
3+
#
4+
# ktls-utils is free software; you can redistribute it and/or
5+
# modify it under the terms of the GNU General Public License as
6+
# published by the Free Software Foundation; version 2.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11+
# General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program; if not, write to the Free Software
15+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16+
# 02110-1301, USA.
17+
#
18+
19+
EXTRA_DIST = Doxyfile.in
20+
21+
if HAVE_DOXYGEN
22+
doxygen: Doxyfile
23+
$(DOXYGEN) Doxyfile
24+
endif
25+
26+
clean-local:
27+
-rm -rf doxygen/ latex/ man/
28+
29+
MAINTAINERCLEANFILES = Makefile.in

src/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
# 02110-1301, USA.
1717
#
1818

19+
EXTRA_DIST = mainpage.c
20+
1921
SUBDIRS = tlshd
2022
MAINTAINERCLEANFILES = Makefile.in

src/mainpage.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @cond skip
3+
* vim:syntax=doxygen
4+
* @endcond
5+
6+
@mainpage
7+
8+
@section main_intro Introduction
9+
10+
In-kernel TLS consumers need a mechanism to perform TLS handshakes
11+
on a connected socket to negotiate TLS session parameters that can
12+
then be programmed into the kernel's TLS record protocol engine.
13+
14+
This package of software provides a TLS handshake user agent that
15+
listens for kernel requests and then materializes a user space
16+
socket endpoint on which to perform these handshakes. The resulting
17+
negotiated session parameters are passed back to the kernel via
18+
standard kTLS socket options.
19+
20+
*/

src/tlshd/config.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@
4848

4949
#include "tlshd.h"
5050

51+
/**
52+
* @page config Configuration
53+
*
54+
* @section man5 Man pages
55+
* @subsection tlshd_conf_5 tlshd.conf.5
56+
* @htmlinclude tlshd.conf.5.html
57+
*
58+
* @section examples Configuration examples
59+
* @subsection tlshd_conf /etc/tlshd/config
60+
* @verbinclude config
61+
*/
62+
5163
/**
5264
* @var GKeyFile *tlshd_configuration
5365
* In-memory parsed config file

src/tlshd/main.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@
5151

5252
#include "tlshd.h"
5353

54+
/**
55+
* @page tlshd TLS handshake daemon
56+
*
57+
* The tlshd daemon is a user agent that services TLS handshake
58+
* requests on behalf of kernel TLS consumers. It materializes kernel
59+
* socket endpoints in user space in order to perform TLS handshakes
60+
* using a standard TLS library. After each handshake completes, tlshd
61+
* plants the TLS session key into the socket to enable the use of
62+
* kTLS to secure subsequent communication on that socket. The socket
63+
* is then passed back to the kernel.
64+
*
65+
* @section man8 Man pages
66+
* @subsection tlshd_8 tlshd.8
67+
* @htmlinclude tlshd.8.html
68+
*/
69+
5470
static const char *optstring = "c:hsv";
5571
static const struct option longopts[] = {
5672
{ "config", required_argument, NULL, 'c' },

0 commit comments

Comments
 (0)