libradius.3 (235286) | libradius.3 (243956) |
---|---|
1.\" Copyright 1998 Juniper Networks, Inc. 2.\" Copyright 2009 Alexander Motin <mav@FreeBSD.org>. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" | 1.\" Copyright 1998 Juniper Networks, Inc. 2.\" Copyright 2009 Alexander Motin <mav@FreeBSD.org>. 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" |
26.\" $FreeBSD: head/lib/libradius/libradius.3 235286 2012-05-11 20:06:46Z gjb $ | 26.\" $FreeBSD: head/lib/libradius/libradius.3 243956 2012-12-06 19:00:37Z sem $ |
27.\" 28.Dd August 5, 2009 29.Dt LIBRADIUS 3 30.Os 31.Sh NAME 32.Nm libradius 33.Nd RADIUS client/server library 34.Sh SYNOPSIS 35.In radlib.h 36.Ft "struct rad_handle *" 37.Fn rad_acct_open "void" 38.Ft int 39.Fn rad_add_server "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries" | 27.\" 28.Dd August 5, 2009 29.Dt LIBRADIUS 3 30.Os 31.Sh NAME 32.Nm libradius 33.Nd RADIUS client/server library 34.Sh SYNOPSIS 35.In radlib.h 36.Ft "struct rad_handle *" 37.Fn rad_acct_open "void" 38.Ft int 39.Fn rad_add_server "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries" |
40.Ft int 41.Fn rad_add_server_ex "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries" "int dead_time" "struct in_addr bindto" |
|
40.Ft "struct rad_handle *" 41.Fn rad_auth_open "void" 42.Ft void 43.Fn rad_close "struct rad_handle *h" 44.Ft int 45.Fn rad_config "struct rad_handle *h" "const char *file" 46.Ft int 47.Fn rad_continue_send_request "struct rad_handle *h" "int selected" "int *fd" "struct timeval *tv" --- 100 unchanged lines hidden (view full) --- 148.Dv NULL , 149in which case the standard configuration file 150.Pa /etc/radius.conf 151is used. 152.Fn rad_config 153returns 0 on success, or \-1 if an error occurs. 154.Pp 155The library can also be configured programmatically by calls to | 42.Ft "struct rad_handle *" 43.Fn rad_auth_open "void" 44.Ft void 45.Fn rad_close "struct rad_handle *h" 46.Ft int 47.Fn rad_config "struct rad_handle *h" "const char *file" 48.Ft int 49.Fn rad_continue_send_request "struct rad_handle *h" "int selected" "int *fd" "struct timeval *tv" --- 100 unchanged lines hidden (view full) --- 150.Dv NULL , 151in which case the standard configuration file 152.Pa /etc/radius.conf 153is used. 154.Fn rad_config 155returns 0 on success, or \-1 if an error occurs. 156.Pp 157The library can also be configured programmatically by calls to |
156.Fn rad_add_server . | 158.Fn rad_add_server 159or 160.Fn rad_add_server_ex . 161.Fn rad_add_server 162is a backward compatible function, implemented via 163.Fn rad_add_server_ex . |
157The 158.Fa host 159parameter specifies the server host, either as a fully qualified 160domain name or as a dotted-quad IP address in text form. 161The 162.Fa port 163parameter specifies the UDP port to contact on the server. 164If --- 18 unchanged lines hidden (view full) --- 183ignores all but the leading 128 bytes of the shared secret. 184The timeout for receiving replies from the server is passed to the 185.Fa timeout 186parameter, in units of seconds. 187The maximum number of repeated 188requests to make before giving up is passed into the 189.Fa max_tries 190parameter. | 164The 165.Fa host 166parameter specifies the server host, either as a fully qualified 167domain name or as a dotted-quad IP address in text form. 168The 169.Fa port 170parameter specifies the UDP port to contact on the server. 171If --- 18 unchanged lines hidden (view full) --- 190ignores all but the leading 128 bytes of the shared secret. 191The timeout for receiving replies from the server is passed to the 192.Fa timeout 193parameter, in units of seconds. 194The maximum number of repeated 195requests to make before giving up is passed into the 196.Fa max_tries 197parameter. |
198Time interval in seconds when the server will not be requested 199if it is marked as dead (did not answer on the last try) set with 200.Fa dead_time 201parameter. 202.Fa bindto 203parameter is an IP address on the multihomed host that is used as 204a source address for all requests. |
|
191.Fn rad_add_server 192returns 0 on success, or \-1 if an error occurs. 193.Pp 194.Fn rad_add_server | 205.Fn rad_add_server 206returns 0 on success, or \-1 if an error occurs. 207.Pp 208.Fn rad_add_server |
195may be called multiple times, and it may be used together with | 209or 210.Fn rad_add_server_ex 211may be called multiple times, and they may be used together with |
196.Fn rad_config . 197At most 10 servers may be specified. 198When multiple servers are given, they are tried in round-robin 199fashion until a valid response is received, or until each server's 200.Fa max_tries 201limit has been reached. 202.Ss Creating a RADIUS Request 203A RADIUS request consists of a code specifying the kind of request, --- 395 unchanged lines hidden --- | 212.Fn rad_config . 213At most 10 servers may be specified. 214When multiple servers are given, they are tried in round-robin 215fashion until a valid response is received, or until each server's 216.Fa max_tries 217limit has been reached. 218.Ss Creating a RADIUS Request 219A RADIUS request consists of a code specifying the kind of request, --- 395 unchanged lines hidden --- |