| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-sccp.h
1/* packet-sccp.h
2 * Definitions for Signalling Connection Control Part (SCCP) dissection
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef __PACKET_SCCP_H
12#define __PACKET_SCCP_H
13
14#include "ws_symbol_export.h"
15
16#define SCCP_MSG_TYPE_CR 0x01
17#define SCCP_MSG_TYPE_CC 0x02
18#define SCCP_MSG_TYPE_CREF 0x03
19#define SCCP_MSG_TYPE_RLSD 0x04
20#define SCCP_MSG_TYPE_RLC 0x05
21#define SCCP_MSG_TYPE_DT1 0x06
22#define SCCP_MSG_TYPE_DT2 0x07
23#define SCCP_MSG_TYPE_AK 0x08
24#define SCCP_MSG_TYPE_UDT 0x09
25#define SCCP_MSG_TYPE_UDTS 0x0a
26#define SCCP_MSG_TYPE_ED 0x0b
27#define SCCP_MSG_TYPE_EA 0x0c
28#define SCCP_MSG_TYPE_RSR 0x0d
29#define SCCP_MSG_TYPE_RSC 0x0e
30#define SCCP_MSG_TYPE_ERR 0x0f
31#define SCCP_MSG_TYPE_IT 0x10
32#define SCCP_MSG_TYPE_XUDT 0x11
33#define SCCP_MSG_TYPE_XUDTS 0x12
34#define SCCP_MSG_TYPE_LUDT 0x13
35#define SCCP_MSG_TYPE_LUDTS 0x14
36
37WS_DLL_PUBLIC const value_string sccp_release_cause_values[];
38WS_DLL_PUBLIC const value_string sccp_return_cause_values[];
39WS_DLL_PUBLIC const value_string sccp_reset_cause_values[];
40WS_DLL_PUBLIC const value_string sccp_error_cause_values[];
41WS_DLL_PUBLIC const value_string sccp_refusal_cause_values[];
42
43 typedef enum _sccp_payload_t {
44 SCCP_PLOAD_NONE,
45 SCCP_PLOAD_BSSAP,
46 SCCP_PLOAD_RANAP,
47 SCCP_PLOAD_NUM_PLOADS
48} sccp_payload_t;
49
50 typedef struct _sccp_msg_info_t {
51 unsigned framenum;
52 unsigned offset;
53 unsigned type;
54
55 union {
56 struct {
57 char* label;
58 char* comment;
59 char* imsi;
60 struct _sccp_assoc_info_t* assoc;
61 struct _sccp_msg_info_t* next;
62 } co;
63 struct {
64 uint8_t* calling_gt;
65 unsigned calling_ssn;
66 uint8_t* called_gt;
67 unsigned called_ssn;
68 } ud;
69 } data;
70} sccp_msg_info_t;
71
72 typedef struct _sccp_assoc_info_t {
73 uint32_t id;
74 uint32_t calling_dpc;
75 uint32_t called_dpc;
76 uint8_t calling_ssn;
77 uint8_t called_ssn;
78 bool has_fw_key;
79 bool has_bw_key;
80 sccp_msg_info_t* msgs;
81 sccp_msg_info_t* curr_msg;
82
83 sccp_payload_t payload;
84 char* calling_party;
85 char* called_party;
86 char* extra_info;
87 char* imsi;
88 uint32_t app_info; /* used only by dissectors of protocols above SCCP */
89
90} sccp_assoc_info_t;
91
92 typedef struct _sccp_decode_context_t {
93 uint8_t message_type;
94 unsigned dlr;
95 unsigned slr;
96 sccp_assoc_info_t* assoc;
97 sccp_msg_info_t* sccp_msg;
98
99} sccp_decode_context_t;
100
101 extern sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, unsigned offset, sccp_decode_context_t* value);
102 extern bool looks_like_valid_sccp(uint32_t frame_num, tvbuff_t *tvb, uint8_t my_mtp3_standard);
103
104#define INVALID_LR 0xffffff /* a reserved value */
105
106#define GT_SIGNAL_LENGTH 1
107#define GT_ODD_SIGNAL_MASK 0x0f
108#define GT_EVEN_SIGNAL_MASK 0xf0
109#define GT_EVEN_SIGNAL_SHIFT 4
110#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 */
111WS_DLL_PUBLIC const value_string sccp_address_signal_values[];
112
113#endif
_packet_info
Definition packet_info.h:43
_sccp_assoc_info_t
Definition packet-sccp.h:72
_sccp_decode_context_t
Definition packet-sccp.h:92
_sccp_msg_info_t
Definition packet-sccp.h:50
_value_string
Mapping between a 32-bit integer value and its string representation.
Definition value_string.h:33
tvbuff
Definition tvbuff-int.h:36