Add a manual page explaining the format of /etc/manpath.config.
[dragonfly/vkernel-mp.git] / usr.sbin / i4b / isdntrace / pcause_q850.c
blob1cebc567186ddf48ee616fb81dc9f589f0b68e76
1 /*
2 * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
25 *---------------------------------------------------------------------------
27 * printing cause values
28 * ---------------------
30 * $Id: pcause_q850.c,v 1.6 1999/12/13 21:25:26 hm Exp $
32 * $FreeBSD: src/usr.sbin/i4b/isdntrace/pcause_q850.c,v 1.6.2.1 2001/08/01 17:45:08 obrien Exp $
33 * $DragonFly: src/usr.sbin/i4b/isdntrace/pcause_q850.c,v 1.2 2003/06/17 06:29:55 dillon Exp $
35 * last edit-date: [Mon Dec 13 21:56:18 1999]
37 *---------------------------------------------------------------------------*/
39 #include "trace.h"
40 #include "pcause_q850.h"
42 char *
43 print_cause_q850(unsigned char code)
45 static char error_message[120];
46 char *e;
48 switch(code)
50 case CAUSE_Q850_SHUTDN:
51 e = "normal D-channel shutdown";
52 break;
54 case CAUSE_Q850_NUNALLC:
55 e = "Unallocated (unassigned) number";
56 break;
58 case CAUSE_Q850_NRTTN:
59 e = "No route to specified transit network";
60 break;
62 case CAUSE_Q850_NRTDST:
63 e = "No route to destination";
64 break;
66 case CAUSE_Q850_SSINFTN:
67 e = "Send special information tone";
68 break;
70 case CAUSE_Q850_MDIALTP:
71 e = "Misdialled trunk prefix";
72 break;
74 case CAUSE_Q850_CHUNACC:
75 e = "Channel unacceptable";
76 break;
78 case CAUSE_Q850_CALLAWD:
79 e = "Call awarded and being delivered in an established channel";
80 break;
82 case CAUSE_Q850_PREEMPT:
83 e = "Preemption";
84 break;
86 case CAUSE_Q850_PREECRR:
87 e = "Preemption - circuit reserved for reuse";
88 break;
90 case CAUSE_Q850_NCCLR:
91 e = "Normal call clearing";
92 break;
94 case CAUSE_Q850_USRBSY:
95 e = "User busy";
96 break;
98 case CAUSE_Q850_NOUSRRSP:
99 e = "No user responding";
100 break;
102 case CAUSE_Q850_NOANSWR:
103 e = "No answer from user (user alerted)";
104 break;
106 case CAUSE_Q850_SUBSABS:
107 e = "Subscriber absent";
108 break;
110 case CAUSE_Q850_CALLREJ:
111 e = "Call rejected";
112 break;
114 case CAUSE_Q850_NUCHNG:
115 e = "Number changed";
116 break;
118 case CAUSE_Q850_NONSELUC:
119 e = "Non-selected user clearing";
120 break;
122 case CAUSE_Q850_DSTOOORDR:
123 e = "Destination out of order";
124 break;
126 case CAUSE_Q850_INVNUFMT:
127 e = "Invalid number format";
128 break;
130 case CAUSE_Q850_FACREJ:
131 e = "Facility rejected";
132 break;
134 case CAUSE_Q850_STENQRSP:
135 e = "Response to STATUS ENQUIRY";
136 break;
138 case CAUSE_Q850_NORMUNSP:
139 e = "Normal, unspecified";
140 break;
142 case CAUSE_Q850_NOCAVAIL:
143 e = "No circuit / channel available";
144 break;
146 case CAUSE_Q850_NETOOORDR:
147 e = "Network out of order";
148 break;
150 case CAUSE_Q850_PFMCDOOSERV:
151 e = "Permanent frame mode connection out of service";
152 break;
154 case CAUSE_Q850_PFMCOPER:
155 e = "Permanent frame mode connection operational";
156 break;
158 case CAUSE_Q850_TMPFAIL:
159 e = "Temporary failure";
160 break;
162 case CAUSE_Q850_SWEQCONG:
163 e = "Switching equipment congestion";
164 break;
166 case CAUSE_Q850_ACCINFDIS:
167 e = "Access information discarded";
168 break;
170 case CAUSE_Q850_REQCNOTAV:
171 e = "Requested circuit/channel not available";
172 break;
174 case CAUSE_Q850_PRECALBLK:
175 e = "Precedence call blocked";
176 break;
178 case CAUSE_Q850_RESUNAVAIL:
179 e = "Resources unavailable, unspecified";
180 break;
182 case CAUSE_Q850_QOSUNAVAIL:
183 e = "Quality of service unavailable";
184 break;
186 case CAUSE_Q850_REQSERVNS:
187 e = "Requested facility not subscribed";
188 break;
190 case CAUSE_Q850_OCBARRCUG:
191 e = "Outgoing calls barred within CUG";
192 break;
194 case CAUSE_Q850_ICBARRCUG:
195 e = "Incoming calls barred within CUG";
196 break;
198 case CAUSE_Q850_BCAPNAUTH:
199 e = "Bearer capability not authorized";
200 break;
202 case CAUSE_Q850_BCAPNAVAIL:
203 e = "Bearer capability not presently available";
204 break;
206 case CAUSE_Q850_INCSTOACISC:
207 e = "Inconsistenciy in designated outg. access info and subscriber class";
208 break;
210 case CAUSE_Q850_SOONOTAVAIL:
211 e = "Service or option not available, unspecified";
212 break;
214 case CAUSE_Q850_BCAPNOTIMPL:
215 e = "Bearer capability not implemented";
216 break;
218 case CAUSE_Q850_CHTYPNIMPL:
219 e = "Channel type not implemented";
220 break;
222 case CAUSE_Q850_REQFACNIMPL:
223 e = "Requested facility not implemented";
224 break;
226 case CAUSE_Q850_ORDINBCAVL:
227 e = "Only restricted digital information bearer capability is available";
228 break;
230 case CAUSE_Q850_SOONOTIMPL:
231 e = "Service or option not implemented, unspecified";
232 break;
234 case CAUSE_Q850_INVCLRFVAL:
235 e = "Invalid call reference value";
236 break;
238 case CAUSE_Q850_IDCHDNOEX:
239 e = "Identified channel does not exist";
240 break;
242 case CAUSE_Q850_SUSCAEXIN:
243 e = "A suspended call exists, but this call identity does not";
244 break;
246 case CAUSE_Q850_CLIDINUSE:
247 e = "Call identity in use";
248 break;
250 case CAUSE_Q850_NOCLSUSP:
251 e = "No call suspended";
252 break;
254 case CAUSE_Q850_CLIDCLRD:
255 e = "Call having the requested call identity has been cleared";
256 break;
258 case CAUSE_Q850_UNOTMEMCUG:
259 e = "User not member of CUG";
260 break;
262 case CAUSE_Q850_INCDEST:
263 e = "Incompatible destination";
264 break;
266 case CAUSE_Q850_NONEXCUG:
267 e = "Non-existent CUG";
268 break;
270 case CAUSE_Q850_INVNTWSEL:
271 e = "Invalid transit network selection";
272 break;
274 case CAUSE_Q850_INVMSG:
275 e = "Invalid message, unspecified";
276 break;
278 case CAUSE_Q850_MIEMISS:
279 e = "Mandatory information element is missing";
280 break;
282 case CAUSE_Q850_MSGTNI:
283 e = "Message type non-existent or not implemented";
284 break;
286 case CAUSE_Q850_MSGNCMPT:
287 e = "Msg incompatible with call state/message type non-existent/not implemented";
288 break;
290 case CAUSE_Q850_IENENI:
291 e = "Information element/parameter non-existent or not implemented";
292 break;
294 case CAUSE_Q850_INVIEC:
295 e = "Invalid information element contents";
296 break;
298 case CAUSE_Q850_MSGNCWCS:
299 e = "Message not compatible with call state";
300 break;
302 case CAUSE_Q850_RECOTIMEXP:
303 e = "Recovery on timer expiry";
304 break;
306 case CAUSE_Q850_PARMNENIPO:
307 e = "Parameter non-existent or not implemented, passed on";
308 break;
310 case CAUSE_Q850_MSGUNRDPRM:
311 e = "Message with unrecognized parameter, discarded";
312 break;
314 case CAUSE_Q850_PROTERR:
315 e = "Protocol error, unspecified";
316 break;
318 case CAUSE_Q850_INTWRKU:
319 e = "Interworking, unspecified";
320 break;
322 default:
323 e = "ERROR, unknown cause value!";
324 break;
327 sprintf(error_message, "%d: %s (Q.850)", code, e);
328 return(error_message);
331 /* EOF */