nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* |
2 | ** wimaxasncp_dict.h |
||
3 | ** WIMAXASNCP Dictionary Import Routines |
||
4 | ** |
||
5 | ** (c) 2007, Stephen Croll <stephen.d.croll@gmail.com> |
||
6 | ** |
||
7 | ** This library is free software; you can redistribute it and/or |
||
8 | ** modify it under the terms of the GNU Library General Public |
||
9 | ** License as published by the Free Software Foundation; either |
||
10 | ** version 2 of the License, or (at your option) any later version. |
||
11 | ** |
||
12 | ** This library is distributed in the hope that it will be useful, |
||
13 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
14 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
||
15 | ** Library General Public License for more details. |
||
16 | ** |
||
17 | ** You should have received a copy of the GNU Library General Public |
||
18 | ** License along with this library; if not, write to the |
||
19 | ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
||
20 | ** Boston, MA 02110-1301 USA. |
||
21 | */ |
||
22 | |||
23 | #ifndef _WIMAXASNCP_DICT_H_ |
||
24 | #define _WIMAXASNCP_DICT_H_ |
||
25 | |||
26 | /* ------------------------------------------------------------------------- |
||
27 | * NWG versions |
||
28 | * ------------------------------------------------------------------------- */ |
||
29 | |||
30 | #define WIMAXASNCP_NWGVER_R10_V100 0 |
||
31 | #define WIMAXASNCP_NWGVER_R10_V120 1 |
||
32 | #define WIMAXASNCP_NWGVER_R10_V121 2 |
||
33 | #define WIMAXASNCP_NWGVER_NUM 3 |
||
34 | |||
35 | /* ------------------------------------------------------------------------- |
||
36 | * decode types |
||
37 | * ------------------------------------------------------------------------- */ |
||
38 | |||
39 | enum |
||
40 | { |
||
41 | WIMAXASNCP_TLV_UNKNOWN, |
||
42 | WIMAXASNCP_TLV_TBD, |
||
43 | WIMAXASNCP_TLV_COMPOUND, |
||
44 | WIMAXASNCP_TLV_BYTES, |
||
45 | WIMAXASNCP_TLV_ENUM8, |
||
46 | WIMAXASNCP_TLV_ENUM16, |
||
47 | WIMAXASNCP_TLV_ENUM32, |
||
48 | WIMAXASNCP_TLV_ETHER, |
||
49 | WIMAXASNCP_TLV_ASCII_STRING, |
||
50 | WIMAXASNCP_TLV_FLAG0, |
||
51 | WIMAXASNCP_TLV_BITFLAGS8, |
||
52 | WIMAXASNCP_TLV_BITFLAGS16, |
||
53 | WIMAXASNCP_TLV_BITFLAGS32, |
||
54 | WIMAXASNCP_TLV_ID, |
||
55 | WIMAXASNCP_TLV_HEX8, |
||
56 | WIMAXASNCP_TLV_HEX16, |
||
57 | WIMAXASNCP_TLV_HEX32, |
||
58 | WIMAXASNCP_TLV_DEC8, |
||
59 | WIMAXASNCP_TLV_DEC16, |
||
60 | WIMAXASNCP_TLV_DEC32, |
||
61 | WIMAXASNCP_TLV_IP_ADDRESS, /* Note: IPv4 or IPv6, determined by length */ |
||
62 | WIMAXASNCP_TLV_IPV4_ADDRESS, |
||
63 | WIMAXASNCP_TLV_PROTOCOL_LIST, |
||
64 | WIMAXASNCP_TLV_PORT_RANGE_LIST, |
||
65 | WIMAXASNCP_TLV_IP_ADDRESS_MASK_LIST, |
||
66 | WIMAXASNCP_TLV_EAP, |
||
67 | WIMAXASNCP_TLV_VENDOR_SPECIFIC |
||
68 | }; |
||
69 | |||
70 | /* ------------------------------------------------------------------------- |
||
71 | * structures and functions |
||
72 | * ------------------------------------------------------------------------- */ |
||
73 | |||
74 | struct _wimaxasncp_dict_namecode_t { |
||
75 | gchar *name; |
||
76 | guint code; |
||
77 | struct _wimaxasncp_dict_namecode_t *next; |
||
78 | }; |
||
79 | |||
80 | typedef struct _wimaxasncp_dict_namecode_t wimaxasncp_dict_enum_t; |
||
81 | |||
82 | typedef struct _wimaxasncp_dict_tlv_t { |
||
83 | guint16 type; |
||
84 | gchar *name; |
||
85 | gchar *description; |
||
86 | gint decoder; |
||
87 | guint since; |
||
88 | int hf_root; |
||
89 | int hf_value; |
||
90 | int hf_ipv4; |
||
91 | int hf_ipv6; |
||
92 | int hf_bsid; |
||
93 | int hf_protocol; |
||
94 | int hf_port_low; |
||
95 | int hf_port_high; |
||
96 | int hf_ipv4_mask; |
||
97 | int hf_ipv6_mask; |
||
98 | int hf_vendor_id; |
||
99 | int hf_vendor_rest_of_info; |
||
100 | value_string *enum_vs; |
||
101 | wimaxasncp_dict_enum_t *enums; |
||
102 | struct _wimaxasncp_dict_tlv_t *next; |
||
103 | } wimaxasncp_dict_tlv_t; |
||
104 | |||
105 | typedef struct _wimaxasncp_dict_xmlpi_t { |
||
106 | gchar *name; |
||
107 | gchar *key; |
||
108 | gchar *value; |
||
109 | struct _wimaxasncp_dict_xmlpi_t *next; |
||
110 | } wimaxasncp_dict_xmlpi_t; |
||
111 | |||
112 | typedef struct _wimaxasncp_dict_t { |
||
113 | wimaxasncp_dict_tlv_t *tlvs; |
||
114 | wimaxasncp_dict_xmlpi_t *xmlpis; |
||
115 | } wimaxasncp_dict_t; |
||
116 | |||
117 | extern void wimaxasncp_dict_print( |
||
118 | FILE *fh, wimaxasncp_dict_t *d); |
||
119 | |||
120 | extern wimaxasncp_dict_t *wimaxasncp_dict_scan( |
||
121 | const gchar *system_directory, const gchar *filename, int dbg, |
||
122 | gchar **error); |
||
123 | |||
124 | extern void wimaxasncp_dict_free( |
||
125 | wimaxasncp_dict_t *d); |
||
126 | |||
127 | #endif |