aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-10-10 12:08:28 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-10-10 12:08:28 +0000
commit5ad34b26b6bedd0e42a5cf97b915cd5b12a758d3 (patch)
treeb7204d04a3b6eafc8bab7bf1f15d017ac9d3b9eb /asn1
parent1742b395c1d887fa4c6fae937892dfe322f381f1 (diff)
Dissect Signal info with gsm-0806 protocol id.
svn path=/trunk/; revision=26399
Diffstat (limited to 'asn1')
-rw-r--r--asn1/gsmmap/gsmmap.cnf97
-rw-r--r--asn1/gsmmap/packet-gsmmap-template.c22
2 files changed, 113 insertions, 6 deletions
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index b609726522..f6e8d9fb21 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -624,6 +624,84 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
dissect_ranap_EncryptionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_map_EncryptionInformation);
#.FN_PARS ProtocolId VAL_PTR = &ProtocolId
+#.FN_BODY Bss-APDU
+ guint8 octet;
+ guint8 length;
+ tvbuff_t *next_tvb;
+ proto_tree *subtree;
+/*
+ETS 300 599: December 2000 (GSM 09.02 version 4.19.1)
+5.6.9.1 BSS-apdu
+This parameter includes one or two concatenated complete 08.06 messages, as described in GSM 03.09
+and GSM 09.10. The Protocol ID indicates that the message or messages are according to GSM 08.06.
+For the coding of the messages see GSM 08.06 and GSM 08.08.
+*/
+ ProtocolId = 0xffffffff;
+%(DEFAULT_BODY)s
+if (!actx->value_ptr)
+ return offset;
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_externalsignalinfo);
+ switch (ProtocolId){
+ case 1:
+ /* gsm-0408 */
+ /* As per comment abowe Individual IE:(s) will be found here in TLV format
+ * Unfortunatly a branch for each IE must be made to call the apropriate
+ * function
+ */
+ /* Get tag */
+ octet = tvb_get_guint8(actx->value_ptr,0);
+ proto_tree_add_item(subtree, hf_gsm_map_ie_tag, actx->value_ptr, 0,1,FALSE);
+ /* get length */
+ length = tvb_get_guint8(actx->value_ptr,1);
+ proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
+ /* Branch on tag */
+ switch(octet){
+ case 4:
+ /* Dissect the data part */
+ de_bearer_cap(actx->value_ptr, subtree, 2, length, NULL, 0);
+ /* TODO: There may be more than one IE */
+ break;
+ default:
+ proto_tree_add_text(subtree, actx->value_ptr, 0, length, "If you want this decdoded send the packet to Wireshark dev");
+ break;
+ }/* switch(octet) */
+ break;
+ case 2:
+ /* gsm-0806 */
+ octet = tvb_get_guint8(actx->value_ptr,0);
+ /* Discrimination parameter */
+ proto_tree_add_item(subtree, hf_gsm_map_disc_par, actx->value_ptr, 0,1,FALSE);
+ if ( octet == 0) {/* DISCRIMINATION TS 48 006(GSM 08.06 version 5.3.0) */
+ /* Strip off discrimination and length */
+ proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
+ next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ dissect_bssmap(next_tvb, actx->pinfo, subtree);
+ }else if(octet==1){
+ proto_tree_add_item(subtree, hf_gsm_map_dlci, actx->value_ptr, 1,1,FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 2,1,FALSE);
+ next_tvb = tvb_new_subset(actx->value_ptr, 3, -1, -1);
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
+ break;
+ case 3:
+ /* gsm-BSSMAP -- Value 3 is reserved and must not be used*/
+ octet = tvb_get_guint8(actx->value_ptr,0);
+ length = tvb_get_guint8(actx->value_ptr,1);
+ if ( octet == 0) {/* DISCRIMINATION TS 48 006 */
+ next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ dissect_bssmap(next_tvb, actx->pinfo, subtree);
+ }
+ break;
+ /* ets-300102-1 (~Q.931 ) */
+ case 4:
+ octet = tvb_get_guint8(actx->value_ptr,0);
+ length = tvb_get_guint8(actx->value_ptr,1);
+ if ( octet == 4 )
+ dissect_q931_bearer_capability_ie(actx->value_ptr, 2, length, subtree);
+ break;
+ default:
+ break;
+ }/*switch (ProtocolId)*/
#.FN_BODY ExternalSignalInfo
/*
@@ -656,7 +734,7 @@ if (!actx->value_ptr)
proto_tree_add_item(subtree, hf_gsm_map_ie_tag, actx->value_ptr, 0,1,FALSE);
/* get length */
length = tvb_get_guint8(actx->value_ptr,1);
- proto_tree_add_item(subtree, hf_gsm_map_ie_len, actx->value_ptr, 1,1,FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
/* Branch on tag */
switch(octet){
case 4:
@@ -670,8 +748,21 @@ if (!actx->value_ptr)
}/* switch(octet) */
break;
case 2:
- /* gsm-0806 */
- proto_tree_add_text(subtree, actx->value_ptr, 0, -1, "If you want this decdoded send the packet to Wireshark dev");
+ /* gsm-0806 */
+ octet = tvb_get_guint8(actx->value_ptr,0);
+ /* Discrimination parameter */
+ proto_tree_add_item(subtree, hf_gsm_map_disc_par, actx->value_ptr, 0,1,FALSE);
+ if ( octet == 0) {/* DISCRIMINATION TS 48 006(GSM 08.06 version 5.3.0) */
+ /* Strip off discrimination and length */
+ proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
+ next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ dissect_bssmap(next_tvb, actx->pinfo, subtree);
+ }else if(octet==1){
+ proto_tree_add_item(subtree, hf_gsm_map_dlci, actx->value_ptr, 1,1,FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 2,1,FALSE);
+ next_tvb = tvb_new_subset(actx->value_ptr, 3, -1, -1);
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
break;
case 3:
/* gsm-BSSMAP TODO Is it correct to stripp off two first octets here?*/
diff --git a/asn1/gsmmap/packet-gsmmap-template.c b/asn1/gsmmap/packet-gsmmap-template.c
index e8f58ab9eb..bafed0e2e5 100644
--- a/asn1/gsmmap/packet-gsmmap-template.c
+++ b/asn1/gsmmap/packet-gsmmap-template.c
@@ -156,7 +156,9 @@ static int hf_gsm_map_cbs_coding_grp15_mess_code = -1;
static int hf_gsm_map_cbs_coding_grp15_class = -1;
static int hf_gsm_map_tmsi = -1;
static int hf_gsm_map_ie_tag = -1;
-static int hf_gsm_map_ie_len = -1;
+static int hf_gsm_map_len = -1;
+static int hf_gsm_map_disc_par = -1;
+static int hf_gsm_map_dlci = -1;
#include "packet-gsm_map-hf.c"
@@ -242,6 +244,12 @@ const value_string gsm_map_etsi_defined_pdp_vals[] = {
{ 0, NULL }
};
+static const value_string gsm_map_disc_par_vals[] = {
+ { 0, "Not Transparent" },
+ { 1, "Transparent" },
+ { 0, NULL }
+};
+
char *
unpack_digits(tvbuff_t *tvb, int offset) {
@@ -2633,10 +2641,18 @@ void proto_register_gsm_map(void) {
{ "Tag", "gsm_map.ie_tag",
FT_UINT8, BASE_DEC, NULL, 0,
"GSM 04.08 tag", HFILL }},
- { &hf_gsm_map_ie_len,
- { "Length", "gsm_map.ie_length",
+ { &hf_gsm_map_len,
+ { "Length", "gsm_map.length",
FT_UINT8, BASE_DEC, NULL, 0,
"Length", HFILL }},
+ { &hf_gsm_map_disc_par,
+ { "Discrimination parameter", "gsm_map.disc_par",
+ FT_UINT8, BASE_DEC, VALS(gsm_map_disc_par_vals), 0,
+ "Discrimination parameter", HFILL }},
+ { &hf_gsm_map_dlci,
+ { "DLCI", "gsm_map.disc_par",
+ FT_UINT8, BASE_DEC, NULL, 0,
+ "Data Link Connection Indicator", HFILL }},
#include "packet-gsm_map-hfarr.c"
};