Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

osi-utils.h
1 /* osi-utils.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10 #ifndef __OSI_UTILS_H__
11 #define __OSI_UTILS_H__
12
13 /* OSI Global defines, common for all OSI protocols */
14
15 #define MAX_NSAP_LEN 30
16 #define MAX_SYSTEMID_LEN 15
17 #define MAX_AREA_LEN 30
18
19 #define RFC1237_NSAP_LEN 20
20 #define RFC1237_FULLAREA_LEN 13
21 #define RFC1237_SYSTEMID_LEN 6
22 #define RFC1237_SELECTOR_LEN 1
23
24 #define RFC1237_IDI_LEN 2
25 #define RFC1237_AFI_LEN 1
26 #define RFC1237_DFI_LEN 1
27 #define RFC1237_ORG_LEN 3
28 #define RFC1237_AA_LEN 3
29 #define RFC1237_RSVD_LEN 2
30 #define RFC1237_RD_LEN 2
31 #define RFC1237_AREA_LEN 3
32
33 /*
34 * NSAP AFI values.
35 * See ISO/IEC 8348 (2001-10)/X.213 (10/2001) Annex A.
36 *
37 * Individual values.
38 */
39 #define NSAP_IDI_IANA_ICP_DEC 0x34 /* IANA ICP, decimal */
40 #define NSAP_IDI_IANA_ICP_BIN 0x35 /* IANA ICP, binary */
41 #define NSAP_IDI_X_121_DEC_FSD_NZ 0x36 /* X.121, decimal, IDI first significant digit non-zero */
42 #define NSAP_IDI_X_121_BIN_FSD_NZ 0x37 /* X.121, binary, IDI first significant digit non-zero */
43 #define NSAP_IDI_ISO_DCC_DEC 0x38 /* ISO DCC, decimal */
44 #define NSAP_IDI_ISO_DCC_BIN 0x39 /* ISO DCC, binary */
45 #define NSAP_IDI_F_69_DEC_FSD_NZ 0x40 /* F.69, decimal, IDI first significant digit non-zero */
46 #define NSAP_IDI_F_69_BIN_FSD_NZ 0x41 /* F.69, binary, IDI first significant digit non-zero */
47 #define NSAP_IDI_E_163_DEC_FSD_NZ 0x42 /* E.163, decimal, IDI first significant digit non-zero */
48 #define NSAP_IDI_E_163_BIN_FSD_NZ 0x43 /* E.163, binary, IDI first significant digit non-zero */
49 #define NSAP_IDI_E_164_DEC_FSD_NZ 0x44 /* E.163, decimal, IDI first significant digit non-zero */
50 #define NSAP_IDI_E_164_BIN_FSD_NZ 0x45 /* E.163, binary, IDI first significant digit non-zero */
51 #define NSAP_IDI_ISO_6523_ICD_DEC 0x46 /* ISO 6523-ICD, decimal */
52 #define NSAP_IDI_ISO_6523_ICD_BIN 0x47 /* ISO 6523-ICD, binary */
53 //#define NSAP_IDI_GOSIP2 0x47
54 #define NSAP_IDI_LOCAL_DEC 0x48 /* Local, decimal */
55 #define NSAP_IDI_LOCAL_BIN 0x49 /* Local, binary */
56 #define NSAP_IDI_LOCAL_ISO_646_CHAR 0x50 /* Local, ISO/IEC 646 character */
57 #define NSAP_IDI_LOCAL_NATIONAL_CHAR 0x51 /* Local, national character */
58 #define NSAP_IDI_X_121_DEC_FSD_Z 0x52 /* X.121, decimal, IDI first significant digit zero */
59 #define NSAP_IDI_X_121_BIN_FSD_Z 0x53 /* X.121, binary, IDI first significant digit zero */
60 #define NSAP_IDI_F_69_DEC_FSD_Z 0x54 /* F.69, decimal, IDI first significant digit zero */
61 #define NSAP_IDI_F_69_BIN_FSD_Z 0x55 /* F.69, binary, IDI first significant digit zero */
62 #define NSAP_IDI_E_163_DEC_FSD_Z 0x56 /* E.163, decimal, IDI first significant digit zero */
63 #define NSAP_IDI_E_163_BIN_FSD_Z 0x57 /* E.163, binary, IDI first significant digit zero */
64 #define NSAP_IDI_E_164_DEC_FSD_Z 0x58 /* E.163, decimal, IDI first significant digit zero */
65 #define NSAP_IDI_E_164_BIN_FSD_Z 0x59 /* E.163, binary, IDI first significant digit zero */
66 #define NSAP_IDI_ITU_T_IND_DEC 0x76 /* ITU-T IND, decimal */
67 #define NSAP_IDI_ITU_T_IND_BIN 0x77 /* ITU-T IND, binary */
68
69 /*
70 * Group values.
71 */
72 #define NSAP_IDI_IANA_ICP_DEC_GROUP 0xB8 /* IANA ICP, decimal */
73 #define NSAP_IDI_IANA_ICP_BIN_GROUP 0xB9 /* IANA ICP, binary */
74 #define NSAP_IDI_X_121_DEC_FSD_NZ_GROUP 0xBA /* X.121, decimal */
75 #define NSAP_IDI_X_121_BIN_FSD_NZ_GROUP 0xBB /* X.121, binary */
76 #define NSAP_IDI_ISO_DCC_DEC_GROUP 0xBC /* ISO DCC, decimal */
77 #define NSAP_IDI_ISO_DCC_BIN_GROUP 0xBD /* ISO DCC, binary */
78 #define NSAP_IDI_F_69_DEC_FSD_NZ_GROUP 0xBE /* F.69, decimal */
79 #define NSAP_IDI_F_69_BIN_FSD_NZ_GROUP 0xBF /* F.69, binary */
80 #define NSAP_IDI_E_163_DEC_FSD_NZ_GROUP 0xC0 /* E.163, decimal */
81 #define NSAP_IDI_E_163_BIN_FSD_NZ_GROUP 0xC1 /* E.163, binary */
82 #define NSAP_IDI_E_164_DEC_FSD_NZ_GROUP 0xC2 /* E.163, decimal */
83 #define NSAP_IDI_E_164_BIN_FSD_NZ_GROUP 0xC3 /* E.163, binary */
84 #define NSAP_IDI_ISO_6523_ICD_DEC_GROUP 0xC4 /* ISO 6523-ICD, decimal */
85 #define NSAP_IDI_ISO_6523_ICD_BIN_GROUP 0xC5 /* ISO 6523-ICD, binary */
86 #define NSAP_IDI_LOCAL_DEC_GROUP 0xC6 /* Local, decimal */
87 #define NSAP_IDI_LOCAL_BIN_GROUP 0xC7 /* Local, binary */
88 #define NSAP_IDI_LOCAL_ISO_646_CHAR_GROUP 0xC8 /* Local, ISO/IEC 646 character */
89 #define NSAP_IDI_LOCAL_NATIONAL_CHAR_GROUP 0xC9 /* Local, national character */
90 #define NSAP_IDI_X_121_DEC_FSD_Z_GROUP 0xCA /* X.121, decimal, IDI first significant digit zero */
91 #define NSAP_IDI_X_121_BIN_FSD_Z_GROUP 0xCB /* X.121, binary, IDI first significant digit zero */
92 #define NSAP_IDI_F_69_DEC_FSD_Z_GROUP 0xCC /* F.69, decimal, IDI first significant digit zero */
93 #define NSAP_IDI_F_69_BIN_FSD_Z_GROUP 0xCD /* F.69, binary, IDI first significant digit zero */
94 #define NSAP_IDI_E_163_DEC_FSD_Z_GROUP 0xCE /* E.163, decimal, IDI first significant digit zero */
95 #define NSAP_IDI_E_163_BIN_FSD_Z_GROUP 0xCF /* E.163, binary, IDI first significant digit zero */
96 #define NSAP_IDI_E_164_DEC_FSD_Z_GROUP 0xD0 /* E.163, decimal, IDI first significant digit zero */
97 #define NSAP_IDI_E_164_BIN_FSD_Z_GROUP 0xD1 /* E.163, binary, IDI first significant digit zero */
98 #define NSAP_IDI_ITU_T_IND_DEC_GROUP 0xE2 /* ITU-T IND, decimal */
99 #define NSAP_IDI_ITU_T_IND_BIN_GROUP 0xE3 /* ITU-T IND, binary */
100
101 gchar* print_nsap_net ( tvbuff_t *, const gint, int );
102 gchar* print_area ( tvbuff_t *, const gint, int );
103 gchar* print_system_id(wmem_allocator_t *, const guint8 *, int );
104 gchar* tvb_print_system_id( tvbuff_t *, const gint, int );
105 void print_system_id_buf( const guint8 *, int, gchar *, int);
106 gchar* print_address_prefix( tvbuff_t *, const gint, int );
107
108 int get_osi_address_type(void);
109 void register_osi_address_type(void);
110
111 #endif /* __OSI_UTILS_H__ */
112
113 /*
114 * Editor modelines
115 *
116 * Local Variables:
117 * c-basic-offset: 2
118 * tab-width: 8
119 * indent-tabs-mode: nil
120 * End:
121 *
122 * ex: set shiftwidth=2 tabstop=8 expandtab:
123 * :indentSize=2:tabSize=8:noTabs=true:
124 */
tvbuff
Definition: tvbuff-int.h:35
_wmem_allocator_t
Definition: wmem_allocator.h:26