* Wed Jun 23 2004 David Parrish <david@dparrish.com> 2.0.0
[l2tpns.git] / constants.c
1 #include "constants.h"
2 #include <memory.h>
3
4 const char *lcp_types[MAX_LCP_TYPE+1] = {
5 "Reserved",
6 "Maximum-Receive-Unit",
7 "Async-Control-Map",
8 "Authentication-Protocol",
9 "Quality-Protocol",
10 "Magic-Number",
11 "Reserved 6",
12 "Protocol-Field-Compression",
13 "Address-and-Control-Field-Compression",
14 };
15
16 const char *avpnames[MAX_AVPNAME+1] = {
17 "Message Type", // 0
18 "Result Code", // 1
19 "Protocol Version", // 2
20 "Framing Capabilities", // 3
21 "Bearer Capabilities", // 4
22 "Tie Breaker", // 5
23 "Firmware Revision", // 6
24 "Host Name", // 7
25 "Vendor Name", // 8
26 "Assigned Tunnel ID", // 9
27 "Receive Window Size", // 10
28 "Challenge", // 11
29 "Q.931 Cause Code", // 12
30 "Challenge Response", // 13
31 "Assigned Session ID", // 14
32 "Call Serial Number", // 15
33 "Minimum BPS", // 16
34 "Maximum BPS", // 17
35 "Bearer Type", // 18 (2 = Analog, 1 = Digital)
36 "Framing Type", // 19 (2 = Async, 1 = Sync)
37 "Reserved 20", // 20
38 "Called Number", // 21
39 "Calling Number", // 22
40 "Sub Address", // 23
41 "Tx Connect Speed", // 24
42 "Physical Channel ID", // 25
43 "Initial Received LCP CONFREQ", // 26
44 "Last Sent LCP CONFREQ", // 27
45 "Last Received LCP CONFREQ", // 28
46 "Proxy Authen Type", // 29
47 "Proxy Authen Name", // 30
48 "Proxy Authen Challenge", // 31
49 "Proxy Authen ID", // 32
50 "Proxy Authen Response", // 33
51 "Call Errors", // 34
52 "ACCM", // 35
53 "Random Vector", // 36
54 "Private Group ID", // 37
55 "Rx Connect Speed", // 38
56 "Sequencing Required", // 39
57 };
58
59 const char *stopccn_result_codes[MAX_STOPCCN_RESULT_CODE+1] = {
60 "Reserved",
61 "General request to clear control connection",
62 "General error--Error Code indicates the problem",
63 "Control channel already exists",
64 "Requester is not authorized to establish a control channel",
65 "The protocol version of the requester is not supported",
66 "Requester is being shut down",
67 "Finite State Machine error",
68 };
69
70 const char *cdn_result_codes[MAX_CDN_RESULT_CODE+1] = {
71 "Reserved",
72 "Call disconnected due to loss of carrier",
73 "Call disconnected for the reason indicated in error code",
74 "Call disconnected for administrative reasons",
75 "Call failed due to lack of appropriate facilities being available (temporary condition)",
76 "Call failed due to lack of appropriate facilities being available (permanent condition)",
77 "Invalid destination",
78 "Call failed due to no carrier detected",
79 "Call failed due to detection of a busy signal",
80 "Call failed due to lack of a dial tone",
81 "Call was not established within time allotted by LAC",
82 "Call was connected but no appropriate framing was detected",
83 };
84
85 const char *error_codes[MAX_ERROR_CODE+1] = {
86 "No general error",
87 "No control connection exists yet for this LAC-LNS pair",
88 "Length is wrong",
89 "One of the field values was out of range or reserved field was non-zero",
90 "Insufficient resources to handle this operation now",
91 "The Session ID is invalid in this context",
92 "A generic vendor-specific error occurred in the LAC",
93 "Try another LNS",
94 "Session or tunnel was shutdown due to receipt of an unknown AVP with the M-bit set",
95 };
96
97 const char *authtypes[MAX_AUTHTYPE+1] = {
98 "Reserved",
99 "Textual username/password exchange",
100 "PPP CHAP",
101 "PPP PAP",
102 "No Authentication",
103 "Microsoft CHAP Version 1 (MSCHAPv1)",
104 };
105
106 const char *radius_states[MAX_RADIUS_STATE+1] = {
107 "RADIUSNULL",
108 "RADIUSCHAP",
109 "RADIUSAUTH",
110 "RADIUSIPCP",
111 "RADIUSSTART",
112 "RADIUSSTOP",
113 "RADIUSWAIT",
114 NULL
115 };
116
117 const char *l2tp_message_types[MAX_L2TP_MESSAGE_TYPE+1] = {
118 "reserved",
119 "SCCRQ",
120 "SCCRP",
121 "SCCCN",
122 "StopCCN", // 4
123 "reserved",
124 "HELLO",
125 "OCRQ",
126 "OCRP",
127 "OCCN",
128 "ICRQ", // 10
129 "ICRP",
130 "ICCN",
131 "reserved",
132 "CDN",
133 "WEN", // 15
134 "SLI",
135 };
136