2006-03-11 15:30:52 +00:00
/* packet-sccp.h
* Definitions for Signalling Connection Control Part ( SCCP ) dissection
*
2006-05-21 04:49:01 +00:00
* Wireshark - Network traffic analyzer
* By Gerald Combs < gerald @ wireshark . org >
2006-03-11 15:30:52 +00:00
* Copyright 1998 Gerald Combs
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
2012-06-28 23:18:38 +00:00
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA .
2006-03-11 15:30:52 +00:00
*/
2013-10-13 19:56:52 +00:00
# ifndef __PACKET_SCCP_H
2006-03-11 15:30:52 +00:00
# define __PACKET_SCCP_H
2013-03-01 23:53:11 +00:00
# include "ws_symbol_export.h"
2007-03-21 00:48:46 +00:00
# define SCCP_MSG_TYPE_CR 0x01
# define SCCP_MSG_TYPE_CC 0x02
# define SCCP_MSG_TYPE_CREF 0x03
# define SCCP_MSG_TYPE_RLSD 0x04
# define SCCP_MSG_TYPE_RLC 0x05
# define SCCP_MSG_TYPE_DT1 0x06
# define SCCP_MSG_TYPE_DT2 0x07
# define SCCP_MSG_TYPE_AK 0x08
# define SCCP_MSG_TYPE_UDT 0x09
# define SCCP_MSG_TYPE_UDTS 0x0a
# define SCCP_MSG_TYPE_ED 0x0b
# define SCCP_MSG_TYPE_EA 0x0c
# define SCCP_MSG_TYPE_RSR 0x0d
# define SCCP_MSG_TYPE_RSC 0x0e
# define SCCP_MSG_TYPE_ERR 0x0f
# define SCCP_MSG_TYPE_IT 0x10
# define SCCP_MSG_TYPE_XUDT 0x11
# define SCCP_MSG_TYPE_XUDTS 0x12
# define SCCP_MSG_TYPE_LUDT 0x13
# define SCCP_MSG_TYPE_LUDTS 0x14
2013-03-01 23:53:11 +00:00
WS_DLL_PUBLIC const value_string sccp_message_type_acro_values [ ] ;
WS_DLL_PUBLIC const value_string sccp_release_cause_values [ ] ;
WS_DLL_PUBLIC const value_string sccp_return_cause_values [ ] ;
WS_DLL_PUBLIC const value_string sccp_reset_cause_values [ ] ;
WS_DLL_PUBLIC const value_string sccp_error_cause_values [ ] ;
WS_DLL_PUBLIC const value_string sccp_refusal_cause_values [ ] ;
2007-03-21 00:48:46 +00:00
2007-03-22 22:59:20 +00:00
/* from packet-sua.c */
2013-03-01 23:53:11 +00:00
WS_DLL_PUBLIC const value_string sua_co_class_type_acro_values [ ] ;
2007-03-22 22:59:20 +00:00
2006-03-11 15:30:52 +00:00
typedef enum _sccp_payload_t {
SCCP_PLOAD_NONE ,
2007-03-09 13:14:09 +00:00
SCCP_PLOAD_BSSAP ,
SCCP_PLOAD_RANAP ,
2007-03-21 00:48:46 +00:00
SCCP_PLOAD_NUM_PLOADS
2006-03-11 15:30:52 +00:00
} sccp_payload_t ;
2007-03-09 13:14:09 +00:00
typedef struct _sccp_msg_info_t {
guint framenum ;
guint offset ;
2007-03-21 00:48:46 +00:00
guint type ;
2013-10-13 19:56:52 +00:00
2007-03-27 23:00:55 +00:00
union {
struct {
gchar * label ;
gchar * comment ;
struct _sccp_assoc_info_t * assoc ;
struct _sccp_msg_info_t * next ;
} co ;
struct {
guint8 * calling_gt ;
guint calling_ssn ;
guint8 * called_gt ;
guint called_ssn ;
} ud ;
} data ;
2007-03-09 13:14:09 +00:00
} sccp_msg_info_t ;
typedef struct _sccp_assoc_info_t {
2007-03-03 23:38:35 +00:00
guint32 id ;
2006-03-11 15:30:52 +00:00
guint32 calling_dpc ;
guint32 called_dpc ;
guint8 calling_ssn ;
2007-03-09 13:14:09 +00:00
guint8 called_ssn ;
2007-03-21 00:48:46 +00:00
gboolean has_fw_key ;
gboolean has_bw_key ;
2007-03-03 23:38:35 +00:00
sccp_msg_info_t * msgs ;
2007-03-21 00:48:46 +00:00
sccp_msg_info_t * curr_msg ;
2013-10-13 19:56:52 +00:00
2007-03-22 22:59:20 +00:00
sccp_payload_t payload ;
2007-03-21 00:48:46 +00:00
gchar * calling_party ;
gchar * called_party ;
gchar * extra_info ;
2010-11-22 20:24:12 +00:00
guint32 app_info ; /* used only by dissectors of protocols above SCCP */
2007-03-21 00:48:46 +00:00
2006-03-11 15:30:52 +00:00
} sccp_assoc_info_t ;
2007-03-27 23:00:55 +00:00
extern void reset_sccp_assoc ( void ) ;
2007-03-22 22:59:20 +00:00
extern sccp_assoc_info_t * get_sccp_assoc ( packet_info * pinfo , guint offset , guint32 src_lr , guint32 dst_lr , guint msg_type ) ;
2012-02-03 04:09:10 +00:00
extern gboolean looks_like_valid_sccp ( guint32 frame_num , tvbuff_t * tvb , guint8 my_mtp3_standard ) ;
2007-03-22 22:59:20 +00:00
2008-09-24 13:41:47 +00:00
# define GT_SIGNAL_LENGTH 1
# define GT_ODD_SIGNAL_MASK 0x0f
# define GT_EVEN_SIGNAL_MASK 0xf0
# define GT_EVEN_SIGNAL_SHIFT 4
2013-02-26 01:06:19 +00:00
# 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 */
2013-03-01 23:53:11 +00:00
WS_DLL_PUBLIC const value_string sccp_address_signal_values [ ] ;
2008-09-24 13:41:47 +00:00
2006-03-11 15:30:52 +00:00
# endif