3 char const *cvs_id_constants
= "$Id: constants.c,v 1.7 2005-07-31 10:04:10 bodea Exp $";
8 #define CONSTANT(table, ...) \
9 static char const *table ## s[] = { \
12 char const *table(int index) \
15 if (index >= 0 && index < sizeof(table ## s) / sizeof(table ## s[0]) \
16 && table ## s[index]) \
17 return table ## s[index]; \
18 snprintf(n, sizeof(n), "%d", index); \
42 CONSTANT(l2tp_avp_name
,
45 "Protocol Version", // 2
46 "Framing Capabilities", // 3
47 "Bearer Capabilities", // 4
49 "Firmware Revision", // 6
52 "Assigned Tunnel ID", // 9
53 "Receive Window Size", // 10
55 "Q.931 Cause Code", // 12
56 "Challenge Response", // 13
57 "Assigned Session ID", // 14
58 "Call Serial Number", // 15
61 "Bearer Type", // 18 (2 = Analog, 1 = Digital)
62 "Framing Type", // 19 (2 = Async, 1 = Sync)
64 "Called Number", // 21
65 "Calling Number", // 22
67 "Tx Connect Speed", // 24
68 "Physical Channel ID", // 25
69 "Initial Received LCP CONFREQ", // 26
70 "Last Sent LCP CONFREQ", // 27
71 "Last Received LCP CONFREQ", // 28
72 "Proxy Authen Type", // 29
73 "Proxy Authen Name", // 30
74 "Proxy Authen Challenge", // 31
75 "Proxy Authen ID", // 32
76 "Proxy Authen Response", // 33
79 "Random Vector", // 36
80 "Private Group ID", // 37
81 "Rx Connect Speed", // 38
82 "Sequencing Required" // 39
85 CONSTANT(l2tp_stopccn_result_code
,
87 "General request to clear control connection", // 1
88 "General error--Error Code indicates the problem", // 2
89 "Control channel already exists", // 3
90 "Requester is not authorized to establish a"
91 " control channel", // 4
92 "The protocol version of the requester is not"
94 "Requester is being shut down", // 6
95 "Finite State Machine error" // 7
98 CONSTANT(l2tp_cdn_result_code
,
100 "Call disconnected due to loss of carrier", // 1
101 "Call disconnected for the reason indicated in"
103 "Call disconnected for administrative reasons", // 3
104 "Call failed due to lack of appropriate facilities"
105 " being available (temporary condition)", // 4
106 "Call failed due to lack of appropriate facilities"
107 " being available (permanent condition)", // 5
108 "Invalid destination", // 6
109 "Call failed due to no carrier detected", // 7
110 "Call failed due to detection of a busy signal", // 8
111 "Call failed due to lack of a dial tone", // 9
112 "Call was not established within time allotted by"
114 "Call was connected but no appropriate framing was"
118 CONSTANT(l2tp_error_code
,
119 "No general error", // 0
120 "No control connection exists yet for this LAC-LNS"
122 "Length is wrong", // 2
123 "One of the field values was out of range or"
124 " reserved field was non-zero", // 3
125 "Insufficient resources to handle this operation"
127 "The Session ID is invalid in this context", // 5
128 "A generic vendor-specific error occurred in the"
130 "Try another LNS", // 7
131 "Session or tunnel was shutdown due to receipt of"
132 " an unknown AVP with the M-bit set" // 8
156 CONSTANT(ppp_auth_type
,
158 "Textual username/password exchange", // 1
161 "No Authentication", // 4
162 "Microsoft CHAP Version 1 (MSCHAPv1)" // 5
177 "DiscardRequest", // 11
181 CONSTANT(ppp_lcp_option
,
183 "Maximum-Receive-Unit", // 1
184 "Async-Control-Map", // 2
185 "Authentication-Protocol", // 3
186 "Quality-Protocol", // 4
189 "Protocol-Field-Compression", // 7
190 "Address-and-Control-Field-Compression" // 8
193 CONSTANT(radius_state
,
199 "RADIUSINTERIM", // 5
203 CONSTANT(radius_code
,
205 "Access-Request", // 1
206 "Access-Accept", // 2
207 "Access-Reject", // 3
208 "Accounting-Request", // 4
209 "Accounting-Response", // 5
215 "Access-Challenge", // 11
216 "Status-Server", // 12
217 "Status-Client", // 13
218 0, 0, 0, 0, 0, 0, // 14-19
219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20-29
220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 30-39
221 "Disconnect-Request", // 40
222 "Disconnect-ACK", // 41
223 "Disconnect-NAK", // 42