2 .\" Copyright (c) 2004-2005
4 .\" All rights reserved.
5 .\" Copyright (c) 2001-2003
6 .\" Fraunhofer Institute for Open Communication Systems (FhG Fokus).
7 .\" All rights reserved.
9 .\" Author: Hartmut Brandt <harti@freebsd.org>
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\" notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\" notice, this list of conditions and the following disclaimer in the
18 .\" documentation and/or other materials provided with the distribution.
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" $Begemot: libunimsg/man/unistruct.3,v 1.5 2005/06/15 11:37:12 brandt_h Exp $
39 .Nd "ATM signalling library"
41 Begemot ATM signalling library
44 .In netnatm/msg/unistruct.h
45 .In netnatm/msg/unimsglib.h
49 library handles UNI 4.0 messages.
50 For each information element and message
51 type the header files contain a structure definition.
53 are a number of help structures and a global context structure for some
54 of the library functions.
55 This document only describes the common structures.
56 For information element and message structures see the header files.
57 .Ss LIBRARY CONFIGURATION
58 When the library is compiled a number of constants are define in the file
60 They define certain limits.
61 Because of the use of these definitions a change
62 in any of them requires a complete recompilation of all library code and
63 all code that uses the library.
64 The following constants are defined (they
65 value behind the name is the default value):
67 .It Dv UNI_MAX_ERRIE ( Li 50 )
68 When decoding information elements and analyzing them the library fills
69 an array in the context with the identifiers of IEs that had errors.
70 This is the size of this array.
71 .It Dv UNI_NUM_IE_GIT ( Li 3 )
72 A message is allowed to contain more than one General Identifier Transport
74 This is the maximum supported number of these IEs.
75 .It Dv UNI_NUM_IE_BLLI ( Li 3 )
76 The maximum number of BLLI information elements in a SETUP message.
77 .It Dv UNI_NUM_IE_CALLEDSUB ( Li 2 )
78 The maximum number of Called Subaddress information elements in a SETUP message.
79 .It Dv UNI_NUM_IE_CALLINGSUB ( Li 2 )
80 The maximum number of Calling Subaddress information elements in a SETUP
82 .It Dv UNI_NUM_IE_TNS ( Li 4 )
83 The maximum number of Transit Network Selection information elements in a SETUP
85 .It Dv UNI_TNS_MAXLEN ( Li 4 )
86 The maximum size of a name in the TNS IE.
87 .It Dv UNI_UU_MAXLEN ( Li 128 )
88 Maximum size of user data in the UU IE.
89 .It Dv UNI_ADDR_MAXLEN ( Li 20 )
91 .It Dv UNI_SUBADDR_MAXLEN ( Li 20 )
92 Maximum subaddress size.
93 .It Dv UNI_NUM_IE_DTL ( Li 10 )
94 Maximum number of DTL information elements in a SETUP message.
95 .It Dv UNI_DTL_MAXNUM ( Li 20 )
96 Maximum number of identifiers in one DTL information element.
98 .Ss INFORMATION ELEMENTS
99 Each information element structure starts with a field of type:
100 .Bd -literal -offset indent
102 enum uni_coding coding; /* coding standard */
103 enum uni_ieact act; /* action indicator */
104 u_int pass:1; /* PNNI pass along request */
105 u_int present;/* which optional elements are present */
111 field is the coding standard of the information element and may be one of
117 is used for error processing and is one of:
119 .It Dv UNI_IEACT_CLEAR
121 .It Dv UNI_IEACT_IGNORE
122 ignore IE and proceed
123 .It Dv UNI_IEACT_REPORT
124 ignore IE, report and proceed
125 .It Dv UNI_IEACT_MSG_IGNORE
127 .It Dv UNI_IEACT_MSG_REPORT
128 ignore message and report
129 .It Dv UNI_IEACT_DEFAULT
130 the use action indicator flag was not set.
133 For information elements in PNNI message the
135 fields contains the pass along flag from the IE header.
139 field is a bit field, which contains four common bits describing the current
140 state of the information element.
141 The rest of the bits are used by the
142 information elements to indicate which of the optional fields of the IE are
144 Most of the IE header files contain definitions for those bits.
146 .Bd -literal -offset indent
147 #define UNI_IE_EMPTY 0x80000000
148 #define UNI_IE_PRESENT 0x40000000
149 #define UNI_IE_ERROR 0x20000000
150 #define UNI_IE_XXX 0x10000000
155 indicates that the information element is present, but empty (its length is
157 This is legal for all information elements.
160 indicates that the IE is present in the message and the flag
162 indicates that the IE had an error.
165 is currently not used.
167 The following macros may be used to test or change these flags:
170 Check whether the IE is present and not empty.
171 Returns true in this case.
173 Set the IE to be present and not empty.
175 Check whether the IE is present and empty.
176 Returns true in this case.
178 Set the IE to be present and empty.
180 Check whether the IE is present and has an error.
181 Returns true in this case.
183 Sets the IE to be present and to have an error.
185 Checks whether the IE is present, not empty and without error.
186 Returns true in this case.
189 For each IE type there is an
191 definition of the form
199 that is the union of all IE structures and a
200 .Bd -literal -offset indent
202 enum uni_ietype ietype;
207 Each message structure starts with a
208 .Bd -literal -offset indent
210 struct uni_cref cref;
211 enum uni_msgact act; /* action indicator */
212 u_int pass:1; /* PNNI pass along request */
218 is the call reference:
219 .Bd -literal -offset indent
226 There are two special call references:
232 field is the message action indicator and has one of the following values:
234 .It Dv UNI_MSGACT_CLEAR
236 .It Dv UNI_MSGACT_IGNORE
238 .It Dv UNI_MSGACT_REPORT
240 .It Dv UNI_MSGACT_DEFAULT
241 default handling for this message type
246 field is the pass along indicator in the case of PNNI messages.
248 For each message type there is a
250 definition of the form
257 that is the union of all message structures and a
258 .Bd -literal -offset indent
260 enum uni_msgtype mtype;
267 contains a definition of a
268 .Vt struct uni_context
269 that is used to minimize the number of arguments passed to certain functions
270 and to avoid the use of global variables.
271 This structure has the following
272 public fields (all other fields are used internally by the library):
275 This is an array consisting of the following structures:
276 .Bd -literal -offset indent
278 enum uni_ierr_type err; /* what error */
279 enum uni_ieact act; /* the action indicator */
280 u_int ie:8; /* the ie type */
281 u_int man:1; /* mandatory flag */
282 u_int epref:1;/* Q.2971 9.5.3.2.1 low-pri epref */
285 When decoding information elements the information about IEs with errors is
286 stuffed into this array.
288 The current number of IEs in
291 Enable the Q.2932.1 Generic Functional Protocol.
292 Currently only message
293 and IE decoding/encoding is supported.
294 The signalling part is still missing.
296 Enable PNNI extensions.
297 Currently only message and IE decoding/encoding
299 The signalling part is still missing.
301 Do hard checking on GIT information elements.
303 Do hard checking on Broadband Bearer IEs.
304 This involves rejecting old bearer
307 Do hard checking on Cause information elements.
309 This is used by the printing routines.
310 Legal values are 0 to 4 and give
311 different kinds of printout.
313 The size of tabulation to use in printing.
319 This implementation conforms to the applicable ITU-T
320 recommendations and ATM Forum standards with the exception of some limitations
321 (see the Configuration section).
323 .An Hartmut Brandt Aq harti@freebsd.org