MSWSP: add two more Property Sets
[wireshark-wip.git] / epan / dissectors / packet-mtp3.h
blob9178ca8324a40ade33bb3da162365e2de6589640
1 /* packet-mtp3.h
3 * $Id$
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __PACKET_MTP3_H_
24 #define __PACKET_MTP3_H_
26 #include "ws_symbol_export.h"
28 typedef enum {
29 ITU_STANDARD = 1,
30 ANSI_STANDARD = 2,
31 CHINESE_ITU_STANDARD = 3,
32 JAPAN_STANDARD = 4
33 } Standard_Type;
34 #define HEURISTIC_FAILED_STANDARD 0xffff
36 extern gint mtp3_standard;
37 extern gboolean mtp3_heuristic_standard;
39 WS_DLL_PUBLIC const value_string mtp3_standard_vals[];
41 typedef enum {
42 MTP3_ADDR_FMT_DEC = 1,
43 MTP3_ADDR_FMT_HEX = 2,
44 MTP3_ADDR_FMT_NI_DEC = 3,
45 MTP3_ADDR_FMT_NI_HEX = 4,
46 MTP3_ADDR_FMT_DASHED = 5
47 } mtp3_net_addr_fmt_e;
49 typedef struct _mtp3_addr_pc_t {
50 Standard_Type type;
51 guint32 pc;
52 guint8 ni;
53 } mtp3_addr_pc_t;
55 typedef struct _mtp3_tap_rec_t {
56 mtp3_addr_pc_t addr_opc;
57 mtp3_addr_pc_t addr_dpc;
58 guint8 si_code;
59 guint16 size;
60 } mtp3_tap_rec_t;
62 #define ITU_PC_LENGTH 2
63 #define ITU_PC_MASK 0x3FFF
65 #define ANSI_PC_LENGTH 3
66 #define ANSI_NCM_LENGTH 1
67 #define ANSI_NETWORK_OFFSET 2
68 #define ANSI_CLUSTER_OFFSET 1
69 #define ANSI_MEMBER_OFFSET 0
70 #define ANSI_PC_MASK 0xFFFFFF
71 #define ANSI_NETWORK_MASK 0xFF0000
72 #define ANSI_CLUSTER_MASK 0x00FF00
73 #define ANSI_MEMBER_MASK 0x0000FF
74 #define ANSI_PC_STRING_LENGTH 16
76 #define JAPAN_PC_LENGTH 2
77 #define JAPAN_PC_MASK 0xffff
79 WS_DLL_PUBLIC void mtp3_addr_to_str_buf(const mtp3_addr_pc_t *addr_pc_p, gchar *buf, int buf_len);
80 extern void mtp3_pc_to_str_buf(const guint32 pc, gchar *buf, int buf_len);
81 extern gchar* mtp3_pc_to_str(const guint32 pc);
82 extern gboolean mtp3_pc_structured(void);
83 extern guint32 mtp3_pc_hash(const mtp3_addr_pc_t *addr_pc_p);
85 #ifdef __PROTO_H__
86 /* epan/to_str.c includes this file, but it does not include proto.h so
87 * it doesn't know about things like proto_tree. This function is not
88 * needed by to_str.c, so just don't prototype it there (or anywhere
89 * without proto.h).
91 extern void dissect_mtp3_3byte_pc(tvbuff_t *tvb, guint offset,
92 proto_tree *tree, gint ett_pc,
93 int hf_pc, int hf_pc_network,
94 int hf_pc_cluster, int hf_pc_member,
95 int hf_dpc, int pc);
96 #endif
99 * the following allows TAP code access to the messages
100 * without having to duplicate it. With MSVC and a
101 * libwireshark.dll, we need a special declaration.
103 WS_DLL_PUBLIC const value_string mtp3_service_indicator_code_short_vals[];
105 #define MTP_SI_SNM 0x0
106 #define MTP_SI_MTN 0x1
107 #define MTP_SI_MTNS 0x2
108 #define MTP_SI_SCCP 0x3
109 #define MTP_SI_TUP 0x4
110 #define MTP_SI_ISUP 0x5
111 #define MTP_SI_DUP_CC 0x6
112 #define MTP_SI_DUP_FAC 0x7
113 #define MTP_SI_MTP_TEST 0x8
114 #define MTP_SI_ISUP_B 0x9
115 #define MTP_SI_ISUP_S 0xa
116 #define MTP_SI_AAL2 0xc
117 #define MTP_SI_BICC 0xd
118 #define MTP_SI_GCP 0xe
121 * I only want to gather stats for non-spare SI codes
123 #define MTP3_NUM_SI_CODE 9
125 #define MTP3_NI_INT0 0x0
126 #define MTP3_NI_INT1 0x1
127 #define MTP3_NI_NAT0 0x2
128 #define MTP3_NI_NAT1 0x3
129 WS_DLL_PUBLIC const value_string mtp3_network_indicator_vals[];
131 #endif