Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-mtp3.h
blob3ef1bfd26a2986e8478073b2ab23421bea0f3846
1 /* packet-mtp3.h
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9 #ifndef __PACKET_MTP3_H__
10 #define __PACKET_MTP3_H__
12 #include "ws_symbol_export.h"
14 typedef enum {
15 ITU_STANDARD = 1,
16 ANSI_STANDARD = 2,
17 CHINESE_ITU_STANDARD = 3,
18 JAPAN_STANDARD = 4
19 } Standard_Type;
20 #define HEURISTIC_FAILED_STANDARD 0xffff
22 extern int mtp3_standard;
23 extern bool mtp3_heuristic_standard;
25 WS_DLL_PUBLIC const value_string mtp3_standard_vals[];
27 typedef enum {
28 MTP3_ADDR_FMT_DEC = 1,
29 MTP3_ADDR_FMT_HEX = 2,
30 MTP3_ADDR_FMT_NI_DEC = 3,
31 MTP3_ADDR_FMT_NI_HEX = 4,
32 MTP3_ADDR_FMT_DASHED = 5
33 } mtp3_net_addr_fmt_e;
35 typedef struct _mtp3_addr_pc_t {
36 Standard_Type type;
37 uint32_t pc;
38 uint8_t ni;
39 } mtp3_addr_pc_t;
41 typedef struct _mtp3_tap_rec_t {
42 mtp3_addr_pc_t addr_opc;
43 mtp3_addr_pc_t addr_dpc;
44 uint8_t mtp3_si_code;
45 uint16_t size;
46 } mtp3_tap_rec_t;
48 #define ITU_PC_LENGTH 2
49 #define ITU_PC_MASK 0x3FFF
51 #define ANSI_PC_LENGTH 3
52 #define ANSI_NCM_LENGTH 1
53 #define ANSI_NETWORK_OFFSET 2
54 #define ANSI_CLUSTER_OFFSET 1
55 #define ANSI_MEMBER_OFFSET 0
56 #define ANSI_PC_MASK 0xFFFFFF
57 #define ANSI_NETWORK_MASK 0xFF0000
58 #define ANSI_CLUSTER_MASK 0x00FF00
59 #define ANSI_MEMBER_MASK 0x0000FF
60 #define ANSI_PC_STRING_LENGTH 16
62 #define JAPAN_PC_LENGTH 2
63 #define JAPAN_PC_MASK 0xffff
65 #ifdef __cplusplus
66 extern "C" {
67 #endif /* __cplusplus */
69 extern char* mtp3_pc_to_str(const uint32_t pc);
70 extern bool mtp3_pc_structured(void);
71 extern uint32_t mtp3_pc_hash(const mtp3_addr_pc_t *addr_pc_p);
72 extern int mtp3_addr_len(void);
74 #ifdef __PROTO_H__
75 /* epan/to_str.c includes this file, but it does not include proto.h so
76 * it doesn't know about things like proto_tree. This function is not
77 * needed by to_str.c, so just don't prototype it there (or anywhere
78 * without proto.h).
80 extern void dissect_mtp3_3byte_pc(tvbuff_t *tvb, unsigned offset,
81 proto_tree *tree, int ett_pc,
82 int hf_pc_string, int hf_pc_network,
83 int hf_pc_cluster, int hf_pc_member,
84 int hf_dpc, int hf_pc);
85 #endif
88 * the following allows TAP code access to the messages
89 * without having to duplicate it. With MSVC and a
90 * libwireshark.dll, we need a special declaration.
92 WS_DLL_PUBLIC const value_string mtp3_service_indicator_code_short_vals[];
94 #define MTP_SI_SNM 0x0
95 #define MTP_SI_MTN 0x1
96 #define MTP_SI_MTNS 0x2
97 #define MTP_SI_SCCP 0x3
98 #define MTP_SI_TUP 0x4
99 #define MTP_SI_ISUP 0x5
100 #define MTP_SI_DUP_CC 0x6
101 #define MTP_SI_DUP_FAC 0x7
102 #define MTP_SI_MTP_TEST 0x8
103 #define MTP_SI_ISUP_B 0x9
104 #define MTP_SI_ISUP_S 0xa
105 #define MTP_SI_AAL2 0xc
106 #define MTP_SI_BICC 0xd
107 #define MTP_SI_GCP 0xe
110 * I only want to gather stats for non-spare SI codes
112 #define MTP3_NUM_SI_CODE 9
114 #define MTP3_NI_INT0 0x0
115 #define MTP3_NI_INT1 0x1
116 #define MTP3_NI_NAT0 0x2
117 #define MTP3_NI_NAT1 0x3
118 WS_DLL_PUBLIC const value_string mtp3_network_indicator_vals[];
120 #ifdef __cplusplus
122 #endif /* __cplusplus */
124 #endif /* __PACKET_MTP3_H__ */