Debian Codegraph @

pppd/plugins/radius/options.h

raw
1 /*
2 * Copyright (C) 1996 Lars Fenneberg
3 *
4 * See the file COPYRIGHT for the respective terms and conditions.
5 * If the file is missing contact me at [email protected]
6 * and I'll send you a copy.
7 *
8 */
9
10 #define OPTION_LEN 64
11
12 /* ids for different option types */
13 #define OT_STR (1<<0) /* string */
14 #define OT_INT (1<<1) /* integer */
15 #define OT_SRV (1<<2) /* server list */
16 #define OT_AUO (1<<3) /* authentication order */
17
18 #define OT_ANY ((unsigned int)~0) /* used internally */
19
20 /* status types */
21 #define ST_UNDEF (1<<0) /* option is undefined */
22
23 typedef struct _option {
24 char name[OPTION_LEN]; /* name of the option */
25 int type, status; /* type and status */
26 void *val; /* pointer to option value */
27 } OPTION;
28
29 static SERVER acctserver = {0};
30 static SERVER authserver = {0};
31
32 int default_tries = 4;
33 int default_timeout = 60;
34
35 static OPTION config_options[] = {
36 /* internally used options */
37 {"config_file", OT_STR, ST_UNDEF, NULL},
38 /* General options */
39 {"auth_order", OT_AUO, ST_UNDEF, NULL},
40 {"login_tries", OT_INT, ST_UNDEF, &default_tries},
41 {"login_timeout", OT_INT, ST_UNDEF, &default_timeout},
42 {"nologin", OT_STR, ST_UNDEF, "/etc/nologin"},
43 {"issue", OT_STR, ST_UNDEF, "/etc/radiusclient/issue"},
44 /* RADIUS specific options */
45 {"authserver", OT_SRV, ST_UNDEF, &authserver},
46 {"acctserver", OT_SRV, ST_UNDEF, &acctserver},
47 {"servers", OT_STR, ST_UNDEF, NULL},
48 {"dictionary", OT_STR, ST_UNDEF, NULL},
49 {"login_radius", OT_STR, ST_UNDEF, "/usr/sbin/login.radius"},
50 {"seqfile", OT_STR, ST_UNDEF, NULL},
51 {"mapfile", OT_STR, ST_UNDEF, NULL},
52 {"default_realm", OT_STR, ST_UNDEF, NULL},
53 {"radius_timeout", OT_INT, ST_UNDEF, NULL},
54 {"radius_retries", OT_INT, ST_UNDEF, NULL},
55 {"nas_identifier", OT_STR, ST_UNDEF, ""},
56 {"bindaddr", OT_STR, ST_UNDEF, NULL},
57 /* local options */
58 {"login_local", OT_STR, ST_UNDEF, NULL},
59 };
60
61 static int num_options = ((sizeof(config_options))/(sizeof(config_options[0])));