1 /***************************************************************************
2 * conf.h rlm_sql - FreeRADIUS SQL Module *
4 * Configuration options for the SQL module *
6 * Mike Machado <mike@innercite.com> *
7 ***************************************************************************/
9 typedef struct sql_config {
16 char *sql_acct_table2;
17 char *sql_authcheck_table;
18 char *sql_authreply_table;
19 char *sql_groupcheck_table;
20 char *sql_groupreply_table;
21 char *sql_usergroup_table;
24 char *authorize_check_query;
25 char *authorize_reply_query;
26 char *authorize_group_check_query;
27 char *authorize_group_reply_query;
28 char *authenticate_query;
29 char *accounting_onoff_query;
30 char *accounting_update_query;
31 char *accounting_start_query;
32 char *accounting_start_query_alt;
33 char *accounting_stop_query;
34 char *accounting_stop_query_alt;
37 int deletestalesessions;
40 /* individual driver config */
46 #define CHECKRAD1 "/usr/sbin/checkrad"
47 #define CHECKRAD2 "/usr/local/sbin/checkrad"
49 /* Hack for funky ascend ports on MAX 4048 (and probably others)
50 The "NAS-Port-Id" value is "xyyzz" where "x" = 1 for digital, 2 for analog;
51 "yy" = line number (1 for first PRI/T1/E1, 2 for second, so on);
52 "zz" = channel number (on the PRI or Channelized T1/E1).
53 This should work with normal terminal servers, unless you have a TS with
54 more than 9999 ports ;^).
55 The "ASCEND_CHANNELS_PER_LINE" is the number of channels for each line into
56 the unit. For my US/PRI that's 23. A US/T1 would be 24, and a
57 European E1 would be 30 (I think ... never had one ;^).
58 This will NOT change the "NAS-Port-Id" reported in the detail log. This
59 is simply to fix the dynamic IP assignments a la Cistron.
60 WARNING: This hack works for me, but I only have one PRI!!! I've not
61 tested it on 2 or more (or with models other than the Max 4048)
63 -- dgreer@austintx.com
66 #define ASCEND_PORT_HACK
67 #define ASCEND_CHANNELS_PER_LINE 23
68 #define CISCO_ACCOUNTING_HACK
71 #define MAX_QUERY_LEN 4096
72 #define SQL_LOCK_LEN MAX_QUERY_LEN
73 #define SQLTRACEFILE RADLOG_DIR "/sqltrace.sql"
75 #define MAX_COMMUNITY_LEN 50
76 #define MAX_SQL_SOCKS 256
77 #define MAX_TABLE_LEN 20
78 #define MAX_AUTH_QUERY_LEN 256
79 #define AUTH_STRING_LEN 128