Wireshark  4.3.0
The Wireshark network protocol analyzer
wimaxasncp_dict.h
1 /*
2  ** wimaxasncp_dict.h
3  ** WIMAXASNCP Dictionary Import Routines
4  **
5  ** (c) 2007, Stephen Croll <stephen.d.croll@gmail.com>
6  **
7  ** SPDX-License-Identifier: LGPL-2.0-or-later
8  */
9 
10 #ifndef _WIMAXASNCP_DICT_H_
11 #define _WIMAXASNCP_DICT_H_
12 
13 /* -------------------------------------------------------------------------
14  * NWG versions
15  * ------------------------------------------------------------------------- */
16 
17 #define WIMAXASNCP_NWGVER_R10_V100 0
18 #define WIMAXASNCP_NWGVER_R10_V120 1
19 #define WIMAXASNCP_NWGVER_R10_V121 2
20 #define WIMAXASNCP_NWGVER_NUM 3
21 
22 /* -------------------------------------------------------------------------
23  * decode types
24  * ------------------------------------------------------------------------- */
25 
26 enum
27 {
28  WIMAXASNCP_TLV_UNKNOWN,
29  WIMAXASNCP_TLV_TBD,
30  WIMAXASNCP_TLV_COMPOUND,
31  WIMAXASNCP_TLV_BYTES,
32  WIMAXASNCP_TLV_ENUM8,
33  WIMAXASNCP_TLV_ENUM16,
34  WIMAXASNCP_TLV_ENUM32,
35  WIMAXASNCP_TLV_ETHER,
36  WIMAXASNCP_TLV_ASCII_STRING,
37  WIMAXASNCP_TLV_FLAG0,
38  WIMAXASNCP_TLV_BITFLAGS8,
39  WIMAXASNCP_TLV_BITFLAGS16,
40  WIMAXASNCP_TLV_BITFLAGS32,
41  WIMAXASNCP_TLV_ID,
42  WIMAXASNCP_TLV_HEX8,
43  WIMAXASNCP_TLV_HEX16,
44  WIMAXASNCP_TLV_HEX32,
45  WIMAXASNCP_TLV_DEC8,
46  WIMAXASNCP_TLV_DEC16,
47  WIMAXASNCP_TLV_DEC32,
48  WIMAXASNCP_TLV_IP_ADDRESS, /* Note: IPv4 or IPv6, determined by length */
49  WIMAXASNCP_TLV_IPV4_ADDRESS,
50  WIMAXASNCP_TLV_PROTOCOL_LIST,
51  WIMAXASNCP_TLV_PORT_RANGE_LIST,
52  WIMAXASNCP_TLV_IP_ADDRESS_MASK_LIST,
53  WIMAXASNCP_TLV_EAP,
54  WIMAXASNCP_TLV_VENDOR_SPECIFIC
55 };
56 
57 /* -------------------------------------------------------------------------
58  * structures and functions
59  * ------------------------------------------------------------------------- */
60 
62  char *name;
63  unsigned code;
64  struct _wimaxasncp_dict_namecode_t *next;
65 };
66 
68 
69 typedef struct _wimaxasncp_dict_tlv_t {
70  uint16_t type;
71  char *name;
72  char *description;
73  int decoder;
74  unsigned since;
75  int hf_root;
76  int hf_value;
77  int hf_ipv4;
78  int hf_ipv6;
79  int hf_bsid;
80  int hf_protocol;
81  int hf_port_low;
82  int hf_port_high;
83  int hf_ipv4_mask;
84  int hf_ipv6_mask;
85  int hf_vendor_id;
86  int hf_vendor_rest_of_info;
87  value_string *enum_vs;
89  struct _wimaxasncp_dict_tlv_t *next;
91 
92 typedef struct _wimaxasncp_dict_xmlpi_t {
93  char *name;
94  char *key;
95  char *value;
96  struct _wimaxasncp_dict_xmlpi_t *next;
98 
99 typedef struct _wimaxasncp_dict_t {
100  wimaxasncp_dict_tlv_t *tlvs;
101  wimaxasncp_dict_xmlpi_t *xmlpis;
103 
104 extern void wimaxasncp_dict_print(
105  FILE *fh, wimaxasncp_dict_t *d);
106 
107 extern wimaxasncp_dict_t *wimaxasncp_dict_scan(
108  const char *system_directory, const char *filename, int dbg,
109  char **error);
110 
111 extern void wimaxasncp_dict_free(
112  wimaxasncp_dict_t *d);
113 
114 #endif
Definition: value_string.h:26
Definition: wimaxasncp_dict.h:61
Definition: wimaxasncp_dict.h:99
Definition: wimaxasncp_dict.h:69
Definition: wimaxasncp_dict.h:92