From 1b2cddf0b3b38627882c25eb9e282d4910feb551 Mon Sep 17 00:00:00 2001 From: Luis Ontanon Date: Wed, 21 Mar 2007 00:43:05 +0000 Subject: [PATCH] Add RANAP information to the sccp_info svn path=/trunk/; revision=21075 --- asn1/ranap/packet-ranap-template.c | 18 ++++++++++++++++++ asn1/ranap/ranap-exp.cnf | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/asn1/ranap/packet-ranap-template.c b/asn1/ranap/packet-ranap-template.c index a40ac19cfc..66dee80b2f 100644 --- a/asn1/ranap/packet-ranap-template.c +++ b/asn1/ranap/packet-ranap-template.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -40,6 +41,7 @@ #include "packet-per.h" #include "packet-ranap.h" #include "packet-e212.h" +#include "packet-sccp.h" #define SCCP_SSN_RANAP 0x8E @@ -77,6 +79,7 @@ static guint type_of_message; static guint32 ProcedureCode; static guint32 ProtocolIE_ID; + static int dissect_ranap_ies(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree); static int dissect_ranap_FirstValue_ies(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree); static int dissect_ranap_SecondValue_ies(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree); @@ -556,6 +559,7 @@ static int dissect_ranap_ies(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_ break; } + return offset; } @@ -1069,6 +1073,7 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* make entry in the Protocol column on summary display */ if (check_col(pinfo->cinfo, COL_PROTOCOL)) col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP"); + /* create the ranap protocol tree */ ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, FALSE); @@ -1076,6 +1081,18 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) 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; + + if (! sccp_msg->label) { + sccp_msg->label = se_strdup(str); + } + } + } static gboolean @@ -1113,6 +1130,7 @@ dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) dissect_ranap(tvb, pinfo, tree); + return TRUE; } diff --git a/asn1/ranap/ranap-exp.cnf b/asn1/ranap/ranap-exp.cnf index fdf70d024f..fe511fb007 100644 --- a/asn1/ranap/ranap-exp.cnf +++ b/asn1/ranap/ranap-exp.cnf @@ -1,6 +1,6 @@ # Do not modify this file. # It is created automatically by the ASN.1 to Wireshark dissector compiler -# .\ranap-exp.cnf +# ./ranap-exp.cnf # ../../tools/asn2wrs.py -e -F -p ranap -c ranap.cnf -s packet-ranap-template ranap.asn #.MODULE