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