aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-05-23 05:35:20 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-05-23 05:35:20 +0000
commit28509cb3111d1bd96fb179dd50a4330fa52c1685 (patch)
treeac9222d28a8766f28125a90db9b961da679f83ab
parent4fc8c5fe351a7326aa6bd326deadc05c2d2b24b8 (diff)
Dissect rrlp payload.
svn path=/trunk/; revision=18211
-rw-r--r--epan/dissectors/packet-bssap.c57
-rw-r--r--epan/dissectors/packet-gprs-llc.c8
2 files changed, 50 insertions, 15 deletions
diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c
index 7078a15b71..ecbc604494 100644
--- a/epan/dissectors/packet-bssap.c
+++ b/epan/dissectors/packet-bssap.c
@@ -12,8 +12,8 @@
*
* $Id$
*
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
@@ -353,6 +353,7 @@ static gint ett_bssap_global_cn_id = -1;
static gint ett_bssap_plmn = -1;
static dissector_handle_t data_handle;
+static dissector_handle_t rrlp_handle;
static dissector_table_t bssap_dissector_table;
static dissector_table_t bsap_dissector_table;
@@ -754,11 +755,14 @@ dissect_bssap_channel_needed(tvbuff_t *tvb, proto_tree *tree, int offset)
}
/* 18.4.3 Downlink Tunnel Payload Control and Info */
static int
-dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
proto_item *item = NULL;
proto_tree *ie_tree = NULL;
+ tvbuff_t *next_tvb;
guint8 ie_len;
+ guint8 octet;
+ guint8 prot_disc;
ie_len = tvb_get_guint8(tvb,offset+1);
item = proto_tree_add_item(tree, hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE);
@@ -773,11 +777,28 @@ dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, proto_tree *t
* TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling.
* For coding, see 3GPP TS 44.064.
*/
- /* Bit 3
- * E: Cipher Request. When set to 1 indicates that the SGSN shall cipher the payload, when
- * set to 0 indicates that the SGSN shall not cipher the payload.
+
+ proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE);
+ octet = tvb_get_guint8(tvb,offset);
+ prot_disc = (octet&0x78)>>3;
+
+ /* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
+ * when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
*/
- proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE);
+ proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, FALSE);
+
+ /* octet 3 bit 2 - 1
+ * Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association
+ * between Tunnel Priority and LLC SAPs.
+ */
+ proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE);
+ /* Tunnel payload */
+ next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4);
+
+ if ((prot_disc == 2)&&(rrlp_handle))
+ call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
+ else
+ call_dissector(data_handle, next_tvb, pinfo, ie_tree);
return offset + ie_len;
@@ -1459,11 +1480,14 @@ static const value_string bssap_tom_prot_disc_values[] = {
{ 0, NULL }
};
static int
-dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, proto_tree *tree, int offset)
+dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
{
proto_item *item = NULL;
proto_tree *ie_tree = NULL;
+ tvbuff_t *next_tvb;
guint8 ie_len;
+ guint8 octet;
+ guint8 prot_disc;
ie_len = tvb_get_guint8(tvb,offset+1);
item = proto_tree_add_item(tree, hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE);
@@ -1479,6 +1503,8 @@ dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, proto_tree *t
* For coding, see 3GPP TS 44.064.
*/
proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE);
+ octet = tvb_get_guint8(tvb,offset);
+ prot_disc = (octet&0x78)>>3;
/* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
* when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
@@ -1490,6 +1516,13 @@ dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, proto_tree *t
* between Tunnel Priority and LLC SAPs.
*/
proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE);
+ /* Tunnel payload */
+ next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4);
+
+ if ((prot_disc == 2)&&(rrlp_handle))
+ call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
+ else
+ call_dissector(data_handle, next_tvb, pinfo, ie_tree);
return offset + ie_len;
@@ -1671,7 +1704,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* Downlink Tunnel Payload Control and Info 18.4.3 M TLV 3-223 */
if ( check_ie(tvb, tree, &offset, BSSAP_DLINK_TNL_PLD_CTR_AND_INF))
- offset = dissect_bssap_dlink_tunnel_payload_control_and_info(tvb, bssap_tree, offset);
+ offset = dissect_bssap_dlink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
if (tvb_length_remaining(tvb,offset) == 0)
return;
@@ -1684,7 +1717,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* Uplink Tunnel Payload Control and Info 18.4.25 M TLV 3-223 */
if ( check_ie(tvb, tree, &offset, BSSAP_ULINK_TNL_PLD_CTR_AND_INF))
- offset = dissect_bssap_ulink_tunnel_payload_control_and_info(tvb, bssap_tree, offset);
+ offset = dissect_bssap_ulink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
if (tvb_length_remaining(tvb,offset) == 0)
return;
@@ -2116,7 +2149,7 @@ dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return(TRUE);
}
-/* Register the protocol with Wireshark */
+/* Register the protocol with Ethereal */
void
proto_register_bssap(void)
{
@@ -2470,4 +2503,6 @@ proto_reg_handoff_bssap(void)
dissector_add("sccp.ssn", SCCP_SSN_BSSAP_PLUS, bssap_plus_handle);
data_handle = find_dissector("data");
+ rrlp_handle = find_dissector("rrlp");
+
}
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c
index e361390dbe..ba3083d314 100644
--- a/epan/dissectors/packet-gprs-llc.c
+++ b/epan/dissectors/packet-gprs-llc.c
@@ -4,8 +4,8 @@
*
* $Id$
*
- * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@wireshark.org>
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* This program is free software; you can redistribute it and/or
@@ -220,7 +220,7 @@ static const value_string xid_param_type_str[] = {
static const value_string tompd_formats[] = {
{0x0, "Not specified"},
{0x1, "TIA/EIA-136"},
- {0x2, "Reserved value 2"},
+ {0x2, "RRLP"},
{0x3, "Reserved value 3"},
{0x4, "Reserved value 4"},
{0x5, "Reserved value 5"},
@@ -1164,7 +1164,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
-/* Register the protocol with Wireshark */
+/* Register the protocol with Ethereal */
/* this format is require because a script is used to build the C function */
/* that calls all the protocol registration. */