kernel: Sync ACPICA with Intel's version 20140424.
[dragonfly.git] / sys / netproto / atm / uni / unisig_decode.h
1 /*
2  *
3  * ===================================
4  * HARP  |  Host ATM Research Platform
5  * ===================================
6  *
7  *
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.
12  *
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.
20  *
21  * Copyright 1994-1998 Network Computing Services, Inc.
22  *
23  * Copies of this Software may be made, however, the above copyright
24  * notice must be reproduced on all copies.
25  *
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 $
28  *
29  */
30
31 /*
32  * ATM Forum UNI 3.0/3.1 Signalling Manager
33  * ----------------------------------------
34  *
35  * Message formats
36  *
37  */
38
39 #ifndef _UNI_SIG_DECODE_H
40 #define _UNI_SIG_DECODE_H
41
42
43 /*
44  * Values specifying which IEs are required in messages
45  */
46 #define IE_NA   0
47 #define IE_MAND 1
48 #define IE_OPT  2
49
50 /*
51  * Structure for information element decoding information
52  */
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 *);
60 };
61
62 /*
63  * Macro to give the offset of a field in a generic IE structure
64  */
65 #define IE_OFFSET(f) \
66         ((int)&((struct ie_generic *) 0)->f)
67
68 /*
69  * Macro to give the size of a field in a generic IE structure
70  */
71 #define IE_FSIZE(f) \
72         (sizeof(((struct ie_generic *) 0)->f))
73
74 #define IE_OFF_SIZE(f)   IE_OFFSET(f),IE_FSIZE(f)
75
76
77 /*
78  * Structure to define a field-driven decoding table (for AAL
79  * parameters and ATM user cell rate IEs)
80  */
81 struct ie_decode_tbl {
82         u_char  ident;
83         int     len;
84         int     f_offs;
85         int     f_size;
86 };
87
88 #endif /* _UNI_SIG_DECODE_H */