2 * $Id: options.h,v 1.1 2002/01/22 16:03:02 dfs 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 static OPTION config_options[] = {
35 /* internally used options */
36 {"config_file", OT_STR, ST_UNDEF, NULL},
38 {"auth_order", OT_AUO, ST_UNDEF, NULL},
39 {"login_tries", OT_INT, ST_UNDEF, NULL},
40 {"login_timeout", OT_INT, ST_UNDEF, NULL},
41 {"nologin", OT_STR, ST_UNDEF, NULL},
42 {"issue", OT_STR, ST_UNDEF, NULL},
43 /* RADIUS specific options */
44 {"authserver", OT_SRV, ST_UNDEF, &authserver},
45 {"acctserver", OT_SRV, ST_UNDEF, &acctserver},
46 {"servers", OT_STR, ST_UNDEF, NULL},
47 {"dictionary", OT_STR, ST_UNDEF, NULL},
48 {"login_radius", OT_STR, ST_UNDEF, NULL},
49 {"seqfile", OT_STR, ST_UNDEF, NULL},
50 {"mapfile", OT_STR, ST_UNDEF, NULL},
51 {"default_realm", OT_STR, ST_UNDEF, NULL},
52 {"radius_timeout", OT_INT, ST_UNDEF, NULL},
53 {"radius_retries", OT_INT, ST_UNDEF, NULL},
55 {"login_local", OT_STR, ST_UNDEF, NULL},
58 static int num_options = ((sizeof(config_options))/(sizeof(config_options[0])));