Deleted Added
full compact
radlib_private.h (228730) radlib_private.h (243956)
1/*-
2 * Copyright 1998 Juniper Networks, Inc.
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/*-
2 * Copyright 1998 Juniper Networks, Inc.
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/radlib_private.h 228730 2011-12-20 11:13:44Z melifaro $
26 * $FreeBSD: head/lib/libradius/radlib_private.h 243956 2012-12-06 19:00:37Z sem $
27 */
28
29#ifndef RADLIB_PRIVATE_H
30#define RADLIB_PRIVATE_H
31
32#include <sys/types.h>
33#include <netinet/in.h>
34

--- 6 unchanged lines hidden (view full) ---

41#define RADIUS_SERVER 2 /* RADIUS server */
42
43/* Defaults */
44#define MAXTRIES 3
45#define PATH_RADIUS_CONF "/etc/radius.conf"
46#define RADIUS_PORT 1812
47#define RADACCT_PORT 1813
48#define TIMEOUT 3 /* In seconds */
27 */
28
29#ifndef RADLIB_PRIVATE_H
30#define RADLIB_PRIVATE_H
31
32#include <sys/types.h>
33#include <netinet/in.h>
34

--- 6 unchanged lines hidden (view full) ---

41#define RADIUS_SERVER 2 /* RADIUS server */
42
43/* Defaults */
44#define MAXTRIES 3
45#define PATH_RADIUS_CONF "/etc/radius.conf"
46#define RADIUS_PORT 1812
47#define RADACCT_PORT 1813
48#define TIMEOUT 3 /* In seconds */
49#define DEAD_TIME 0
49
50/* Limits */
51#define ERRSIZE 128 /* Maximum error message length */
52#define MAXCONFLINE 1024 /* Maximum config file line length */
53#define MAXSERVERS 10 /* Maximum number of servers to try */
54#define MSGSIZE 4096 /* Maximum RADIUS message */
55#define PASSSIZE 128 /* Maximum significant password chars */
56

--- 6 unchanged lines hidden (view full) ---

63#define POS_ATTRS 20 /* Start of attributes */
64
65struct rad_server {
66 struct sockaddr_in addr; /* Address of server */
67 char *secret; /* Shared secret */
68 int timeout; /* Timeout in seconds */
69 int max_tries; /* Number of tries before giving up */
70 int num_tries; /* Number of tries so far */
50
51/* Limits */
52#define ERRSIZE 128 /* Maximum error message length */
53#define MAXCONFLINE 1024 /* Maximum config file line length */
54#define MAXSERVERS 10 /* Maximum number of servers to try */
55#define MSGSIZE 4096 /* Maximum RADIUS message */
56#define PASSSIZE 128 /* Maximum significant password chars */
57

--- 6 unchanged lines hidden (view full) ---

64#define POS_ATTRS 20 /* Start of attributes */
65
66struct rad_server {
67 struct sockaddr_in addr; /* Address of server */
68 char *secret; /* Shared secret */
69 int timeout; /* Timeout in seconds */
70 int max_tries; /* Number of tries before giving up */
71 int num_tries; /* Number of tries so far */
72 int is_dead; /* The server did not answer last time */
73 time_t dead_time; /* Don't try this server for the time period if it is dead */
74 time_t next_probe; /* Time of a next probe after failure */
75 in_addr_t bindto; /* Bind to address */
71};
72
73struct rad_handle {
74 int fd; /* Socket file descriptor */
75 struct rad_server servers[MAXSERVERS]; /* Servers to contact */
76 int num_servers; /* Number of valid server entries */
77 int ident; /* Current identifier value */
78 char errmsg[ERRSIZE]; /* Most recent error message */

--- 4 unchanged lines hidden (view full) ---

83 int pass_len; /* Length of cleartext password */
84 int pass_pos; /* Position of scrambled password */
85 char chap_pass; /* Have we got a CHAP_PASSWORD ? */
86 int authentic_pos; /* Position of message authenticator */
87 char eap_msg; /* Are we an EAP Proxy? */
88 unsigned char in[MSGSIZE]; /* Response received */
89 int in_len; /* Length of response */
90 int in_pos; /* Current position scanning attrs */
76};
77
78struct rad_handle {
79 int fd; /* Socket file descriptor */
80 struct rad_server servers[MAXSERVERS]; /* Servers to contact */
81 int num_servers; /* Number of valid server entries */
82 int ident; /* Current identifier value */
83 char errmsg[ERRSIZE]; /* Most recent error message */

--- 4 unchanged lines hidden (view full) ---

88 int pass_len; /* Length of cleartext password */
89 int pass_pos; /* Position of scrambled password */
90 char chap_pass; /* Have we got a CHAP_PASSWORD ? */
91 int authentic_pos; /* Position of message authenticator */
92 char eap_msg; /* Are we an EAP Proxy? */
93 unsigned char in[MSGSIZE]; /* Response received */
94 int in_len; /* Length of response */
95 int in_pos; /* Current position scanning attrs */
91 int total_tries; /* How many requests we'll send */
92 int try; /* How many requests we've sent */
93 int srv; /* Server number we did last */
94 int type; /* Handle type */
96 int srv; /* Server number we did last */
97 int type; /* Handle type */
95 in_addr_t bindto; /* Bind to address */
98 in_addr_t bindto; /* Current bind address */
96};
97
98struct vendor_attribute {
99 u_int32_t vendor_value;
100 u_char attrib_type;
101 u_char attrib_len;
102 u_char attrib_data[1];
103};
104
105#endif
99};
100
101struct vendor_attribute {
102 u_int32_t vendor_value;
103 u_char attrib_type;
104 u_char attrib_len;
105 u_char attrib_data[1];
106};
107
108#endif