6 #define CONSTANT(table, ...) \
7 static char const *table ## s[] = { \
10 char const *table(int index) \
13 if (index >= 0 && index < sizeof(table ## s) / sizeof(table ## s[0]) \
14 && table ## s[index]) \
15 return table ## s[index]; \
16 snprintf(n, sizeof(n), "%d", index); \
40 CONSTANT(l2tp_avp_name
,
43 "Protocol Version", // 2
44 "Framing Capabilities", // 3
45 "Bearer Capabilities", // 4
47 "Firmware Revision", // 6
50 "Assigned Tunnel ID", // 9
51 "Receive Window Size", // 10
53 "Q.931 Cause Code", // 12
54 "Challenge Response", // 13
55 "Assigned Session ID", // 14
56 "Call Serial Number", // 15
59 "Bearer Type", // 18 (2 = Analog, 1 = Digital)
60 "Framing Type", // 19 (2 = Async, 1 = Sync)
62 "Called Number", // 21
63 "Calling Number", // 22
65 "Tx Connect Speed", // 24
66 "Physical Channel ID", // 25
67 "Initial Received LCP CONFREQ", // 26
68 "Last Sent LCP CONFREQ", // 27
69 "Last Received LCP CONFREQ", // 28
70 "Proxy Authen Type", // 29
71 "Proxy Authen Name", // 30
72 "Proxy Authen Challenge", // 31
73 "Proxy Authen ID", // 32
74 "Proxy Authen Response", // 33
77 "Random Vector", // 36
78 "Private Group ID", // 37
79 "Rx Connect Speed", // 38
80 "Sequencing Required" // 39
83 CONSTANT(l2tp_stopccn_result_code
,
85 "General request to clear control connection", // 1
86 "General error--Error Code indicates the problem", // 2
87 "Control channel already exists", // 3
88 "Requester is not authorized to establish a"
89 " control channel", // 4
90 "The protocol version of the requester is not"
92 "Requester is being shut down", // 6
93 "Finite State Machine error" // 7
96 CONSTANT(l2tp_cdn_result_code
,
98 "Call disconnected due to loss of carrier", // 1
99 "Call disconnected for the reason indicated in"
101 "Call disconnected for administrative reasons", // 3
102 "Call failed due to lack of appropriate facilities"
103 " being available (temporary condition)", // 4
104 "Call failed due to lack of appropriate facilities"
105 " being available (permanent condition)", // 5
106 "Invalid destination", // 6
107 "Call failed due to no carrier detected", // 7
108 "Call failed due to detection of a busy signal", // 8
109 "Call failed due to lack of a dial tone", // 9
110 "Call was not established within time allotted by"
112 "Call was connected but no appropriate framing was"
116 CONSTANT(l2tp_error_code
,
117 "No general error", // 0
118 "No control connection exists yet for this LAC-LNS"
120 "Length is wrong", // 2
121 "One of the field values was out of range or"
122 " reserved field was non-zero", // 3
123 "Insufficient resources to handle this operation"
125 "The Session ID is invalid in this context", // 5
126 "A generic vendor-specific error occurred in the"
128 "Try another LNS", // 7
129 "Session or tunnel was shutdown due to receipt of"
130 " an unknown AVP with the M-bit set" // 8
154 CONSTANT(ppp_auth_type
,
156 "Textual username/password exchange", // 1
159 "No Authentication", // 4
160 "Microsoft CHAP Version 1 (MSCHAPv1)" // 5
175 "DiscardRequest", // 11
179 CONSTANT(ppp_lcp_option
,
181 "Maximum-Receive-Unit", // 1
182 "Async-Control-Map", // 2
183 "Authentication-Protocol", // 3
184 "Quality-Protocol", // 4
187 "Protocol-Field-Compression", // 7
188 "Address-and-Control-Field-Compression" // 8
191 CONSTANT(radius_state
,
197 "RADIUSINTERIM", // 5
199 "RADIUSJUSTAUTH" // 7
202 CONSTANT(radius_code
,
204 "Access-Request", // 1
205 "Access-Accept", // 2
206 "Access-Reject", // 3
207 "Accounting-Request", // 4
208 "Accounting-Response", // 5
214 "Access-Challenge", // 11
215 "Status-Server", // 12
216 "Status-Client", // 13
217 0, 0, 0, 0, 0, 0, // 14-19
218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20-29
219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 30-39
220 "Disconnect-Request", // 40
221 "Disconnect-ACK", // 41
222 "Disconnect-NAK", // 42