1 /* 2 * $Id: options.h,v 1.6 2008/03/05 16:35:20 cparker Exp $ 3 * 4 * Copyright (C) 1996 Lars Fenneberg 5 * 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. 9 * 10 */ 11 12 #define OPTION_LEN 64 13 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 */ 19 20 #define OT_ANY ((unsigned int)~0) /* used internally */ 21 22 /* status types */ 23 #define ST_UNDEF (1<<0) /* option is undefined */ 24 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 */ 29 } OPTION; 30 31 static OPTION config_options_default[] = { 32 /* internally used options */ 33 {"config_file", OT_STR, ST_UNDEF, NULL}, 34 /* General options */ 35 {"auth_order", OT_AUO, ST_UNDEF, NULL}, 36 {"login_tries", OT_INT, ST_UNDEF, NULL}, 37 {"login_timeout", OT_INT, ST_UNDEF, NULL}, 38 {"nologin", OT_STR, ST_UNDEF, NULL}, 39 {"issue", OT_STR, ST_UNDEF, NULL}, 40 /* RADIUS specific options */ 41 {"authserver", OT_SRV, ST_UNDEF, NULL}, 42 {"acctserver", OT_SRV, ST_UNDEF, NULL}, 43 {"servers", OT_STR, ST_UNDEF, NULL}, 44 {"dictionary", OT_STR, ST_UNDEF, NULL}, 45 {"login_radius", OT_STR, ST_UNDEF, NULL}, 46 {"seqfile", OT_STR, ST_UNDEF, NULL}, 47 {"mapfile", OT_STR, ST_UNDEF, NULL}, 48 {"default_realm", OT_STR, ST_UNDEF, NULL}, 49 {"radius_timeout", OT_INT, ST_UNDEF, NULL}, 50 {"radius_retries", OT_INT, ST_UNDEF, NULL}, 51 {"radius_deadtime", OT_INT, ST_UNDEF, NULL}, 52 {"bindaddr", OT_STR, ST_UNDEF, NULL}, 53 {"nasaddr", OT_STR, ST_UNDEF, NULL}, 54 /* local options */ 55 {"login_local", OT_STR, ST_UNDEF, NULL}, 56 }; 57 58 #define NUM_OPTIONS ((sizeof(config_options_default))/(sizeof(config_options_default[0]))) 59