aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/gsmmap
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-12-05 21:58:58 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-12-05 21:58:58 +0000
commit325b3355053c477c2877d10bf6721ead9c416e16 (patch)
treed12bd7099700e9cbd75349ce0e2d51302e5743e5 /asn1/gsmmap
parent437bfb99104c250b93f4eb51784ac13624f4f401 (diff)
fixe http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2064 GSM_MAP decodes SendRoutingInfov2 incorrectly
- Add TYPE_ATTR for RoutingInfo ( Fixes the choice problem). - Dissect ExternalSignalInfo - Use subtree for AddressStrings svn path=/trunk/; revision=23776
Diffstat (limited to 'asn1/gsmmap')
-rw-r--r--asn1/gsmmap/gsmmap.cnf66
-rw-r--r--asn1/gsmmap/packet-gsmmap-template.c3
2 files changed, 53 insertions, 16 deletions
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index 0ffb17e100..47cf5ca524 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -179,13 +179,13 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_isdn_address_string);
- proto_tree_add_item(tree, hf_gsm_map_extension, parameter_tvb, 0,1,FALSE);
- proto_tree_add_item(tree, hf_gsm_map_nature_of_number, parameter_tvb, 0,1,FALSE);
- proto_tree_add_item(tree, hf_gsm_map_number_plan, parameter_tvb, 0,1,FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_extension, parameter_tvb, 0,1,FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_nature_of_number, parameter_tvb, 0,1,FALSE);
+ proto_tree_add_item(subtree, hf_gsm_map_number_plan, parameter_tvb, 0,1,FALSE);
digit_str = unpack_digits(parameter_tvb, 1);
- proto_tree_add_string(tree, hf_gsm_map_address_digits, parameter_tvb, 1, -1, digit_str);
+ proto_tree_add_string(subtree, hf_gsm_map_address_digits, parameter_tvb, 1, -1, digit_str);
octet = tvb_get_guint8(parameter_tvb,0);
na = (octet & 0x70)>>4;
@@ -444,15 +444,13 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
tvbuff_t *parameter_tvb;
guint8 octet;
- proto_item *item;
proto_tree *subtree;
%(DEFAULT_BODY)s
if (!parameter_tvb)
return offset;
- item = get_ber_last_created_item();
- subtree = proto_item_add_subtree(item, ett_gsm_map_pdptypenumber);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_pdptypenumber);
octet = tvb_get_guint8(parameter_tvb,0);
switch(octet){
@@ -469,34 +467,29 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
#.FN_BODY RAIdentity VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb;
- proto_item *item;
proto_tree *subtree;
%(DEFAULT_BODY)s
if (!parameter_tvb)
return offset;
- item = get_ber_last_created_item();
- subtree = proto_item_add_subtree(item, ett_gsm_map_RAIdentity);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RAIdentity);
de_gmm_rai(parameter_tvb, subtree, 0, 3, NULL,0);
#.FN_BODY LAIFixedLength VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb;
- proto_item *item;
proto_tree *subtree;
%(DEFAULT_BODY)s
if (!parameter_tvb)
return offset;
- item = get_ber_last_created_item();
- subtree = proto_item_add_subtree(item, ett_gsm_map_LAIFixedLength);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LAIFixedLength);
dissect_e212_mcc_mnc(parameter_tvb, subtree, 0);
#.FN_BODY RadioResourceInformation VAL_PTR = &parameter_tvb
tvbuff_t *parameter_tvb;
- proto_item *item;
proto_tree *subtree;
%(DEFAULT_BODY)s
@@ -504,8 +497,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
if (!parameter_tvb)
return offset;
- item = get_ber_last_created_item();
- subtree = proto_item_add_subtree(item, ett_gsm_map_RadioResourceInformation);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RadioResourceInformation);
be_chan_type(tvb, subtree, 0, tvb_length_remaining(tvb,0), NULL, 0);
#.FN_BODY RANAP-ServiceHandover VAL_PTR = &parameter_tvb
@@ -544,6 +536,47 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
dissect_ranap_EncryptionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_mapEncryptionInformation);
+#.FN_PARS ProtocolId VAL_PTR = &ProtocolId
+
+#.FN_BODY ExternalSignalInfo
+ guint8 octet;
+ guint8 length;
+ tvbuff_t *next_tvb;
+ proto_tree *subtree;
+
+ 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){
+ /* gsm-0408 */
+ case 1:
+ break;
+ /* gsm-0806 */
+ case 2:
+ break;
+ /* gsm-BSSMAP TODO Is it correct to stripp off two first octets here?*/
+ case 3:
+ 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;
+}
+
+
#----------------------------------------------------------------------------------------
#.TYPE_ATTR
SS-Code TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ssCode_vals)
@@ -554,4 +587,5 @@ BearerServiceCode TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(Bearerser
Ext-TeleserviceCode TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(Teleservice_vals)
Ext-BearerServiceCode TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(Bearerservice_vals)
ChargingCharacteristics TYPE = FT_UINT16 DISPLAY = BASE_DEC BITMASK = 0x0f00 STRINGS = VALS(chargingcharacteristics_values)
+RoutingInfo TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(gsm_map_ch_RoutingInfo_vals)
#.END
diff --git a/asn1/gsmmap/packet-gsmmap-template.c b/asn1/gsmmap/packet-gsmmap-template.c
index 9efd842328..c5b4731771 100644
--- a/asn1/gsmmap/packet-gsmmap-template.c
+++ b/asn1/gsmmap/packet-gsmmap-template.c
@@ -153,6 +153,7 @@ static gint ett_gsm_map_LongSignalInfo = -1;
static gint ett_gsm_map_RadioResourceInformation =-1;
static gint ett_gsm_map_MSNetworkCapability =-1;
static gint ett_gsm_map_MSRadioAccessCapability = -1;
+static gint ett_gsm_map_externalsignalinfo = -1;
#include "packet-gsm_map-ett.c"
@@ -171,6 +172,7 @@ static guint32 opcode=0;
static guint32 errorCode;
static proto_tree *top_tree;
static int application_context_version;
+static guint ProtocolId;
guint protocolId;
guint AccessNetworkProtocolId;
const char *obj_id = NULL;
@@ -2271,6 +2273,7 @@ void proto_register_gsm_map(void) {
&ett_gsm_map_RadioResourceInformation,
&ett_gsm_map_MSNetworkCapability,
&ett_gsm_map_MSRadioAccessCapability,
+ &ett_gsm_map_externalsignalinfo,
#include "packet-gsm_map-ettarr.c"
};