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