summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2007-03-22 22:59:20 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2007-03-22 22:59:20 +0000
commit7f3e4fea48dad56d9ecfb73aab614233cdde5a0e (patch)
tree6986d6abf9e4fe13b040327b909b3e9ffa7bc795
parentdcb1e1bdfda07a49d09bc7cd977cefb37b358566 (diff)
downloadwireshark-7f3e4fea48dad56d9ecfb73aab614233cdde5a0e.tar.gz
Mine:
* add SUA to the "VoIP Calls" tap. * propagate changes to packet-sccp.h to other dissectors From Neil Piercy: * add SLR, DLR and CAUSE to COL_INFO svn path=/trunk/; revision=21126
-rw-r--r--epan/dissectors/packet-bssap.c8
-rw-r--r--epan/dissectors/packet-ranap.c70
-rw-r--r--epan/dissectors/packet-sccp.c128
-rw-r--r--epan/dissectors/packet-sccp.h8
-rw-r--r--epan/dissectors/packet-sua.c47
-rw-r--r--epan/libwireshark.def1
-rw-r--r--gtk/voip_calls.c53
-rw-r--r--gtk/voip_calls.h1
8 files changed, 230 insertions, 86 deletions
diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c
index 139cfe5a21..5fc2a627b8 100644
--- a/epan/dissectors/packet-bssap.c
+++ b/epan/dissectors/packet-bssap.c
@@ -37,7 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
-#include <gmodule.h>
+#include <glib.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -49,7 +49,7 @@
#include <string.h>
-#include "epan/packet.h"
+#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/emem.h>
@@ -582,7 +582,7 @@ dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if ( pinfo->sccp_info && pinfo->sccp_info->assoc )
- pinfo->sccp_info->assoc->proto = SCCP_PLOAD_BSSAP;
+ pinfo->sccp_info->assoc->payload = SCCP_PLOAD_BSSAP;
/*
* create the bssap protocol tree
@@ -1633,7 +1633,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
}
if (pinfo->sccp_info && pinfo->sccp_info->assoc)
- pinfo->sccp_info->assoc->proto = SCCP_PLOAD_BSSAP;
+ pinfo->sccp_info->assoc->payload = SCCP_PLOAD_BSSAP;
/* create the BSSAP+ protocol tree */
bssap_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE);
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c
index eeb0238069..d0dba3ee8d 100644
--- a/epan/dissectors/packet-ranap.c
+++ b/epan/dissectors/packet-ranap.c
@@ -41,6 +41,7 @@
#include <epan/conversation.h>
#include <epan/tap.h>
#include <epan/emem.h>
+#include <epan/strutil.h>
#include <stdio.h>
#include <string.h>
@@ -473,7 +474,7 @@ static int hf_ranap_mBMSServiceAreaList = -1; /* MBMSServiceAreaList */
static int hf_ranap_MBMSServiceAreaList_item = -1; /* MBMSServiceAreaCode */
static int hf_ranap_rAI = -1; /* RAI */
static int hf_ranap_PDP_TypeInformation_item = -1; /* PDP_Type */
-static int hf_ranap_iMSI = -1; /* IMSI */
+static int hf_ranap_iMSI = -1; /* T_iMSI */
static int hf_ranap_PermittedEncryptionAlgorithms_item = -1; /* EncryptionAlgorithm */
static int hf_ranap_PermittedIntegrityProtectionAlgorithms_item = -1; /* IntegrityProtectionAlgorithm */
static int hf_ranap_PLMNs_in_shared_network_item = -1; /* PLMNs_in_shared_network_item */
@@ -594,7 +595,7 @@ static int hf_ranap_private_id = -1; /* PrivateIE_ID */
static int hf_ranap_private_value = -1; /* RANAP_PRIVATE_IES_Value */
/*--- End of included file: packet-ranap-hf.c ---*/
-#line 69 "packet-ranap-template.c"
+#line 70 "packet-ranap-template.c"
/* Initialize the subtree pointers */
static int ett_ranap = -1;
@@ -861,7 +862,7 @@ static gint ett_ranap_PrivateIE_Container = -1;
static gint ett_ranap_PrivateIE_Field = -1;
/*--- End of included file: packet-ranap-ett.c ---*/
-#line 74 "packet-ranap-template.c"
+#line 75 "packet-ranap-template.c"
/* Global variables */
@@ -982,7 +983,7 @@ static int dissect_secondCriticality(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
static int
dissect_ranap_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 52 "ranap.cnf"
+#line 67 "ranap.cnf"
offset = dissect_ranap_messages(tvb, offset, actx, tree);
@@ -1274,7 +1275,7 @@ static int dissect_id(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p
static int
dissect_ranap_RANAP_PROTOCOL_IES_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 56 "ranap.cnf"
+#line 71 "ranap.cnf"
offset = dissect_ranap_ies(tvb, offset, actx, tree);
@@ -1351,7 +1352,7 @@ static int dissect_ext_id(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
static int
dissect_ranap_Extension(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 75 "ranap.cnf"
+#line 90 "ranap.cnf"
offset = dissect_ranap_ies(tvb, offset, actx, tree);
@@ -1909,7 +1910,7 @@ static int dissect_private_id(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_ranap_RANAP_PRIVATE_IES_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 79 "ranap.cnf"
+#line 94 "ranap.cnf"
/* FIX ME */
@@ -3058,7 +3059,7 @@ static int dissect_aPN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
static int
dissect_ranap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 82 "ranap.cnf"
+#line 97 "ranap.cnf"
tvbuff_t *parameter_tvb=NULL;
@@ -4575,7 +4576,7 @@ static int dissect_id_DRX_CycleLengthCoefficient(tvbuff_t *tvb _U_, int offset _
static int
dissect_ranap_NAS_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 60 "ranap.cnf"
+#line 75 "ranap.cnf"
tvbuff_t *nas_pdu_tvb=NULL;
@@ -5081,21 +5082,45 @@ dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot
return offset;
}
-static int dissect_iMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_) {
- return dissect_ranap_IMSI(tvb, offset, actx, tree, hf_ranap_iMSI);
-}
static int dissect_imsi(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_) {
return dissect_ranap_IMSI(tvb, offset, actx, tree, hf_ranap_imsi);
}
+
+static int
+dissect_ranap_T_iMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
+#line 52 "ranap.cnf"
+ tvbuff_t* imsi_tvb;
+ offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_ranap_iMSI,
+ 3, 8, &imsi_tvb);
+
+ if ( actx->pinfo->sccp_info
+ && actx->pinfo->sccp_info->assoc
+ && ! actx->pinfo->sccp_info->assoc->calling_party ) {
+
+ guint len = tvb_length(imsi_tvb);
+ guint8* bytes = ep_tvb_memdup(imsi_tvb,0,len);
+
+ actx->pinfo->sccp_info->assoc->calling_party =
+ se_strdup_printf("IMSI: %s", bytes_to_str(bytes, len) );
+ }
+
+
+ return offset;
+}
+static int dissect_iMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_) {
+ return dissect_ranap_T_iMSI(tvb, offset, actx, tree, hf_ranap_iMSI);
+}
+
+
static const value_string ranap_PermanentNAS_UE_ID_vals[] = {
{ 0, "iMSI" },
{ 0, NULL }
};
static const per_choice_t PermanentNAS_UE_ID_choice[] = {
- { 0, &hf_ranap_iMSI , ASN1_EXTENSION_ROOT , dissect_ranap_IMSI },
+ { 0, &hf_ranap_iMSI , ASN1_EXTENSION_ROOT , dissect_ranap_T_iMSI },
{ 0, NULL, 0, NULL }
};
@@ -8199,7 +8224,7 @@ static int dissect_id_RAB_SetupOrModifiedList(tvbuff_t *tvb _U_, int offset _U_,
static int
dissect_ranap_FirstValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 72 "ranap.cnf"
+#line 87 "ranap.cnf"
offset = dissect_ranap_FirstValue_ies(tvb, offset, actx, tree);
@@ -8214,7 +8239,7 @@ static int dissect_firstValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
static int
dissect_ranap_SecondValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 69 "ranap.cnf"
+#line 84 "ranap.cnf"
offset = dissect_ranap_SecondValue_ies(tvb, offset, actx, tree);
@@ -9758,7 +9783,7 @@ static int dissect_RANAP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot
/*--- End of included file: packet-ranap-fn.c ---*/
-#line 88 "packet-ranap-template.c"
+#line 89 "packet-ranap-template.c"
@@ -10753,16 +10778,17 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, FALSE);
ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
+ ProcedureCode = 0xFFFFFFFF;
offset = dissect_RANAP_PDU_PDU(tvb, pinfo, ranap_tree);
if (pinfo->sccp_info) {
sccp_msg_info_t* sccp_msg = pinfo->sccp_info;
- const gchar* str = val_to_str(ProcedureCode, ranap_ProcedureCode_vals,"Unknown RANAP");
if (sccp_msg->assoc)
- sccp_msg->assoc->proto = SCCP_PLOAD_RANAP;
+ sccp_msg->assoc->payload = SCCP_PLOAD_RANAP;
- if (! sccp_msg->label) {
+ if (! sccp_msg->label && ProcedureCode != 0xFFFFFFFF) {
+ const gchar* str = val_to_str(ProcedureCode, ranap_ProcedureCode_vals,"Unknown RANAP");
sccp_msg->label = se_strdup(str);
}
}
@@ -12432,7 +12458,7 @@ void proto_register_ranap(void) {
{ &hf_ranap_iMSI,
{ "iMSI", "ranap.iMSI",
FT_BYTES, BASE_HEX, NULL, 0,
- "ranap.IMSI", HFILL }},
+ "ranap.T_iMSI", HFILL }},
{ &hf_ranap_PermittedEncryptionAlgorithms_item,
{ "Item", "ranap.PermittedEncryptionAlgorithms_item",
FT_UINT32, BASE_DEC, VALS(ranap_EncryptionAlgorithm_vals), 0,
@@ -12907,7 +12933,7 @@ void proto_register_ranap(void) {
"ranap.RANAP_PRIVATE_IES_Value", HFILL }},
/*--- End of included file: packet-ranap-hfarr.c ---*/
-#line 1168 "packet-ranap-template.c"
+#line 1170 "packet-ranap-template.c"
};
/* List of subtrees */
@@ -13176,7 +13202,7 @@ void proto_register_ranap(void) {
&ett_ranap_PrivateIE_Field,
/*--- End of included file: packet-ranap-ettarr.c ---*/
-#line 1175 "packet-ranap-template.c"
+#line 1177 "packet-ranap-template.c"
};
/* Register protocol */
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c
index 468d84ce32..936f8d13e0 100644
--- a/epan/dissectors/packet-sccp.c
+++ b/epan/dissectors/packet-sccp.c
@@ -302,7 +302,7 @@ static const value_string sccp_oe_values[] = {
#define GT_ODD_SIGNAL_MASK 0x0f
#define GT_EVEN_SIGNAL_MASK 0xf0
#define GT_EVEN_SIGNAL_SHIFT 4
-#define GT_MAX_SIGNALS 32
+#define GT_MAX_SIGNALS (32*7) /* its 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 */
static const value_string sccp_address_signal_values[] = {
{ 0, "0" },
{ 1, "1" },
@@ -672,6 +672,8 @@ static gint ett_sccp_assoc = -1;
/* Declarations to desegment XUDT Messages */
static gboolean sccp_xudt_desegment = TRUE;
+static gboolean show_key_params = FALSE;
+
static int sccp_tap = -1;
@@ -742,7 +744,7 @@ static sccp_assoc_info_t* new_assoc(guint32 calling, guint32 called){
a->called_ssn = INVALID_SSN;
a->has_fw_key = FALSE;
a->has_bw_key = FALSE;
- a->proto = SCCP_PLOAD_NONE;
+ a->payload = SCCP_PLOAD_NONE;
a->calling_party = NULL;
a->called_party = NULL;
a->extra_info = NULL;
@@ -751,7 +753,7 @@ static sccp_assoc_info_t* new_assoc(guint32 calling, guint32 called){
return a;
}
-static sccp_assoc_info_t* sccp_assoc(packet_info* pinfo, guint offset, guint32 src_lr, guint32 dst_lr) {
+sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_lr, guint32 dst_lr, guint msg_type) {
guint32 opck, dpck;
address* opc = &(pinfo->src);
address* dpc = &(pinfo->dst);
@@ -768,7 +770,7 @@ static sccp_assoc_info_t* sccp_assoc(packet_info* pinfo, guint offset, guint32 s
dpck = dpc->type == AT_SS7PC ? mtp3_pc_hash(dpc->data) : g_str_hash(address_to_str(dpc));
- switch (message_type) {
+ switch (msg_type) {
case SCCP_MSG_TYPE_CR:
{
/* CR contains the opc,dpc,dlr key of backward messages swapped as dpc,opc,slr */
@@ -837,7 +839,7 @@ static sccp_assoc_info_t* sccp_assoc(packet_info* pinfo, guint offset, guint32 s
msg->assoc = assoc;
msg->label = NULL;
msg->comment = NULL;
- msg->type = message_type;
+ msg->type = msg_type;
if (assoc->msgs) {
sccp_msg_info_t* m;
@@ -886,7 +888,7 @@ dissect_sccp_unknown_param(tvbuff_t *tvb, proto_tree *tree, guint8 type, guint l
}
static void
-dissect_sccp_dlr_param(tvbuff_t *tvb, proto_tree *tree, guint length)
+dissect_sccp_dlr_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_info *pinfo)
{
proto_item* lr_item;
@@ -894,10 +896,13 @@ dissect_sccp_dlr_param(tvbuff_t *tvb, proto_tree *tree, guint length)
proto_tree_add_uint(tree, hf_sccp_dlr, tvb, 0, length, dlr);
lr_item = proto_tree_add_uint(tree, hf_sccp_lr, tvb, 0, length, dlr);
PROTO_ITEM_SET_HIDDEN(lr_item);
+
+ if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "DLR=%ld ", dlr);
}
static void
-dissect_sccp_slr_param(tvbuff_t *tvb, proto_tree *tree, guint length)
+dissect_sccp_slr_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_info *pinfo)
{
proto_item* lr_item;
@@ -905,6 +910,9 @@ dissect_sccp_slr_param(tvbuff_t *tvb, proto_tree *tree, guint length)
proto_tree_add_uint(tree, hf_sccp_slr, tvb, 0, length, slr);
lr_item = proto_tree_add_uint(tree, hf_sccp_lr, tvb, 0, length, slr);
PROTO_ITEM_SET_HIDDEN(lr_item);
+
+ if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "SLR=%ld ", slr);
}
static void
@@ -1355,48 +1363,63 @@ dissect_sccp_credit_param(tvbuff_t *tvb, proto_tree *tree, guint length)
}
static void
-dissect_sccp_release_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length)
+dissect_sccp_release_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_info *pinfo)
{
guint8 cause;
cause = tvb_get_guint8(tvb, 0);
proto_tree_add_uint(tree, hf_sccp_release_cause, tvb, 0, length, cause);
+
+ if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Cause=%d ", cause);
}
static void
-dissect_sccp_return_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length)
+dissect_sccp_return_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_info *pinfo)
{
guint8 cause;
cause = tvb_get_guint8(tvb, 0);
proto_tree_add_uint(tree, hf_sccp_return_cause, tvb, 0, length, cause);
+
+ if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Cause=%d ", cause);
}
static void
-dissect_sccp_reset_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length)
+dissect_sccp_reset_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_info *pinfo)
{
guint8 cause;
cause = tvb_get_guint8(tvb, 0);
proto_tree_add_uint(tree, hf_sccp_reset_cause, tvb, 0, length, cause);
+
+ if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Cause=%d ", cause);
}
static void
-dissect_sccp_error_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length)
+dissect_sccp_error_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_info *pinfo)
{
guint8 cause;
cause = tvb_get_guint8(tvb, 0);
proto_tree_add_uint(tree, hf_sccp_error_cause, tvb, 0, length, cause);
+
+ if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Cause=%d ", cause);
}
static void
-dissect_sccp_refusal_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length)
+dissect_sccp_refusal_cause_param(tvbuff_t *tvb, proto_tree *tree, guint length, packet_info *pinfo)
{
guint8 cause;
cause = tvb_get_guint8(tvb, 0);
proto_tree_add_uint(tree, hf_sccp_refusal_cause, tvb, 0, length, cause);
+
+ if (show_key_params && check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Cause=%d ", cause);
}
/* This function is used for both data and long data (ITU only) parameters */
@@ -1565,6 +1588,11 @@ dissect_sccp_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
case PARAMETER_LONG_DATA:
case PARAMETER_SOURCE_LOCAL_REFERENCE:
case PARAMETER_DESTINATION_LOCAL_REFERENCE:
+ case PARAMETER_RELEASE_CAUSE:
+ case PARAMETER_RETURN_CAUSE:
+ case PARAMETER_RESET_CAUSE:
+ case PARAMETER_ERROR_CAUSE:
+ case PARAMETER_REFUSAL_CAUSE:
/* These parameters must be dissected even if !sccp_tree (so that
* assoc information can be created).
@@ -1586,11 +1614,11 @@ dissect_sccp_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
break;
case PARAMETER_DESTINATION_LOCAL_REFERENCE:
- dissect_sccp_dlr_param(parameter_tvb, sccp_tree, parameter_length);
+ dissect_sccp_dlr_param(parameter_tvb, sccp_tree, parameter_length, pinfo);
break;
case PARAMETER_SOURCE_LOCAL_REFERENCE:
- dissect_sccp_slr_param(parameter_tvb, sccp_tree, parameter_length);
+ dissect_sccp_slr_param(parameter_tvb, sccp_tree, parameter_length, pinfo);
break;
case PARAMETER_CALLED_PARTY_ADDRESS:
@@ -1625,23 +1653,23 @@ dissect_sccp_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
break;
case PARAMETER_RELEASE_CAUSE:
- dissect_sccp_release_cause_param(parameter_tvb, sccp_tree, parameter_length);
+ dissect_sccp_release_cause_param(parameter_tvb, sccp_tree, parameter_length, pinfo);
break;
case PARAMETER_RETURN_CAUSE:
- dissect_sccp_return_cause_param(parameter_tvb, sccp_tree, parameter_length);
+ dissect_sccp_return_cause_param(parameter_tvb, sccp_tree, parameter_length, pinfo);
break;
case PARAMETER_RESET_CAUSE:
- dissect_sccp_reset_cause_param(parameter_tvb, sccp_tree, parameter_length);
+ dissect_sccp_reset_cause_param(parameter_tvb, sccp_tree, parameter_length, pinfo);
break;
case PARAMETER_ERROR_CAUSE:
- dissect_sccp_error_cause_param(parameter_tvb, sccp_tree, parameter_length);
+ dissect_sccp_error_cause_param(parameter_tvb, sccp_tree, parameter_length, pinfo);
break;
case PARAMETER_REFUSAL_CAUSE:
- dissect_sccp_refusal_cause_param(parameter_tvb, sccp_tree, parameter_length);
+ dissect_sccp_refusal_cause_param(parameter_tvb, sccp_tree, parameter_length, pinfo);
break;
case PARAMETER_DATA:
@@ -1809,9 +1837,10 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
message_type = tvb_get_guint8(tvb, SCCP_MSG_TYPE_OFFSET);
offset = SCCP_MSG_TYPE_LENGTH;
- if (check_col(pinfo->cinfo, COL_INFO))
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
+ if (check_col(pinfo->cinfo, COL_INFO)) {
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
val_to_str(message_type, sccp_message_type_acro_values, "Unknown"));
+ };
if (sccp_tree) {
/* add the message type to the protocol tree */
@@ -1831,7 +1860,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
no_assoc.called_ssn = INVALID_SSN;
no_assoc.has_fw_key = FALSE;
no_assoc.has_bw_key = FALSE;
- no_assoc.proto = SCCP_PLOAD_NONE;
+ no_assoc.payload = SCCP_PLOAD_NONE;
no_assoc.called_party = NULL;
no_assoc.calling_party = NULL;
no_assoc.extra_info = NULL;
@@ -1848,7 +1877,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CLASS, offset,
PROTOCOL_CLASS_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
VARIABLE_POINTER(variable_pointer1, hf_sccp_variable_pointer1, POINTER_LENGTH)
OPTIONAL_POINTER(POINTER_LENGTH)
@@ -1873,7 +1902,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
PARAMETER_SOURCE_LOCAL_REFERENCE,
offset, SOURCE_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CLASS, offset,
@@ -1887,7 +1916,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset,
DESTINATION_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_REFUSAL_CAUSE, offset,
@@ -1904,14 +1933,14 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
PARAMETER_SOURCE_LOCAL_REFERENCE,
offset, SOURCE_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_RELEASE_CAUSE, offset,
RELEASE_CAUSE_LENGTH);
OPTIONAL_POINTER(POINTER_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
break;
case SCCP_MSG_TYPE_RLC:
@@ -1923,7 +1952,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
PARAMETER_SOURCE_LOCAL_REFERENCE,
offset, SOURCE_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
break;
@@ -1934,7 +1963,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset,
DESTINATION_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
more = tvb_get_guint8(tvb, offset) & SEGMENTING_REASSEMBLING_MASK;
@@ -1990,7 +2019,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset,
DESTINATION_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_SEQUENCING_SEGMENTING, offset,
@@ -2003,7 +2032,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset,
DESTINATION_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_RECEIVE_SEQUENCE_NUMBER,
@@ -2020,7 +2049,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
VARIABLE_POINTER(variable_pointer2, hf_sccp_variable_pointer2, POINTER_LENGTH)
VARIABLE_POINTER(variable_pointer3, hf_sccp_variable_pointer3, POINTER_LENGTH)
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CALLED_PARTY_ADDRESS,
@@ -2042,7 +2071,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
VARIABLE_POINTER(variable_pointer2, hf_sccp_variable_pointer2, POINTER_LENGTH)
VARIABLE_POINTER(variable_pointer3, hf_sccp_variable_pointer3, POINTER_LENGTH)
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CALLED_PARTY_ADDRESS,
@@ -2062,7 +2091,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset,
DESTINATION_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
VARIABLE_POINTER(variable_pointer1, hf_sccp_variable_pointer1, POINTER_LENGTH);
@@ -2075,7 +2104,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
PARAMETER_DESTINATION_LOCAL_REFERENCE,
offset,
DESTINATION_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
break;
@@ -2090,7 +2119,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_RESET_CAUSE, offset,
RESET_CAUSE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
break;
case SCCP_MSG_TYPE_RSC:
@@ -2101,7 +2130,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_SOURCE_LOCAL_REFERENCE,
offset, SOURCE_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
break;
case SCCP_MSG_TYPE_ERR:
@@ -2112,7 +2141,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_ERROR_CAUSE, offset,
ERROR_CAUSE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
break;
case SCCP_MSG_TYPE_IT:
@@ -2123,7 +2152,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_SOURCE_LOCAL_REFERENCE,
offset, SOURCE_LOCAL_REFERENCE_LENGTH);
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CLASS, offset,
PROTOCOL_CLASS_LENGTH);
@@ -2152,7 +2181,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
* message.
*/
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CALLED_PARTY_ADDRESS,
@@ -2238,7 +2267,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
VARIABLE_POINTER(variable_pointer3, hf_sccp_variable_pointer3, POINTER_LENGTH)
OPTIONAL_POINTER(POINTER_LENGTH)
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CALLED_PARTY_ADDRESS,
@@ -2265,7 +2294,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
VARIABLE_POINTER(variable_pointer3, hf_sccp_variable_pointer3, POINTER_LENGTH_LONG)
OPTIONAL_POINTER(POINTER_LENGTH_LONG)
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CALLED_PARTY_ADDRESS,
@@ -2294,7 +2323,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
VARIABLE_POINTER(variable_pointer3, hf_sccp_variable_pointer3, POINTER_LENGTH_LONG)
OPTIONAL_POINTER(POINTER_LENGTH_LONG)
- assoc = sccp_assoc(pinfo, msg_offset, slr, dlr);
+ assoc = get_sccp_assoc(pinfo, msg_offset, slr, dlr, message_type);
dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree,
PARAMETER_CALLED_PARTY_ADDRESS,
@@ -2325,8 +2354,8 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
for(m = assoc->msgs; m ; m = m->next) {
pi = proto_tree_add_uint( pt,hf_sccp_assoc_msg,tvb,0,0,m->framenum);
- if (assoc->proto != SCCP_PLOAD_NONE)
- proto_item_append_text(pi," %s", val_to_str(assoc->proto, assoc_protos, "Unknown"));
+ if (assoc->payload != SCCP_PLOAD_NONE)
+ proto_item_append_text(pi," %s", val_to_str(assoc->payload, assoc_protos, "Unknown"));
if (m->label)
proto_item_append_text(pi," %s", m->label);
@@ -2345,7 +2374,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree,
static void
dissect_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_item *sccp_item;
+ proto_item *sccp_item = NULL;
proto_tree *sccp_tree = NULL;
const mtp3_addr_pc_t *mtp3_addr_p;
@@ -2870,6 +2899,13 @@ proto_register_sccp(void)
"Whether to keep infomation about messages and their associations",
&trace_sccp);
+
+ prefs_register_bool_preference(sccp_module, "show_more_info",
+ "Show key parameters in Info Column",
+ "Show SLR, DLR, and CAUSE Parameters in the Information Column of the Summary",
+ &show_key_params);
+
+
register_init_routine(&init_sccp);
diff --git a/epan/dissectors/packet-sccp.h b/epan/dissectors/packet-sccp.h
index 9e328a7b5e..50274592d2 100644
--- a/epan/dissectors/packet-sccp.h
+++ b/epan/dissectors/packet-sccp.h
@@ -50,6 +50,9 @@
WS_VAR_IMPORT const value_string sccp_message_type_acro_values[];
+/* from packet-sua.c */
+WS_VAR_IMPORT const value_string sua_co_class_type_acro_values[];
+
typedef enum _sccp_payload_t {
SCCP_PLOAD_NONE,
SCCP_PLOAD_BSSAP,
@@ -79,11 +82,14 @@ typedef struct _sccp_assoc_info_t {
sccp_msg_info_t* msgs;
sccp_msg_info_t* curr_msg;
- sccp_payload_t proto;
+ sccp_payload_t payload;
gchar* calling_party;
gchar* called_party;
gchar* extra_info;
} sccp_assoc_info_t;
+
+extern sccp_assoc_info_t* get_sccp_assoc(packet_info* pinfo, guint offset, guint32 src_lr, guint32 dst_lr, guint msg_type);
+
#endif
diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c
index 6c43f0cff6..29e3b29a0c 100644
--- a/epan/dissectors/packet-sua.c
+++ b/epan/dissectors/packet-sua.c
@@ -2,7 +2,7 @@
* Routines for SS7 SCCP-User Adaptation Layer (SUA) dissection
* It is hopefully (needs testing) compilant to
* http://www.ietf.org/internet-drafts/draft-ietf-sigtran-sua-08.txt
- * http://www.ietf.org/rfc/rfc3838.txt
+ * http://www.ietf.org/rfc/rfc3868.txt
*
* Copyright 2002, 2003, 2004 Michael Tuexen <tuexen [AT] fh-muenster.de>
*
@@ -36,7 +36,9 @@
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/sctpppids.h>
-#include <packet-mtp3.h>
+#include <epan/tap.h>
+#include "packet-mtp3.h"
+#include "packet-sccp.h"
#define NETWORK_BYTE_ORDER FALSE
#define ADD_PADDING(x) ((((x) + 3) >> 2) << 2)
@@ -214,6 +216,21 @@ static const value_string message_class_type_acro_values[] = {
{ MESSAGE_CLASS_RKM_MESSAGE * 256 + MESSAGE_TYPE_DEREG_RSP , "DEREG_RSP" },
{ 0, NULL } };
+const value_string sua_co_class_type_acro_values[] = {
+ { MESSAGE_TYPE_CORE , "CORE" },
+ { MESSAGE_TYPE_COAK , "COAK" },
+ { MESSAGE_TYPE_COREF , "COREF" },
+ { MESSAGE_TYPE_RELRE , "RELRE" },
+ { MESSAGE_TYPE_RELCO , "RELCO" },
+ { MESSAGE_TYPE_RESCO , "RESCO" },
+ { MESSAGE_TYPE_RESRE , "RESRE" },
+ { MESSAGE_TYPE_CODT , "CODT" },
+ { MESSAGE_TYPE_CODA , "CODA" },
+ { MESSAGE_TYPE_COERR , "COERR" },
+ { MESSAGE_TYPE_COIT , "COIT" },
+ { 0, NULL }
+};
+
/* Initialize the protocol and registered fields */
static int proto_sua = -1;
static int hf_version = -1;
@@ -327,10 +344,14 @@ static gint ett_sua_receive_sequence_number_number = -1;
static gint ett_sua_return_on_error_bit_and_protocol_class = -1;
static gint ett_sua_protcol_classes = -1;
+static int sua_tap = -1;
+
static dissector_handle_t data_handle;
static dissector_table_t sccp_ssn_dissector_table;
static heur_dissector_list_t heur_subdissector_list;
+static guint32 message_class, message_type, drn, srn;
+
/* stuff for supporting multiple versions */
typedef enum {
SUA_V08,
@@ -345,7 +366,6 @@ dissect_parameters(tvbuff_t *tlv_tvb, proto_tree *tree, tvbuff_t **data_tvb, gui
static void
dissect_common_header(tvbuff_t *common_header_tvb, packet_info *pinfo, proto_tree *sua_tree)
{
- guint8 message_class, message_type;
message_class = tvb_get_guint8(common_header_tvb, MESSAGE_CLASS_OFFSET);
message_type = tvb_get_guint8(common_header_tvb, MESSAGE_TYPE_OFFSET);
@@ -746,7 +766,8 @@ dissect_destination_address_parameter(tvbuff_t *parameter_tvb, proto_tree *param
static void
dissect_source_reference_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
- proto_tree_add_item(parameter_tree, hf_source_reference_number, parameter_tvb, SOURCE_REFERENCE_NUMBER_OFFSET, SOURCE_REFERENCE_NUMBER_LENGTH, NETWORK_BYTE_ORDER);
+ srn = tvb_get_ntohl(parameter_tvb, SOURCE_REFERENCE_NUMBER_OFFSET);
+ proto_tree_add_item(parameter_tree, hf_source_reference_number, parameter_tvb, SOURCE_REFERENCE_NUMBER_OFFSET, SOURCE_REFERENCE_NUMBER_LENGTH, NETWORK_BYTE_ORDER);
proto_item_append_text(parameter_item, " (%u)", tvb_get_ntohl(parameter_tvb, SOURCE_REFERENCE_NUMBER_OFFSET));
}
@@ -756,6 +777,7 @@ dissect_source_reference_number_parameter(tvbuff_t *parameter_tvb, proto_tree *p
static void
dissect_destination_reference_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
{
+ drn = tvb_get_ntohl(parameter_tvb, DESTINATION_REFERENCE_NUMBER_OFFSET);
proto_tree_add_item(parameter_tree, hf_destination_reference_number, parameter_tvb, DESTINATION_REFERENCE_NUMBER_OFFSET, DESTINATION_REFERENCE_NUMBER_LENGTH, NETWORK_BYTE_ORDER);
proto_item_append_text(parameter_item, " (%u)", tvb_get_ntohl(parameter_tvb, DESTINATION_REFERENCE_NUMBER_OFFSET));
}
@@ -1815,12 +1837,27 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t
guint8 source_ssn = INVALID_SSN;
guint8 dest_ssn = INVALID_SSN;
+ message_class = 0;
+ message_type = 0;
+ drn = 0;
+ srn = 0;
+
common_header_tvb = tvb_new_subset(message_tvb, COMMON_HEADER_OFFSET, COMMON_HEADER_LENGTH, COMMON_HEADER_LENGTH);
dissect_common_header(common_header_tvb, pinfo, sua_tree);
parameters_tvb = tvb_new_subset(message_tvb, COMMON_HEADER_LENGTH, -1, -1);
dissect_parameters(parameters_tvb, sua_tree, &data_tvb, &source_ssn, &dest_ssn);
+ if ( message_class == MESSAGE_CLASS_CO_MESSAGE) {
+ /* XXX: this might fail with multihomed SCTP (on a path failure during a call) */
+ sccp_assoc_info_t* assoc = get_sccp_assoc(pinfo, offset_from_real_beginning(message_tvb,0), srn, drn, message_type);
+
+ if (assoc && assoc->curr_msg) {
+ pinfo->sccp_info = assoc->curr_msg;
+ tap_queue_packet(sua_tap,pinfo,assoc->curr_msg);
+ }
+ }
+
/* If there was SUA data it could be dissected */
if(data_tvb)
{
@@ -1873,6 +1910,7 @@ dissect_sua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
/* dissect the message */
dissect_sua_message(message_tvb, pinfo, sua_tree, tree);
+
}
/* Register the protocol with Wireshark */
@@ -2017,6 +2055,7 @@ proto_register_sua(void)
prefs_register_enum_preference(sua_module, "version", "SUA Version", "Version used by Wireshark", &version, options, FALSE);
register_heur_dissector_list("sua", &heur_subdissector_list);
+ sua_tap = register_tap("sua");
}
diff --git a/epan/libwireshark.def b/epan/libwireshark.def
index 92ef383d31..492a3c445a 100644
--- a/epan/libwireshark.def
+++ b/epan/libwireshark.def
@@ -728,6 +728,7 @@ stream_find_frag
stream_new_circ
stream_process_reassembled
string_to_name_resolve
+sua_co_class_type_acro_values DATA
swaptab
t30_data_vals DATA
t30_facsimile_control_field_vals DATA
diff --git a/gtk/voip_calls.c b/gtk/voip_calls.c
index 0037c28127..9ce8856002 100644
--- a/gtk/voip_calls.c
+++ b/gtk/voip_calls.c
@@ -118,7 +118,7 @@ static h245_labels_t h245_labels;
/****************************************************************************/
/* the one and only global voip_calls_tapinfo_t structure */
static voip_calls_tapinfo_t the_tapinfo_struct =
- {0, NULL, 0, NULL, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ {0, NULL, 0, NULL, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/* the one and only global voip_rtp_tapinfo_t structure */
static voip_rtp_tapinfo_t the_tapinfo_rtp_struct =
@@ -2867,8 +2867,10 @@ remove_tap_listener_h248_calls(void)
have_h248_tap_listener=FALSE;
}
-/**************************** TAP for SCCP **********************************/
+/**************************** TAP for SCCP and SUA **********************************/
+/**************************** ( RANAP and BSSAP ) **********************************/
static gboolean have_sccp_tap_listener = FALSE;
+static gboolean have_sua_tap_listener = FALSE;
static const voip_protocol sccp_proto_map[] = {
TEL_SCCP,
@@ -2876,8 +2878,9 @@ static const voip_protocol sccp_proto_map[] = {
TEL_RANAP
};
#define SP2VP(ap) ((ap) < SCCP_PLOAD_NUM_PLOADS ? sccp_proto_map[(ap)] : TEL_SCCP)
+const value_string* sccp_payload_values;
-static int sccp_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prot_info) {
+static int sccp_calls(packet_info *pinfo, const void *prot_info) {
voip_calls_tapinfo_t *tapinfo = &the_tapinfo_struct;
const sccp_msg_info_t* msg = prot_info;
sccp_assoc_info_t* assoc = msg->assoc;
@@ -2919,10 +2922,10 @@ static int sccp_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *
COPY_ADDRESS(&(strinfo->initial_speaker), &(pinfo->src));
- strinfo->protocol = SP2VP(assoc->proto);
- strinfo->start_sec=(gint32) pinfo->fd->rel_ts.secs;
+ strinfo->protocol = SP2VP(assoc->payload);
+ strinfo->start_sec=pinfo->fd->rel_ts.secs;
strinfo->start_usec=pinfo->fd->rel_ts.nsecs;
- strinfo->stop_sec=(gint32) pinfo->fd->rel_ts.secs;
+ strinfo->stop_sec=pinfo->fd->rel_ts.secs;
strinfo->stop_usec=pinfo->fd->rel_ts.nsecs;
strinfo->selected = FALSE;
@@ -2941,8 +2944,8 @@ static int sccp_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *
strinfo->to_identity = g_strdup(assoc->called_party);
}
- strinfo->protocol = SP2VP(assoc->proto);
- strinfo->stop_sec=(gint32) pinfo->fd->rel_ts.secs;
+ strinfo->protocol = SP2VP(assoc->payload);
+ strinfo->stop_sec=pinfo->fd->rel_ts.secs;
strinfo->stop_usec=pinfo->fd->rel_ts.nsecs;
strinfo->last_frame_num=pinfo->fd->num;
++(strinfo->npackets);
@@ -2963,7 +2966,7 @@ static int sccp_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *
if (msg->label) {
label = msg->label;
} else {
- label = val_to_str(msg->type, sccp_message_type_acro_values, "Unknown(%d)");
+ label = val_to_str(msg->type, sccp_payload_values, "Unknown(%d)");
}
if (msg->comment) {
@@ -2981,6 +2984,18 @@ static int sccp_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *
return 1;
}
+static int sccp_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prot_info) {
+ sccp_payload_values = sccp_message_type_acro_values;
+ return sccp_calls(pinfo, prot_info);
+}
+
+
+static int sua_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prot_info) {
+ sccp_payload_values = sua_co_class_type_acro_values;
+ return sccp_calls(pinfo, prot_info);
+}
+
+
void sccp_calls_init_tap(void)
{
GString *error_string;
@@ -3002,6 +3017,25 @@ void sccp_calls_init_tap(void)
have_sccp_tap_listener=TRUE;
}
+
+ if(have_sua_tap_listener==FALSE)
+ {
+ error_string = register_tap_listener("sua", &(the_tapinfo_struct.sua_dummy),
+ NULL,
+ voip_calls_dlg_reset,
+ sua_calls_packet,
+ voip_calls_dlg_draw);
+
+ if (error_string != NULL) {
+ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
+ error_string->str);
+ g_string_free(error_string, TRUE);
+ exit(1);
+ }
+
+ have_sua_tap_listener=TRUE;
+ }
+
}
void
@@ -3012,6 +3046,7 @@ remove_tap_listener_sccp_calls(void)
unprotect_thread_critical_region();
have_sccp_tap_listener=FALSE;
+ have_sua_tap_listener=FALSE;
}
diff --git a/gtk/voip_calls.h b/gtk/voip_calls.h
index 02bf1464d5..5fbc7c9753 100644
--- a/gtk/voip_calls.h
+++ b/gtk/voip_calls.h
@@ -186,6 +186,7 @@ typedef struct _voip_calls_tapinfo {
int t38_dummy;
int h248_dummy;
int sccp_dummy;
+ int sua_dummy;
} voip_calls_tapinfo_t;