aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_bsslap.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-11-07 06:04:04 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-11-07 06:04:04 +0000
commit98ae8601155d9d7cac24be0eea380848d7a4d321 (patch)
tree351652e36770577b6c27928739157a8cb92a7b0c /epan/dissectors/packet-gsm_bsslap.c
parent80d1b0a793e603f8710a60e2b640b3e70304c6c5 (diff)
From Johnny Mitrevski:
Added RRLP functionality to the BSSLAP dissector that would be useful. svn path=/trunk/; revision=26725
Diffstat (limited to 'epan/dissectors/packet-gsm_bsslap.c')
-rw-r--r--epan/dissectors/packet-gsm_bsslap.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/epan/dissectors/packet-gsm_bsslap.c b/epan/dissectors/packet-gsm_bsslap.c
index 2b3d65b457..3e38082d19 100644
--- a/epan/dissectors/packet-gsm_bsslap.c
+++ b/epan/dissectors/packet-gsm_bsslap.c
@@ -39,6 +39,8 @@
#include "packet-gsm_a_common.h"
+static dissector_handle_t bsslap_rrlp_handle = NULL;
+
/* Initialize the protocol and registered fields */
static int proto_gsm_bsslap = -1;
static int hf_gsm_bsslap_msg_type = -1;
@@ -234,7 +236,7 @@ static guint8
de_rrlp_flg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
-
+
curr_offset = offset;
proto_tree_add_item(tree, hf_gsm_bsslap_rrlp_flg, tvb, curr_offset, 1, FALSE);
curr_offset++;
@@ -244,15 +246,23 @@ de_rrlp_flg(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len _U_, gcha
static guint8
de_rrlp_ie(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
- guint32 curr_offset;
-
- curr_offset = offset;
- /* RRLP APDU (3GPP TS 44.031)*/
- proto_tree_add_text(tree,tvb, curr_offset, len,"RRLP APDU Not decoded yet");
-
- curr_offset++;
-
- return(len);
+ guint32 curr_offset;
+ tvbuff_t *rrlp_tvb;
+ static packet_info p_info;
+ guint16 length;
+
+ length = tvb_get_ntohs(tvb, offset);
+
+ curr_offset = offset + 2;
+ if (length > 0)
+ {
+ rrlp_tvb = tvb_new_subset(tvb, curr_offset, length, length);
+ if (bsslap_rrlp_handle)
+ call_dissector(bsslap_rrlp_handle, rrlp_tvb, &p_info, tree);
+ }
+
+ curr_offset += length;
+ return(curr_offset - offset);
}
/*
* 5.17 Cell Identity List IE
@@ -850,6 +860,7 @@ dissect_gsm_bsslap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_reg_handoff_gsm_bsslap(void)
{
+ bsslap_rrlp_handle = find_dissector("rrlp");
}
void