fetch.9: Minor fixes.
[dragonfly.git] / sys / netproto / atm / uni / unisig_decode.h
blob4bbbcb699799596cb75654e33e08630055f46aa9
1 /*
3 * ===================================
4 * HARP | Host ATM Research Platform
5 * ===================================
8 * This Host ATM Research Platform ("HARP") file (the "Software") is
9 * made available by Network Computing Services, Inc. ("NetworkCS")
10 * "AS IS". NetworkCS does not provide maintenance, improvements or
11 * support of any kind.
13 * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
14 * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
15 * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
16 * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
17 * In no event shall NetworkCS be responsible for any damages, including
18 * but not limited to consequential damages, arising from or relating to
19 * any use of the Software or related support.
21 * Copyright 1994-1998 Network Computing Services, Inc.
23 * Copies of this Software may be made, however, the above copyright
24 * notice must be reproduced on all copies.
26 * @(#) $FreeBSD: src/sys/netatm/uni/unisig_decode.h,v 1.2 1999/08/28 00:49:05 peter Exp $
27 * @(#) $DragonFly: src/sys/netproto/atm/uni/unisig_decode.h,v 1.3 2003/08/23 10:06:22 rob Exp $
32 * ATM Forum UNI 3.0/3.1 Signalling Manager
33 * ----------------------------------------
35 * Message formats
39 #ifndef _UNI_SIG_DECODE_H
40 #define _UNI_SIG_DECODE_H
44 * Values specifying which IEs are required in messages
46 #define IE_NA 0
47 #define IE_MAND 1
48 #define IE_OPT 2
51 * Structure for information element decoding information
53 struct ie_ent {
54 u_char ident; /* IE identifier */
55 int min_len; /* Min. length */
56 int max_len; /* Max. length */
57 int p_idx; /* IE pointer index in msg */
58 int (*decode) /* Decoding function */
59 (struct usfmt *, struct ie_generic *);
63 * Macro to give the offset of a field in a generic IE structure
65 #define IE_OFFSET(f) \
66 ((int)&((struct ie_generic *) 0)->f)
69 * Macro to give the size of a field in a generic IE structure
71 #define IE_FSIZE(f) \
72 (sizeof(((struct ie_generic *) 0)->f))
74 #define IE_OFF_SIZE(f) IE_OFFSET(f),IE_FSIZE(f)
78 * Structure to define a field-driven decoding table (for AAL
79 * parameters and ATM user cell rate IEs)
81 struct ie_decode_tbl {
82 u_char ident;
83 int len;
84 int f_offs;
85 int f_size;
88 #endif /* _UNI_SIG_DECODE_H */