3 /***************************************************************************
4 * conf.h rlm_sql - FreeRADIUS SQL Module *
6 * Configuration options for the SQL module *
8 * Mike Machado <mike@innercite.com> *
9 ***************************************************************************/
11 typedef struct sql_config {
19 char *sql_acct_table2;
20 char *sql_authcheck_table;
21 char *sql_authreply_table;
22 char *sql_groupcheck_table;
23 char *sql_groupreply_table;
24 char *sql_usergroup_table;
28 char *default_profile;
29 char *authorize_check_query;
30 char *authorize_reply_query;
31 char *authorize_group_check_query;
32 char *authorize_group_reply_query;
33 char *accounting_onoff_query;
34 char *accounting_update_query;
35 char *accounting_update_query_alt;
36 char *accounting_start_query;
37 char *accounting_start_query_alt;
38 char *accounting_stop_query;
39 char *accounting_stop_query_alt;
40 char *simul_count_query;
41 char *simul_verify_query;
42 char *groupmemb_query;
47 int deletestalesessions;
49 int connect_failure_retry_delay;
50 int query_on_not_found;
51 char *sql_postauth_table;
55 /* individual driver config */
61 #define CHECKRAD1 "/usr/sbin/checkrad"
62 #define CHECKRAD2 "/usr/local/sbin/checkrad"
64 /* Hack for funky ascend ports on MAX 4048 (and probably others)
65 The "NAS-Port-Id" value is "xyyzz" where "x" = 1 for digital, 2 for analog;
66 "yy" = line number (1 for first PRI/T1/E1, 2 for second, so on);
67 "zz" = channel number (on the PRI or Channelized T1/E1).
68 This should work with normal terminal servers, unless you have a TS with
69 more than 9999 ports ;^).
70 The "ASCEND_CHANNELS_PER_LINE" is the number of channels for each line into
71 the unit. For my US/PRI that's 23. A US/T1 would be 24, and a
72 European E1 would be 30 (I think ... never had one ;^).
73 This will NOT change the "NAS-Port-Id" reported in the detail log. This
74 is simply to fix the dynamic IP assignments a la Cistron.
75 WARNING: This hack works for me, but I only have one PRI!!! I've not
76 tested it on 2 or more (or with models other than the Max 4048)
78 -- dgreer@austintx.com
81 #define ASCEND_PORT_HACK
82 #define ASCEND_CHANNELS_PER_LINE 23
83 #define CISCO_ACCOUNTING_HACK
86 #define MAX_QUERY_LEN 4096
87 #define SQL_LOCK_LEN MAX_QUERY_LEN
88 #define SQLTRACEFILE RADLOG_DIR "/sqltrace.sql"
91 #define SQL_DOWN 1 /* for re-connect */
93 #define MAX_COMMUNITY_LEN 50
94 #define MAX_SQL_SOCKS 256
95 #define MAX_TABLE_LEN 20
96 #define MAX_AUTH_QUERY_LEN 256
97 #define AUTH_STRING_LEN 128
99 #endif /* SQL_CONF_H */