aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/doc
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2022-01-15 19:24:52 -0900
committerDavid M. Syzdek <david@syzdek.net>2022-01-15 19:24:52 -0900
commit9949e9a0f24596b5b816ae13ce99418b339a13d4 (patch)
treed81ad1d75c8619f0f586d937c9e4595cc18bdc8e /doc
parentf7bf5f609c3858eb1142e9fe95880facb1a0fbea (diff)
downloadtinyrad-9949e9a0f24596b5b816ae13ce99418b339a13d4.tar.gz
tinyrad-9949e9a0f24596b5b816ae13ce99418b339a13d4.tar.bz2
tinyrad-9949e9a0f24596b5b816ae13ce99418b339a13d4.tar.xz
tinyrad-9949e9a0f24596b5b816ae13ce99418b339a13d4.zip
doc: adding initial man pages
Diffstat (limited to 'doc')
-rw-r--r--doc/mans/tinyrad.3.in82
-rw-r--r--doc/mans/tinyrad_error.3.in122
-rw-r--r--doc/mans/tinyrad_options.3.in143
3 files changed, 347 insertions, 0 deletions
diff --git a/doc/mans/tinyrad.3.in b/doc/mans/tinyrad.3.in
new file mode 100644
index 0000000..6f81caa
--- /dev/null
+++ b/doc/mans/tinyrad.3.in
@@ -0,0 +1,82 @@
1.\"
2.\" Tiny RADIUS Client Library
3.\" Copyright (C) 2022 David M. Syzdek <david@syzdek.net>.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions are
8.\" met:
9.\"
10.\" * Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" * Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\" * Neither the name of David M. Syzdek nor the
16.\" names of its contributors may be used to endorse or promote products
17.\" derived from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20.\" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21.\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR
23.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.TH "TINYRAD" "3" "@RELEASE_MONTH@" "@PACKAGE_NAME@" "Library Functions Manual"
32.SH NAME
33tinyrad - Tiny RADIUS Client Library
34
35.SH LIBRARY
36TinyRad (libtinyrad, -ltinyrad)
37
38.SH SYNOPSIS
39\fB#include\fR \fB<tinyrad.h>\fR
40
41.SH DESCRIPTION
42Remote Authentication Dial-In User Service (RADIUS) (RFC 2865 and RFC 2866)
43is a networking protocol that provides authentication, authorization, and
44accounting (AAA) for users connected to network devices. The Tiny RDAIUS
45Client Library (tinyrad) is a small, RFC compliant implementation of the RADIUS
46protocol.
47
48.SH INDEX
49
50.TP 25
51.BR tinyrad_get_option (3)
52retrieves global and instance parameters used by the TinyRad library.
53
54.TP
55.BR tinyrad_memfree (3)
56releases memory allocated by TinyRad routines.
57
58.TP
59.BR tinyrad_set_option (3)
60sets global and instance parameters used by the TinyRad library.
61
62.TP
63.BR tinyrad_strerror (3)
64returns an error message corresponding to an error code
65
66.TP
67.BR tinyrad_strerror_r (3)
68copies into a buffer an error message corresponding to an error code
69
70.SH SEE ALSO
71.BR tinyrad (1),
72.BR tinyrad_error (3),
73.BR tinyrad_options (3)
74
75.SH AUTHOR
76David M. Syzdek <david@syzdek.net>
77
78.SH ACKNOWLEDGEMENTS
79\fB@PACKAGE_NAME@\fR is developed and maintained by David M. Syzdek
80<david@syzdek.net>.
81
82.\" end of man page
diff --git a/doc/mans/tinyrad_error.3.in b/doc/mans/tinyrad_error.3.in
new file mode 100644
index 0000000..c2df5f3
--- /dev/null
+++ b/doc/mans/tinyrad_error.3.in
@@ -0,0 +1,122 @@
1.\"
2.\" Tiny RADIUS Client Library
3.\" Copyright (C) 2022 David M. Syzdek <david@syzdek.net>.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions are
8.\" met:
9.\"
10.\" * Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" * Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\" * Neither the name of David M. Syzdek nor the
16.\" names of its contributors may be used to endorse or promote products
17.\" derived from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20.\" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21.\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR
23.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.TH "TINYRAD_ERROR" "3" "@RELEASE_MONTH@" "@PACKAGE_NAME@" "Library Functions Manual"
32.SH NAME
33tinyrad_strerror, tinyrad_strerror_r - Tiny RADIUS error handling routines
34
35.SH LIBRARY
36TinyRad (libtinyrad, -ltinyrad)
37
38.SH SYNOPSIS
39\fB#include\fR \fB<tinyrad.h>\fR
40
41\fBconst char *\fR \fBtinyrad_strerror(\fR \fBint\fR \fIerrnum\fR );
42
43\fBint\fR \fBtinyrad_strerror_r(\fR \fBint\fR \fIerrnum\fR, \fBchar *\fR \fIstrerrbuf\fR, \fBsize_t\fR \fIbuflen\fR );
44
45.SH DESCRIPTION
46The \fBtinyrad_strerror()\fR and \fBfBtinyrad_strerror_r()\fR functions look
47up the error message string corresponding to an error number.
48
49The \fBtinyrad_strerror()\fR function accepts an error number argument
50\fIerrnum\fR and returns a pointer to the corresponding message string.
51
52\The \fBtinyrad_strerror_r()\fR function copies the error message string to
53\fIstrerrbuf\fR for a maximum of \fIbuflen\fR characters and returns
54\fBTRAD_SUCCESS\fR upon success. If insufficient storage is provided in
55\fIstrerrbuf\fR (as specified in \fIbuflen\fR) to contain the error string, the
56returned error string will be truncated.
57
58.SH API ERROR CODES
59The following is a list of API error codes recognized by the library.
60
61.TP 20
62.B TRAD_SUCCESS
63The request was successful.
64
65.TP
66.B TRAD_EACCES
67Insufficient access to perform the requested operation.
68
69.TP
70.B TRAD_ECONNECT
71unable to connect to remote host.
72
73.TP
74.B TRAD_EEXISTS
75dictionary object already exists
76
77.TP
78.B TRAD_ENOBUFS
79Insufficient buffer space available to perform the requested operation.
80
81.TP
82.B TRAD_ENOENT
83File or directory does not exist.
84
85.TP
86.B TRAD_EOPTERR
87error setting or getting parameter using trad_get_option(3) or
88trad_set_option(3)
89
90.TP
91.B TRAD_ERESOLVE
92unable to resolve URL host
93
94.TP
95.B TRAD_ESCHEME
96invalid URL scheme; URL schemes don't match; or URL scheme does not match
97options
98
99.TP
100.B TRAD_ESYNTAX
101Invalid or unrecognized syntax.
102
103.TP
104.B TRAD_EURL
105invalid Tiny RADIUS URL
106
107.TP
108.B TRAD_EUNKNOWN
109An unknown or undocumented error code occurred.
110
111.SH SEE ALSO
112.BR tinyrad (3),
113.BR tinyrad_options (3),
114
115.SH AUTHOR
116David M. Syzdek <david@syzdek.net>
117
118.SH ACKNOWLEDGEMENTS
119\fB@PACKAGE_NAME@\fR is developed and maintained by David M. Syzdek
120<david@syzdek.net>.
121
122.\" end of man page
diff --git a/doc/mans/tinyrad_options.3.in b/doc/mans/tinyrad_options.3.in
new file mode 100644
index 0000000..701d89e
--- /dev/null
+++ b/doc/mans/tinyrad_options.3.in
@@ -0,0 +1,143 @@
1.\"
2.\" Tiny RADIUS Client Library
3.\" Copyright (C) 2022 David M. Syzdek <david@syzdek.net>.
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions are
8.\" met:
9.\"
10.\" * Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" * Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\" * Neither the name of David M. Syzdek nor the
16.\" names of its contributors may be used to endorse or promote products
17.\" derived from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20.\" IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21.\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR
23.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.TH "TINYRAD_OPTIONS" "3" "@RELEASE_MONTH@" "@PACKAGE_NAME@" "Library Functions Manual"
32.SH NAME
33tinyrad_get_option, tinyrad_set_option - Tiny RADIUS parameter handling routines
34
35.SH LIBRARY
36TinyRad (libtinyrad, -ltinyrad)
37
38.SH SYNOPSIS
39\fB#include\fR \fB<tinyrad.h>\fR
40
41\fBint\fR \fBtinyrad_get_option(\fR \fBTinyRad *\fR\fItr\fR, \fBint\fR \fIoption\fR, \fBvoid *\fR\fIoutvalue\fR);
42
43\fBint\fR \fBtinyrad_set_option(\fR \fBTinyRad *\fR\fItr\fR, \fBint\fR \fIoption\fR, \fBconst void *\fR\fIinvalue\fR);
44
45.SH DESCRIPTION
46These routines provide access to global parameters and instance specific
47parameters within a TinyRad handle. \fItr\fR specifies the TinyRad handle to
48access unless accessing global parameters. \fItr\fR should be NULL when
49accessing global parameters. \fIoption\fR specifies the parameter to access.
50The data type of \fIoutvalue\fR and \fIinvalue\fR is determined based on the
51value of the \fIoption\fR argument and should be cast to \fBvoid *\fR.
52\fBtinyrad_set_option\fR() is not thread safe. Unless noted for a specific
53\fIoption\fR, \fBtinyrad_get_option\fR() may be safely called within threaded
54applications without locking provided that the referenced TinyRad handle is not
55destroyed and \fBtinyrad_set_option\fR() is not called on the referenced
56TinyRad handle concurrently with \fBtinyrad_get_option\fR().
57
58The following is a list of supported values for \fIoption\fR:
59
60.TP
61.B TRAD_OPT_DEBUG_IDENT
62Sets/gets the identifier used to print debug statements when not using
63\fBsyslog(3)\fR. \fBinvalue\fR must be \fBconst char *\fR. \fBoutvalue\fR must
64be \fBchar **\fR, and the caller is responsible of freeing the resulting string
65by calling \fBtinyrad_memfree(3)\fR. \fBinvalue\fR and \fBoutvalue\fR must not be \fINULL\fR. This option sets a global parameter which affects all instances
66of TinyRad.
67
68.TP
69.B TRAD_OPT_DEBUG_LEVEL
70Sets/gets the debug level of the client library. \fIinvalue\fR must be a
71\fBconst int *\fR and \fIoutvalue\fR must be a \fBint *\fR. Valid debug levels
72are \fBTRAD_DEBUG_NONE\fR, \fBTRAD_DEBUG_TRACE\fR, \fBTRAD_DEBUG_ARGS\fR,
73\fBTRAD_DEBUG_PACKETS\fR and \fBTRAD_DEBUG_ANY\fR. Custom debug levels may be
74created by using OR to combine debug levels.
75
76.TP
77.B TRAD_OPT_DEBUG_SYSLOG
78Sets/gets status of using \fBsyslog\fR() for debug output. \fIinvalue\fR must
79be a \fBconst int *\fR and \fIoutvalue\fR must be a \fBint *\fR. If the value
80is \fBTRAD_ON\fR, debug statements are sent to syslog(3) with a priority of
81\fBLOG_DEBUG\fR. If the value is \fBTRAD_OFF\fR, debug statements are printed
82to \fBstdout\fR.
83
84.TP
85.B TRAD_OPT_DESC
86Returns the file descriptor associated with the specified TinyRad handle.
87\fIoutvalue\fR must be a \fBint *\fR. This is a read-only option.
88
89.TP
90.B TRAD_OPT_IPV4
91Sets/gets IPv4 address preference. \fIinvalue\fR must be a \fBconst int *\fR
92and \fIoutvalue\fR must be a \fBint *\fR. If the value is \fBTRAD_ON\fR, then
93IPv4 addresses will be used. If \fBTRAD_OPT_IPv4\fR and \fBTRAD_OPT_IPV6\fR
94are both set to \fBTRAD_OFF\fR, then IPv6 addresses are attempted before IPv4
95addresses. If \fBTRAD_OPT_IPv4\fR and \fBTRAD_OPT_IPV6\fR are both set to
96\fBTRAD_ON\fR, then IPv4-mapped IPv6 addresses are used.
97
98.TP
99.B TRAD_OPT_IPV6
100Sets/gets IPv6 address preference. \fIinvalue\fR must be a \fBconst int *\fR
101and \fIoutvalue\fR must be a \fBint *\fR. If the value is \fBTRAD_ON\fR, then
102IPv6 addresses will be used. If \fBTRAD_OPT_IPv4\fR and \fBTRAD_OPT_IPV6\fR
103are both set to \fBTRAD_OFF\fR, then IPv6 addresses are attempted before IPv4
104addresses. If \fBTRAD_OPT_IPv4\fR and \fBTRAD_OPT_IPV6\fR are both set to
105\fBTRAD_ON\fR, then IPv4-mapped IPv6 addresses are used.
106
107.TP
108.B TRAD_OPT_NETWORK_TIMEOUT
109Sets/gets timeout for socket/network operations. \fIinvalue\fR must be a
110\fBconst struct timeval *\fR and \fIoutvalue\fR must be a
111\fBstruct timeval *\fR.
112
113.TP
114.B TRAD_OPT_SOCKET_BIND_ADDRESSES
115Sets/gets a space-separated list of IP Addresses used to bind the local socket
116when connecting to a remote server. Only one valid IPv4 address and/or one
117valid IPv6 address are allowed in the list. \fIinvalue\fR must be a
118\fBconst char *\fR. \fIoutvalue\fR must be a \fBchar **\fR and the caller is
119responsible for freeing the resulting string by calling trad_memfree(3).
120
121.TP
122.B TRAD_OPT_URI
123Sets/gets a space-separated list of URIs to be contacted by the library when
124trying to send requests to the RADIUS server. \fIinvalue\fR must be a
125\fBconst char *\fR. \fIoutvalue\fR must be a \fBchar **\fR and the caller is
126responsible for freeing the resulting string by calling trad_memfree(3). This
127parameter cannot be set once the socket is created.
128
129.SH RETURN VALUES
130On success, the functions return TINYRAD_SUCCESS, otherwise a specific error
131is returned.
132.SH SEE ALSO
133.BR tinyrad (3),
134.BR tinyrad_error (3),
135
136.SH AUTHOR
137David M. Syzdek <david@syzdek.net>
138
139.SH ACKNOWLEDGEMENTS
140\fB@PACKAGE_NAME@\fR is developed and maintained by David M. Syzdek
141<david@syzdek.net>.
142
143.\" end of man page