summaryrefslogtreecommitdiff
path: root/asn1/gsm_map/packet-gsm_map-template.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-06-20 21:35:40 -0400
committerMichael Mann <mmann78@netscape.net>2014-06-22 21:08:21 +0000
commit9356d5c689fa911b0b13d4b2a0cd6e9208d60f6d (patch)
treef3265efe4137c8a09995b448bf0c4bcdecf4e5a9 /asn1/gsm_map/packet-gsm_map-template.c
parent2c0214efff7b3421355e42ee7f3075c2f3181d3e (diff)
downloadwireshark-9356d5c689fa911b0b13d4b2a0cd6e9208d60f6d.tar.gz
convert to proto_tree_add_subtree[_format] for ASN.1 dissectors
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef Reviewed-on: https://code.wireshark.org/review/2509 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1/gsm_map/packet-gsm_map-template.c')
-rw-r--r--asn1/gsm_map/packet-gsm_map-template.c188
1 files changed, 62 insertions, 126 deletions
diff --git a/asn1/gsm_map/packet-gsm_map-template.c b/asn1/gsm_map/packet-gsm_map-template.c
index dca213843f..f507161db0 100644
--- a/asn1/gsm_map/packet-gsm_map-template.c
+++ b/asn1/gsm_map/packet-gsm_map-template.c
@@ -1850,67 +1850,51 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,
/* Private extension container for PLMN Data */
static void dissect_gsm_mapext_PlmnContainer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "MAP Ext. Plmn Container");
- tree = proto_item_add_subtree(item, ett_gsm_old_PlmnContainer_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_gsm_old_PlmnContainer_U, NULL, "MAP Ext. Plmn Container");
+
dissect_gsm_old_PlmnContainer(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_SriResExtension(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_SriResExtension_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_SriResExtension_U, NULL, "Nokia Extension");
dissect_NokiaMAP_Extensions_SriResExtension(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_CanLocArgExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_CanLocArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_CanLocArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_CanLocArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_ATMargExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_ATMargExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_ATMargExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_ATMargExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_DTMargExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_DTMargExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_DTMargExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_DTMargExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
@@ -1922,15 +1906,12 @@ static void dissect_NokiaMAP_ext_NumberPorted(tvbuff_t *tvb, packet_info *pinfo,
}
static void dissect_NokiaMAP_ext_ATMresExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_ATMresExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_ATMresExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_ATMresExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
@@ -1942,106 +1923,82 @@ static void dissect_NokiaMAP_ext_AbsentSubscriberExt(tvbuff_t *tvb, packet_info
}
static void dissect_NokiaMAP_ext_SriForSMArgExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_SriForSMArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_SriForSMArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_SriForSMArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_ReportSMDelStatArgExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_ReportSMDelStatArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_ReportSMDelStatArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_ReportSMDelStatArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_UdlArgExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_UdlArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_UdlArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_UdlArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_RoamNotAllowedExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_RoamNotAllowedExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_RoamNotAllowedExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_RoamNotAllowedExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_MO_ForwardSM_ArgExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_MO_ForwardSM_ArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_MO_ForwardSM_ArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_MO_ForwardSM_ArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_ErrOlcmInfoTableExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_ErrOlcmInfoTableExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_ErrOlcmInfoTableExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_ErrOlcmInfoTableExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_RoutingCategoryExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_RoutingCategoryExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_RoutingCategoryExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_RoutingCategoryExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_AnyTimeModArgExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_AnyTimeModArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_AnyTimeModArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_AnyTimeModArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
@@ -2073,94 +2030,73 @@ static void dissect_NokiaMAP_ext_AllowedServiceData(tvbuff_t *tvb, packet_info *
}
static void dissect_NokiaMAP_ext_SriExtension(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_SriExtension_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_SriExtension_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_SriExtension(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ExtraSignalInfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_ExtraSignalInfo_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_ExtraSignalInfo_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_ExtraSignalInfo(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_SS_DataExtension(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_SS_DataExtension_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_SS_DataExtension_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_SS_DataExtension(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_HOExtension(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_HO_Ext_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_HO_Ext_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_HO_Ext(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_UlResExtension(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_UlResExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_UlResExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_UlResExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_IsdArgExtension(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_IsdArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_IsdArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_IsdArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}
static void dissect_NokiaMAP_ext_DsdArgExt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
- proto_item *item=NULL;
- proto_tree *tree=NULL;
+ proto_tree *tree;
asn1_ctx_t asn1_ctx;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* create display subtree for the protocol */
- if(parent_tree){
- item = proto_tree_add_text(parent_tree, tvb, 0, -1, "Nokia Extension");
- tree = proto_item_add_subtree(item, ett_NokiaMAP_Extensions_DsdArgExt_U);
- }
+ tree = proto_tree_add_subtree(parent_tree, tvb, 0, -1, ett_NokiaMAP_Extensions_DsdArgExt_U, NULL, "Nokia Extension");
+
dissect_NokiaMAP_Extensions_DsdArgExt(FALSE, tvb, 0, &asn1_ctx, tree, -1);
}