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 lf@elemental.net 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 OPTION config_options_default[] = { 30 /* internally used options */ 31 {"config_file", OT_STR, ST_UNDEF, NULL}, 32 /* RADIUS specific options */ 33 {"serv-type", OT_STR, ST_UNDEF, NULL}, 34 {"serv-auth-type", OT_STR, ST_UNDEF, NULL}, /* alias for serv-type */ 35 {"namespace", OT_STR, ST_UNDEF, NULL}, 36 {"use-public-addr", OT_STR, ST_UNDEF, NULL}, 37 {"tls-verify-hostname", OT_STR, ST_UNDEF, NULL}, 38 {"tls-ca-file", OT_STR, ST_UNDEF, NULL}, 39 {"tls-cert-file", OT_STR, ST_UNDEF, NULL}, 40 {"tls-key-file", OT_STR, ST_UNDEF, NULL}, 41 {"nas-identifier", OT_STR, ST_UNDEF, NULL}, 42 {"nas-ip", OT_STR, ST_UNDEF, NULL}, 43 {"authserver", OT_SRV, ST_UNDEF, NULL}, 44 {"acctserver", OT_SRV, ST_UNDEF, NULL}, 45 {"servers", OT_STR, ST_UNDEF, NULL}, 46 {"dictionary", OT_STR, ST_UNDEF, NULL}, 47 {"default_realm", OT_STR, ST_UNDEF, NULL}, 48 {"radius_timeout", OT_INT, ST_UNDEF, NULL}, 49 {"radius_retries", OT_INT, ST_UNDEF, NULL}, 50 {"radius_deadtime", OT_INT, ST_UNDEF, NULL}, 51 {"bindaddr", OT_STR, ST_UNDEF, NULL}, 52 {"clientdebug", OT_INT, ST_UNDEF, NULL}, 53 /* Deprecated options */ 54 {"login_radius", OT_STR, ST_UNDEF, NULL}, 55 {"seqfile", OT_STR, ST_UNDEF, NULL}, 56 {"mapfile", OT_STR, ST_UNDEF, NULL}, 57 {"auth_order", OT_AUO, ST_UNDEF, NULL}, 58 {"login_tries", OT_INT, ST_UNDEF, NULL}, 59 {"login_timeout", OT_INT, ST_UNDEF, NULL}, 60 {"nologin", OT_STR, ST_UNDEF, NULL}, 61 {"issue", OT_STR, ST_UNDEF, NULL}, 62 {"login_local", OT_STR, ST_UNDEF, NULL}, 63 }; 64 65 #define NUM_OPTIONS ((sizeof(config_options_default))/(sizeof(config_options_default[0]))) 66