Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / net / i4b / include / i4b_isdnq931.h
1 /*
2  * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved.
3  *
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.
12  *
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.
24  *
25  *---------------------------------------------------------------------------
26  *
27  *      i4b_isdnq931.h - DSS1 layer 3 message types
28  *      -------------------------------------------
29  *
30  *      $Id: i4b_isdnq931.h,v 1.7 2000/04/27 07:42:43 hm Exp $
31  *
32  * $FreeBSD: src/sys/i4b/include/i4b_isdnq931.h,v 1.6.2.1 2001/08/10 14:08:36 obrien Exp $
33  *
34  *      last edit-date: [Thu Apr 27 09:46:13 2000]
35  *
36  *---------------------------------------------------------------------------*/
37
38 /* protocol discriminators */
39
40 #define PD_Q931         0x08    /* Q.931/I.451                          */
41
42 /* Q.931 single octett information element identifiers */
43
44 #define IEI_SENDCOMPL   0xa1    /* sending complete                     */
45
46 /* Q.931 variable length information element identifiers */
47
48 #define IEI_SEGMMSG     0x00    /* segmented message                    */
49 #define IEI_BEARERCAP   0x04    /* bearer capabilities                  */
50 #define IEI_CAUSE       0x08    /* cause                                */
51 #define IEI_CALLID      0x10    /* call identity                        */
52 #define IEI_CALLSTATE   0x14    /* call state                           */
53 #define IEI_CHANNELID   0x18    /* channel identification               */
54 #define IEI_PROGRESSI   0x1e    /* progress indicator                   */
55 #define IEI_NETSPCFAC   0x20    /* network specific facilities          */
56 #define IEI_NOTIFIND    0x27    /* notification indicator               */
57 #define IEI_DISPLAY     0x28    /* display                              */
58 #define IEI_DATETIME    0x29    /* date/time                            */
59 #define IEI_KEYPAD      0x2c    /* keypad facility                      */
60 #define IEI_SIGNAL      0x34    /* signal                               */
61 #define IEI_INFRATE     0x40    /* information rate                     */
62 #define IEI_ETETDEL     0x42    /* end to end transit delay             */
63 #define IEI_TDELSELIND  0x43    /* transit delay selection and indication */
64 #define IEI_PLBPARMS    0x44    /* packet layer binary parameters       */
65 #define IEI_PLWSIZE     0x45    /* packet layer window size             */
66 #define IEI_PSIZE       0x46    /* packet size                          */
67 #define IEI_CUG         0x47    /* closed user group                    */
68 #define IEI_REVCHRGI    0x4a    /* reverse charge indication            */
69 #define IEI_CALLINGPN   0x6c    /* calling party number                 */
70 #define IEI_CALLINGPS   0x6d    /* calling party subaddress             */
71 #define IEI_CALLEDPN    0x70    /* called party number                  */
72 #define IEI_CALLEDPS    0x71    /* called party subaddress              */
73 #define IEI_REDIRNO     0x74    /* redirecting number                   */
74 #define IEI_TRNSEL      0x78    /* transit network selection            */
75 #define IEI_RESTARTI    0x79    /* restart indicator                    */
76 #define IEI_LLCOMPAT    0x7c    /* low layer compatibility              */
77 #define IEI_HLCOMPAT    0x7d    /* high layer compatibility             */
78 #define IEI_USERUSER    0x7e    /* user-user                            */
79 #define IEI_ESCAPE      0x7f    /* escape for extension                 */
80
81 /* Q.932 variable length information element identifiers */
82
83 #define IEI_EXTFAC      0x0d    /* extended facility                    */
84 #define IEI_FACILITY    0x1c    /* facility                             */
85 #define IEI_INFOREQ     0x32    /* information request                  */
86 #define IEI_FEATACT     0x38    /* feature activation                   */
87 #define IEI_FEATIND     0x39    /* feature indication                   */
88 #define IEI_SERVPID     0x3a    /* service profile identification       */
89 #define IEI_ENDPTID     0x3b    /* endpoint identifier                  */
90
91 /* Q.933 variable length information element identifiers */
92
93 #define IEI_DATALCID    0x19    /* data link connection identifier      */
94 #define IEI_LLCOREP     0x48    /* link layer core parameters           */
95 #define IEI_LLPROTP     0x49    /* link layer protocol parameters       */
96 #define IEI_X213PRI     0x50    /* X.213 priority                       */
97 #define IEI_REPORTT     0x51    /* report type                          */
98 #define IEI_LNKITYVERF  0x53    /* link integrity verification          */
99 #define IEI_PVCSTAT     0x57    /* PVC status                           */
100
101 /* Q.95x variable length information element identifiers */
102
103 #define IEI_PRECLEV     0x41    /* precedence level                     */
104 #define IEI_CONCTDNO    0x4c    /* connected number                     */
105 #define IEI_CONCTDSA    0x4d    /* connected subaddress                 */
106 #define IEI_REDICNNO    0x76    /* redirection number                   */
107
108 /* single octett information elements */
109
110 #define SOIE_SHIFT      0x90    /* shift codeset                        */
111 #define  SHIFT_LOCK     0x08    /* shift codeset, locking shift bit     */
112 #define SOIE_MDSC       0xa0    /* more data AND/OR sending complete    */
113 #define SOIE_SENDC      0xa1    /* sending complete                     */
114 #define SOIE_CONGL      0xb0    /* congestion level                     */
115 #define SOIE_REPTI      0xd0    /* repeat indicator                     */
116
117 /* codesets */
118
119 #define CODESET_0       0       /* codeset 0, normal DSS1 codeset       */
120
121 /* Q.931/Q.932 message types (see Q.931 03/93 p10 and p311) */
122
123 /* call establishment messages */
124
125 #define ALERT                   0x01
126 #define CALL_PROCEEDING         0x02
127 #define PROGRESS                0x03
128 #define SETUP                   0x05
129 #define CONNECT                 0x07
130 #define SETUP_ACKNOWLEDGE       0x0d
131 #define CONNECT_ACKNOWLEDGE     0x0f
132
133 /* call information phase messages */
134
135 #define USER_INFORMATION        0x20
136 #define SUSPEND_REJECT          0x21
137 #define RESUME_REJECT           0x22
138 #define HOLD                    0x24
139 #define SUSPEND                 0x25
140 #define RESUME                  0x26
141 #define HOLD_ACKNOWLEDGE        0x28
142 #define SUSPEND_ACKNOWLEDGE     0x2d
143 #define RESUME_ACKNOWLEDGE      0x2e
144 #define HOLD_REJECT             0x30
145 #define RETRIEVE                0x31
146 #define RETRIEVE_ACKNOWLEDGE    0x32
147 #define RETRIEVE_REJECT         0x37
148
149 /* call clearing */
150
151 #define DISCONNECT              0x45
152 #define RESTART                 0x46
153 #define RELEASE                 0x4d
154 #define RESTART_ACKNOWLEDGE     0x4e
155 #define RELEASE_COMPLETE        0x5a
156
157 /* misc messages */
158
159 #define SEGMENT                 0x60
160 #define FACILITY                0x62
161 #define REGISTER                0x64
162 #define NOTIFY                  0x6e
163 #define STATUS_ENQUIRY          0x75
164 #define CONGESTION_CONTROL      0x79
165 #define INFORMATION             0x7b
166 #define STATUS                  0x7d
167
168 /* EOF */