HACK: 2nd try to match RowsetProperties
[wireshark-wip.git] / epan / dissectors / packet-sccp.h
blob7ba3621af81b4a950521313c4a3ea26f54a55909
1 /* packet-sccp.h
2 * Definitions for Signalling Connection Control Part (SCCP) dissection
4 * $Id$
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #ifndef __PACKET_SCCP_H
26 #define __PACKET_SCCP_H
28 #include "ws_symbol_export.h"
30 #define SCCP_MSG_TYPE_CR 0x01
31 #define SCCP_MSG_TYPE_CC 0x02
32 #define SCCP_MSG_TYPE_CREF 0x03
33 #define SCCP_MSG_TYPE_RLSD 0x04
34 #define SCCP_MSG_TYPE_RLC 0x05
35 #define SCCP_MSG_TYPE_DT1 0x06
36 #define SCCP_MSG_TYPE_DT2 0x07
37 #define SCCP_MSG_TYPE_AK 0x08
38 #define SCCP_MSG_TYPE_UDT 0x09
39 #define SCCP_MSG_TYPE_UDTS 0x0a
40 #define SCCP_MSG_TYPE_ED 0x0b
41 #define SCCP_MSG_TYPE_EA 0x0c
42 #define SCCP_MSG_TYPE_RSR 0x0d
43 #define SCCP_MSG_TYPE_RSC 0x0e
44 #define SCCP_MSG_TYPE_ERR 0x0f
45 #define SCCP_MSG_TYPE_IT 0x10
46 #define SCCP_MSG_TYPE_XUDT 0x11
47 #define SCCP_MSG_TYPE_XUDTS 0x12
48 #define SCCP_MSG_TYPE_LUDT 0x13
49 #define SCCP_MSG_TYPE_LUDTS 0x14
51 WS_DLL_PUBLIC const value_string sccp_message_type_acro_values[];
52 WS_DLL_PUBLIC const value_string sccp_release_cause_values[];
53 WS_DLL_PUBLIC const value_string sccp_return_cause_values[];
54 WS_DLL_PUBLIC const value_string sccp_reset_cause_values[];
55 WS_DLL_PUBLIC const value_string sccp_error_cause_values[];
56 WS_DLL_PUBLIC const value_string sccp_refusal_cause_values[];
58 /* from packet-sua.c */
59 WS_DLL_PUBLIC const value_string sua_co_class_type_acro_values[];
61 typedef enum _sccp_payload_t {
62 SCCP_PLOAD_NONE,
63 SCCP_PLOAD_BSSAP,
64 SCCP_PLOAD_RANAP,
65 SCCP_PLOAD_NUM_PLOADS
66 } sccp_payload_t;
68 typedef struct _sccp_msg_info_t {
69 guint framenum;
70 guint offset;
71 guint type;
73 union {
74 struct {
75 gchar* label;
76 gchar* comment;
77 struct _sccp_assoc_info_t* assoc;
78 struct _sccp_msg_info_t* next;
79 } co;
80 struct {
81 guint8* calling_gt;
82 guint calling_ssn;
83 guint8* called_gt;
84 guint called_ssn;
85 } ud;
86 } data;
87 } sccp_msg_info_t;
89 typedef struct _sccp_assoc_info_t {
90 guint32 id;
91 guint32 calling_dpc;
92 guint32 called_dpc;
93 guint8 calling_ssn;
94 guint8 called_ssn;
95 gboolean has_fw_key;
96 gboolean has_bw_key;
97 sccp_msg_info_t* msgs;
98 sccp_msg_info_t* curr_msg;
100 sccp_payload_t payload;
101 gchar* calling_party;
102 gchar* called_party;
103 gchar* extra_info;
104 guint32 app_info; /* used only by dissectors of protocols above SCCP */
106 } sccp_assoc_info_t;
108 extern void reset_sccp_assoc(void);
109 extern sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_lr, guint32 dst_lr, guint msg_type);
110 extern gboolean looks_like_valid_sccp(guint32 frame_num, tvbuff_t *tvb, guint8 my_mtp3_standard);
112 #define GT_SIGNAL_LENGTH 1
113 #define GT_ODD_SIGNAL_MASK 0x0f
114 #define GT_EVEN_SIGNAL_MASK 0xf0
115 #define GT_EVEN_SIGNAL_SHIFT 4
116 #define GT_MAX_SIGNALS (32*7) /* it's a bit big, but it allows for adding a lot of "(spare)" and "Unknown" values (7 chars) if there are errors - e.g. ANSI vs ITU wrongly selected */
117 WS_DLL_PUBLIC const value_string sccp_address_signal_values[];
119 #endif