Made it 2.0.0, and removed the changes that are in 1.1.x, as
[freeradius.git] / src / modules / rlm_sql / conf.h
1 #ifndef SQL_CONF_H
2 #define SQL_CONF_H
3 /***************************************************************************
4 *  conf.h                             rlm_sql - FreeRADIUS SQL Module      *
5 *                                                                          *
6 *      Configuration options for the SQL module                            *
7 *                                                                          *
8 *                                     Mike Machado <mike@innercite.com>    *
9 ***************************************************************************/
10
11 typedef struct sql_config {
12         char   *sql_driver;
13         char   *sql_server;
14         char   *sql_port;
15         char   *sql_login;
16         char   *sql_password;
17         char   *sql_db;
18         char   *sql_acct_table;
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;
25         char   *sql_nas_table;
26         char   *sql_dict_table;
27         char   *query_user;
28         char   *default_profile;
29         char   *nas_query;
30         char   *authorize_check_query;
31         char   *authorize_reply_query;
32         char   *authorize_group_check_query;
33         char   *authorize_group_reply_query;
34         char   *accounting_onoff_query;
35         char   *accounting_update_query;
36         char   *accounting_update_query_alt;
37         char   *accounting_start_query;
38         char   *accounting_start_query_alt;
39         char   *accounting_stop_query;
40         char   *accounting_stop_query_alt;
41         char   *simul_count_query;
42         char   *simul_verify_query;
43         char   *groupmemb_query;
44         int     sqltrace;
45         int     do_clients;
46         int     read_groups;
47         char   *tracefile;
48         char   *xlat_name;
49         int     deletestalesessions;
50         int     num_sql_socks;
51         int     connect_failure_retry_delay;
52         char   *sql_postauth_table;
53         char   *postauth_query;
54         char   *allowed_chars;
55
56         /* individual driver config */
57         void    *localcfg;
58
59 } SQL_CONFIG;
60
61
62 #define CHECKRAD1               "/usr/sbin/checkrad"
63 #define CHECKRAD2               "/usr/local/sbin/checkrad"
64
65 /* Hack for funky ascend ports on MAX 4048 (and probably others)
66    The "NAS-Port-Id" value is "xyyzz" where "x" = 1 for digital, 2 for analog;
67    "yy" = line number (1 for first PRI/T1/E1, 2 for second, so on);
68    "zz" = channel number (on the PRI or Channelized T1/E1).
69     This should work with normal terminal servers, unless you have a TS with
70         more than 9999 ports ;^).
71     The "ASCEND_CHANNELS_PER_LINE" is the number of channels for each line into
72         the unit.  For my US/PRI that's 23.  A US/T1 would be 24, and a
73         European E1 would be 30 (I think ... never had one ;^).
74     This will NOT change the "NAS-Port-Id" reported in the detail log.  This
75         is simply to fix the dynamic IP assignments a la Cistron.
76     WARNING: This hack works for me, but I only have one PRI!!!  I've not
77         tested it on 2 or more (or with models other than the Max 4048)
78     Use at your own risk!
79   -- dgreer@austintx.com
80 */
81
82 #define ASCEND_PORT_HACK
83 #define ASCEND_CHANNELS_PER_LINE        23
84 #define CISCO_ACCOUNTING_HACK
85
86 /* SQL defines */
87 #define MAX_QUERY_LEN                   4096
88 #define SQL_LOCK_LEN                    MAX_QUERY_LEN
89 #define SQLTRACEFILE                    RADLOG_DIR "/sqltrace.sql"
90
91 /* SQL Errors */
92 #define SQL_DOWN                        1 /* for re-connect */
93
94 #define MAX_COMMUNITY_LEN               50
95 #define MAX_SQL_SOCKS                   256
96 #define MAX_TABLE_LEN                   20
97 #define MAX_AUTH_QUERY_LEN              256
98 #define AUTH_STRING_LEN                 128
99
100 #endif /* SQL_CONF_H */