Second step in introducing asn context to BER dissectors just like in PER.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 13 May 2007 20:58:29 +0000 (20:58 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 13 May 2007 20:58:29 +0000 (20:58 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21753 f5534014-38df-0310-8fa8-9805f1628bb7

202 files changed:
asn1/MAP_Dialogue/MAP_DialoguePDU.cnf
asn1/MAP_Dialogue/packet-MAP-DialoguePDU-template.c
asn1/acp133/packet-acp133-template.c
asn1/acse/acse.cnf
asn1/acse/packet-acse-template.c
asn1/ansi_map/ansi_map.cnf
asn1/ansi_map/packet-ansi_map-template.c
asn1/camel/camel.cnf
asn1/camel/packet-camel-template.c
asn1/cdt/cdt.cnf
asn1/cdt/packet-cdt-template.c
asn1/cmip/cmip.cnf
asn1/cmip/packet-cmip-template.c
asn1/cms/cms.cnf
asn1/cms/packet-cms-template.c
asn1/dap/dap.cnf
asn1/dap/packet-dap-template.c
asn1/disp/disp.cnf
asn1/disp/packet-disp-template.c
asn1/dop/dop.cnf
asn1/dop/packet-dop-template.c
asn1/dsp/packet-dsp-template.c
asn1/ess/ess.cnf
asn1/ess/packet-ess-template.c
asn1/ftam/ftam.cnf
asn1/ftam/packet-ftam-template.c
asn1/ftbp/packet-ftbp-template.c
asn1/gnm/packet-gnm-template.c
asn1/gsm_ss/gsm_ss.cnf
asn1/gsm_ss/packet-gsm_ss-template.c
asn1/gsm_ss/packet-gsm_ss-template.h
asn1/gsmmap/gsmmap.cnf
asn1/gsmmap/packet-gsm_map-template.c
asn1/h248/h248.cnf
asn1/h248/packet-h248-template.c
asn1/inap/inap.asn
asn1/inap/inap.cnf
asn1/inap/packet-inap-template.c
asn1/ldap/ldap.cnf
asn1/ldap/packet-ldap-template.c
asn1/mms/mms.cnf
asn1/mms/packet-mms-template.c
asn1/ocsp/ocsp.cnf
asn1/ocsp/packet-ocsp-template.c
asn1/pkcs1/packet-pkcs1-template.c
asn1/pkcs12/packet-pkcs12-template.c
asn1/pkcs12/pkcs12.cnf
asn1/pkinit/packet-pkinit-template.c
asn1/pkinit/packet-pkinit-template.h
asn1/pkix1explicit/packet-pkix1explicit-template.c
asn1/pkix1explicit/packet-pkix1explicit-template.h
asn1/pkix1explicit/pkix1explicit.cnf
asn1/pkix1implicit/packet-pkix1implicit-template.c
asn1/pkix1implicit/packet-pkix1implicit-template.h
asn1/pkixcmp/cmp.cnf
asn1/pkixcmp/packet-cmp-template.c
asn1/pkixcrmf/crmf.cnf
asn1/pkixcrmf/packet-crmf-template.c
asn1/pkixproxy/packet-pkixproxy-template.c
asn1/pkixqualified/packet-pkixqualified-template.c
asn1/pkixqualified/pkixqualified.cnf
asn1/pkixtsp/packet-pkixtsp-template.c
asn1/pres/packet-pres-template.c
asn1/pres/pres.cnf
asn1/q932/packet-q932-ros-template.c
asn1/q932/packet-q932-template.c
asn1/q932/q932-ros.cnf
asn1/qsig/packet-qsig-template.c
asn1/ros/packet-ros-template.c
asn1/ros/ros.cnf
asn1/rtse/packet-rtse-template.c
asn1/rtse/rtse.cnf
asn1/s4406/packet-s4406-template.c
asn1/s4406/s4406.cnf
asn1/smrse/packet-smrse-template.c
asn1/smrse/smrse.cnf
asn1/snmp/packet-snmp-template.c
asn1/snmp/snmp.cnf
asn1/spnego/packet-spnego-template.c
asn1/spnego/spnego.cnf
asn1/tcap/packet-tcap-template.c
asn1/tcap/tcap.cnf
asn1/wlancertextn/packet-wlancertextn-template.c
asn1/x411/packet-x411-template.c
asn1/x411/x411.cnf
asn1/x420/packet-x420-template.c
asn1/x420/x420.cnf
asn1/x509af/packet-x509af-template.c
asn1/x509af/x509af.cnf
asn1/x509ce/packet-x509ce-template.c
asn1/x509ce/x509ce.cnf
asn1/x509if/packet-x509if-template.c
asn1/x509if/x509if.cnf
asn1/x509sat/packet-x509sat-template.c
epan/asn1.h
epan/camel-persistentdata.c
epan/dissectors/packet-MAP_DialoguePDU.c
epan/dissectors/packet-acp133.c
epan/dissectors/packet-acse.c
epan/dissectors/packet-acse.h
epan/dissectors/packet-ansi_map.c
epan/dissectors/packet-app-pkix-cert.c
epan/dissectors/packet-ber.c
epan/dissectors/packet-ber.h
epan/dissectors/packet-camel.c
epan/dissectors/packet-cdt.c
epan/dissectors/packet-cdt.h
epan/dissectors/packet-cmip.c
epan/dissectors/packet-cmip.h
epan/dissectors/packet-cmp.c
epan/dissectors/packet-cmp.h
epan/dissectors/packet-cms.c
epan/dissectors/packet-cms.h
epan/dissectors/packet-crmf.c
epan/dissectors/packet-crmf.h
epan/dissectors/packet-dap.c
epan/dissectors/packet-dap.h
epan/dissectors/packet-disp.c
epan/dissectors/packet-disp.h
epan/dissectors/packet-dmp.c
epan/dissectors/packet-dop.c
epan/dissectors/packet-dop.h
epan/dissectors/packet-dsp.c
epan/dissectors/packet-dsp.h
epan/dissectors/packet-dtls.c
epan/dissectors/packet-ess.c
epan/dissectors/packet-ftam.c
epan/dissectors/packet-ftam.h
epan/dissectors/packet-ftbp.c
epan/dissectors/packet-gnm.c
epan/dissectors/packet-gsm_a.c
epan/dissectors/packet-gsm_map.c
epan/dissectors/packet-gsm_map.h
epan/dissectors/packet-gsm_ss.c
epan/dissectors/packet-gsm_ss.h
epan/dissectors/packet-h248.c
epan/dissectors/packet-inap.c
epan/dissectors/packet-isakmp.c
epan/dissectors/packet-kerberos.c
epan/dissectors/packet-kerberos.h
epan/dissectors/packet-kpasswd.c
epan/dissectors/packet-ldap.c
epan/dissectors/packet-logotypecertextn.c
epan/dissectors/packet-mikey.c
epan/dissectors/packet-mms.c
epan/dissectors/packet-mms.h
epan/dissectors/packet-ns_cert_exts.c
epan/dissectors/packet-ocsp.c
epan/dissectors/packet-p_mul.c
epan/dissectors/packet-pkcs1.c
epan/dissectors/packet-pkcs1.h
epan/dissectors/packet-pkcs12.c
epan/dissectors/packet-pkinit.c
epan/dissectors/packet-pkinit.h
epan/dissectors/packet-pkix1explicit.c
epan/dissectors/packet-pkix1explicit.h
epan/dissectors/packet-pkix1implicit.c
epan/dissectors/packet-pkix1implicit.h
epan/dissectors/packet-pkixproxy.c
epan/dissectors/packet-pkixqualified.c
epan/dissectors/packet-pkixtsp.c
epan/dissectors/packet-pres.c
epan/dissectors/packet-q932-ros.c
epan/dissectors/packet-q932.c
epan/dissectors/packet-q932.h
epan/dissectors/packet-qsig.c
epan/dissectors/packet-qsig.h
epan/dissectors/packet-ros.c
epan/dissectors/packet-ros.h
epan/dissectors/packet-rtse.c
epan/dissectors/packet-rtse.h
epan/dissectors/packet-s4406.c
epan/dissectors/packet-sccp.c
epan/dissectors/packet-smrse.c
epan/dissectors/packet-snmp.c
epan/dissectors/packet-spnego.c
epan/dissectors/packet-ssl.c
epan/dissectors/packet-tcap.c
epan/dissectors/packet-tcap.h
epan/dissectors/packet-uma.c
epan/dissectors/packet-wlancertextn.c
epan/dissectors/packet-x411.c
epan/dissectors/packet-x411.h
epan/dissectors/packet-x420.c
epan/dissectors/packet-x420.h
epan/dissectors/packet-x509af.c
epan/dissectors/packet-x509af.h
epan/dissectors/packet-x509ce.c
epan/dissectors/packet-x509ce.h
epan/dissectors/packet-x509if.c
epan/dissectors/packet-x509if.h
epan/dissectors/packet-x509sat.c
epan/dissectors/packet-x509sat.h
epan/gcp.h
epan/tcap-persistentdata.c
gtk/camel_counter.c
gtk/camel_srt.c
gtk/gsm_map_stat.c
gtk/gsm_map_summary.c
tap-camelcounter.c
tap-camelsrt.c
tools/asn2wrs.py

index 74b6adad207e5cdfab3d37bb8f6d8e44a7ae7e7d..70e0f28d91154829918330184501d939ba39a1c5 100644 (file)
@@ -13,6 +13,7 @@ MAP-ST-DataTypes gsm_map
 #.EXPORTS
 
 #.PDU
+MAP-DialoguePDU
 
 #.NO_EMIT
 
index 067f182a9e2df2d69b0d37fb1bc18d87da91f06b..835de236b020714dd576a20d7b373add3cc7ef31 100644 (file)
@@ -29,6 +29,7 @@
 #include <glib.h>
 #include <epan/packet.h>
 #include <epan/conversation.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -49,11 +50,6 @@ int proto_MAP_DialoguePDU = -1;
 
 #include "packet-MAP_DialoguePDU-fn.c"
 
-static void
-dissect_MAP_Dialogue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
-{
-  dissect_MAP_DialoguePDU_MAP_DialoguePDU(FALSE, tvb, 0, pinfo, parent_tree, -1);
-}
 
 /*--- proto_register_MAP_DialoguePDU -------------------------------------------*/
 void proto_register_MAP_DialoguePDU(void) {
@@ -70,7 +66,7 @@ void proto_register_MAP_DialoguePDU(void) {
 
   /* Register protocol */
   proto_MAP_DialoguePDU = proto_register_protocol(PNAME, PSNAME, PFNAME);
-  register_dissector("MAP_DialoguePDU", dissect_MAP_Dialogue, proto_MAP_DialoguePDU);
+  register_dissector("MAP_DialoguePDU", dissect_MAP_DialoguePDU_PDU, proto_MAP_DialoguePDU);
   /* Register fields and subtrees */
   proto_register_field_array(proto_MAP_DialoguePDU, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
@@ -80,7 +76,7 @@ void proto_register_MAP_DialoguePDU(void) {
 
 /*--- proto_reg_handoff_MAP_DialoguePDU ---------------------------------------*/
 void proto_reg_handoff_MAP_DialoguePDU(void) {
-       register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_MAP_Dialogue, proto_MAP_DialoguePDU, 
+       register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_MAP_DialoguePDU_PDU, proto_MAP_DialoguePDU, 
          "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) map-DialoguePDU(1) version1(1)");
 
 }
index 241c5877c9f41d6ee7cdc1b22af6eee5b88bbd4b..57c270b47037989bb3726971a62b96f89b5a4d94 100644 (file)
@@ -31,6 +31,7 @@
 #include <epan/packet.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
index ad7242c607e9e61fc46f91cb2dc78fe3e4812500..231e4067aaa7b3872b71714fba3d886b32b0039f 100644 (file)
@@ -48,45 +48,45 @@ ACRQ-apdu/aSO-context-name  aCRQ_aSO_context_name
      * time being  just remove this tag manually inside the EXTERNAL
      * dissector.
      */
-       offset = dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
-       offset = dissect_ber_length(pinfo, tree, tvb, offset, &len1, &ind_field);
+       offset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+       offset = dissect_ber_length(actx->pinfo, tree, tvb, offset, &len1, &ind_field);
    }
-   offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+   offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 EXTERNALt_sequence, hf_index, ett_acse_EXTERNALt);
 
 #.FN_PARS Authentication-value-other/other-mechanism-name  
   FN_VARIANT = _str VAL_PTR = &object_identifier_id
 
 #.FN_BODY Authentication-value-other/other-mechanism-value
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, top_tree);
 
 #.FN_BODY PDV-list/presentation-data-values/simple-ASN1-type
 /*XXX not implemented yet */
 
 #.FN_BODY AARQ-apdu/aSO-context-name
-  offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_object_identifier_str(FALSE, actx->pinfo, tree, tvb, offset,
                                          hf_index, &object_identifier_id);
 
 #.FN_BODY AARE-apdu/aSO-context-name
-  offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_object_identifier_str(FALSE, actx->pinfo, tree, tvb, offset,
                                          hf_index, &object_identifier_id);
 
 #.FN_BODY ACRQ-apdu/aSO-context-name
-  offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_object_identifier_str(FALSE, actx->pinfo, tree, tvb, offset,
                                          hf_index, &object_identifier_id);
 
 #.FN_BODY ACRP-apdu/aSO-context-name
-  offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_object_identifier_str(FALSE, actx->pinfo, tree, tvb, offset,
                                          hf_index, &object_identifier_id);
 
 #.FN_BODY EXTERNALt/indirect-reference
   char *oid;
-  offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_integer(FALSE, actx->pinfo, tree, tvb, offset,
                 hf_acse_indirect_reference,
                 &indir_ref);
 
   /* look up the indirect reference */
-  if((oid = find_oid_by_pres_ctx_id(pinfo, indir_ref)) != NULL) {
+  if((oid = find_oid_by_pres_ctx_id(actx->pinfo, indir_ref)) != NULL) {
     object_identifier_id = ep_strdup(oid);
   }
 
@@ -97,7 +97,7 @@ ACRQ-apdu/aSO-context-name    aCRQ_aSO_context_name
   FN_VARIANT = _str VAL_PTR = &object_identifier_id
 
 #.FN_BODY EXTERNALt/encoding/single-ASN1-type
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree ? top_tree : tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, top_tree ? top_tree : tree);
 
 #.FN_PARS Release-request-reason
   VAL_PTR=&reason
@@ -107,8 +107,8 @@ ACRQ-apdu/aSO-context-name  aCRQ_aSO_context_name
  
   %(DEFAULT_BODY)s
 
-  if((reason != -1) && check_col(pinfo->cinfo, COL_INFO))
-   col_append_fstr(pinfo->cinfo, COL_INFO, "Release-Request (%%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%%d)"));
+  if((reason != -1) && check_col(actx->pinfo->cinfo, COL_INFO))
+   col_append_fstr(actx->pinfo->cinfo, COL_INFO, "Release-Request (%%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%%d)"));
 
 
 #.FN_PARS Release-response-reason
@@ -119,8 +119,8 @@ ACRQ-apdu/aSO-context-name  aCRQ_aSO_context_name
  
   %(DEFAULT_BODY)s
 
-  if((reason != -1) && check_col(pinfo->cinfo, COL_INFO))
-   col_append_fstr(pinfo->cinfo, COL_INFO, "Release-Response (%%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%%d)"));
+  if((reason != -1) && check_col(actx->pinfo->cinfo, COL_INFO))
+   col_append_fstr(actx->pinfo->cinfo, COL_INFO, "Release-Response (%%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%%d)"));
 
 
 #.FIELD_ATTR
index f22adf9d1eb7bdf9f0c1320926ef6d0f0ec31eb1..55df3ab10b0b169a39f1ee4533e89286c2dcbfbe 100644 (file)
@@ -155,6 +155,8 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        proto_item    *item=NULL;
        proto_tree    *tree=NULL;
        char *oid;
+       asn1_ctx_t asn1_ctx;
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
 
        /* first, try to check length   */
@@ -230,7 +232,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        /*  postpone it before dissector will have more information */
        while (tvb_reported_length_remaining(tvb, offset) > 0){
                int old_offset=offset;
-               offset = dissect_acse_ACSE_apdu(FALSE, tvb, offset, pinfo, tree, -1);
+               offset = dissect_acse_ACSE_apdu(FALSE, tvb, offset, &asn1_ctx, tree, -1);
                if(offset == old_offset ){
                        proto_tree_add_text(tree, tvb, offset, -1,"Malformed packet");
                        offset = tvb_length(tvb);
index f07c41b465d55c9025ebe657433b8fb8401af036..c4c3c265dd5c6a9bac9c48e2bc8ceec266819634 100644 (file)
@@ -25,25 +25,25 @@ OriginationRequestRes
   OperationCode = OperationCode&0x00ff;
 
   ansi_map_is_invoke = TRUE;   
-  if (check_col(pinfo->cinfo, COL_INFO)){
-         col_set_str(pinfo->cinfo, COL_INFO, val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
+         col_set_str(actx->pinfo->cinfo, COL_INFO, val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
   }
   /* No Data */
   if(tvb_length_remaining(tvb, offset)<=0){
-               update_saved_invokedata(pinfo, tree, tvb);
+               update_saved_invokedata(actx->pinfo, tree, tvb);
          return offset;
 
   }
 
-       offset = dissect_invokeData(pinfo, tree, tvb, offset);
-       update_saved_invokedata(pinfo, tree, tvb);
+       offset = dissect_invokeData(tree, tvb, offset, actx);
+       update_saved_invokedata(actx->pinfo, tree, tvb);
 
 #.FN_BODY ReturnParameters
   struct amsi_map_invokedata_t *ansi_map_saved_invokedata;
   struct tcap_private_t *p_private_tcap;
   proto_item *item;
-  address* src = &(pinfo->src);
-  address* dst = &(pinfo->dst);
+  address* src = &(actx->pinfo->src);
+  address* dst = &(actx->pinfo->dst);
   guint8 *src_str;
   guint8 *dst_str;
   char *buf;
@@ -53,8 +53,8 @@ OriginationRequestRes
   dst_str = address_to_str(dst);
 
   /* Data from the TCAP dissector */
-  if (pinfo->private_data != NULL){
-         p_private_tcap=pinfo->private_data;
+  if (actx->pinfo->private_data != NULL){
+         p_private_tcap=actx->pinfo->private_data;
          /* The hash string needs to contain src and dest to distiguish differnt flows */
          src_str = address_to_str(src);
          dst_str = address_to_str(dst);
@@ -73,9 +73,9 @@ OriginationRequestRes
   }else{
          OperationCode = OperationCode & 0x00ff;
   }
-  if (check_col(pinfo->cinfo, COL_INFO)){
-         col_clear(pinfo->cinfo, COL_INFO);
-         col_add_fstr(pinfo->cinfo, COL_INFO,"%s Response", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
+         col_clear(actx->pinfo->cinfo, COL_INFO);
+         col_add_fstr(actx->pinfo->cinfo, COL_INFO,"%s Response", val_to_str(OperationCode, ansi_map_opr_code_strings, "Unknown ANSI-MAP PDU (%u)"));
   }
   /* No Data */
   if(tvb_length_remaining(tvb, offset)<=0){
@@ -86,7 +86,7 @@ OriginationRequestRes
   PROTO_ITEM_SET_GENERATED(item);
 
   ansi_map_is_invoke = FALSE;
-  offset = dissect_returnData(pinfo, tree, tvb, offset);
+  offset = dissect_returnData(tree, tvb, offset, actx);
 
 #.FN_BODY ErrorParameters
 
@@ -101,21 +101,21 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_min_type(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_min_type(parameter_tvb,actx->pinfo,tree);
        }
 
 #.FN_BODY DigitsType VAL_PTR = &parameter_tvb
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_digits_type(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_digits_type(parameter_tvb,actx->pinfo,tree);
        }
 
 #.FN_BODY Subaddress VAL_PTR = &parameter_tvb
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_subaddress(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_subaddress(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.3 AlertCode
@@ -123,7 +123,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_alertcode(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_alertcode(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.5 AnnouncementCode
@@ -131,7 +131,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_announcementcode(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_announcementcode(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.14 AuthorizationPeriod
@@ -139,7 +139,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_authorizationperiod(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_authorizationperiod(parameter_tvb,actx->pinfo,tree);
        }
 
 
@@ -148,7 +148,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_billingid(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_billingid(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.20 CallingFeaturesIndicator
@@ -156,21 +156,21 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_callingfeaturesindicator(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_callingfeaturesindicator(parameter_tvb,actx->pinfo,tree);
        }
 # 6.5.2.29 CDMACallMode
 #.FN_BODY CDMACallMode VAL_PTR = &parameter_tvb
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_cdmacallmode(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_cdmacallmode(parameter_tvb,actx->pinfo,tree);
        }
 # 6.5.2.30 CDMAChannelData
 #.FN_BODY CDMAChannelData VAL_PTR = &parameter_tvb
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_cdmachanneldata(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_cdmachanneldata(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.41 CDMAStationClassMark
@@ -178,7 +178,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_cdmastationclassmark(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_cdmastationclassmark(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.47 ChannelData
@@ -186,7 +186,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_channeldata(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_channeldata(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.50 ConfidentialityModes
@@ -194,14 +194,14 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_confidentialitymodes(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_confidentialitymodes(parameter_tvb,actx->pinfo,tree);
        }
 # 6.5.2.51 ControlChannelData
 #.FN_BODY ControlChannelData VAL_PTR = &parameter_tvb
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_controlchanneldata(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_controlchanneldata(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.53 DeniedAuthorizationPeriod
@@ -209,7 +209,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_deniedauthorizationperiod(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_deniedauthorizationperiod(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.64 ExtendedMSCID
@@ -217,7 +217,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_extendedmscid(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_extendedmscid(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.65 ExtendedSystemMyTypeCode
@@ -225,14 +225,14 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_extendedsystemmytypecode(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_extendedsystemmytypecode(parameter_tvb, actx->pinfo, tree, actx);
        }
 #6.5.2.71 HandoffState
 #.FN_BODY HandoffState VAL_PTR = &parameter_tvb
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_handoffstate(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_handoffstate(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.72 InterMSCCircuitID
@@ -240,7 +240,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_intermsccircuitid(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_intermsccircuitid(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.78 MessageWaitingNotificationCount 
@@ -248,7 +248,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_messagewaitingnotificationcount(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_messagewaitingnotificationcount(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.79 MessageWaitingNotificationType
@@ -256,7 +256,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_messagewaitingnotificationtype(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_messagewaitingnotificationtype(parameter_tvb,actx->pinfo,tree);
        }
 
 
@@ -265,7 +265,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_mscid(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_mscid(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.84 MSLocation
@@ -273,7 +273,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_mscid(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_mscid(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.85 NAMPSCallMode
@@ -281,7 +281,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_nampscallmode(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_nampscallmode(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.86 NAMPSChannelData
@@ -289,7 +289,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_nampschanneldata(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_nampschanneldata(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.88 OneTimeFeatureIndicator
@@ -297,7 +297,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_onetimefeatureindicator(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_onetimefeatureindicator(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.90 OriginationTriggers
@@ -305,7 +305,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_originationtriggers(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_originationtriggers(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.91 PACAIndicator
@@ -313,7 +313,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_pacaindicator(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_pacaindicator(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.93 PC_SSN
@@ -321,7 +321,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_pc_ssn(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_pc_ssn(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.94 PilotBillingID
@@ -330,7 +330,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_pilotbillingid(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_pilotbillingid(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.124
@@ -371,7 +371,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_sms_originationrestrictions(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_sms_originationrestrictions(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.137
@@ -407,7 +407,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_systemcapabilities(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_systemcapabilities(parameter_tvb,actx->pinfo,tree);
        }
 
 
@@ -416,7 +416,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_terminationtriggers(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_terminationtriggers(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.160 TransactionCapability
@@ -424,7 +424,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_transactioncapability(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_transactioncapability(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.f (TSB76) CDMAServiceOption N.S0010-0 v 1.0
@@ -432,7 +432,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_cdmaserviceoption(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_cdmaserviceoption(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.aj SecondInterMSCCircuitID
@@ -443,7 +443,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_callingpartyname(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_callingpartyname(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.df TriggerCapability
@@ -451,7 +451,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_triggercapability(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_triggercapability(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.dj WINOperationsCapability
@@ -459,7 +459,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_winoperationscapability(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_winoperationscapability(parameter_tvb,actx->pinfo,tree);
        }
 
 # 6.5.2.ek ControlNetworkID
@@ -467,7 +467,7 @@ OriginationRequestRes
        tvbuff_t *parameter_tvb = NULL;
 %(DEFAULT_BODY)s
        if (parameter_tvb){
-               dissect_ansi_map_controlnetworkid(parameter_tvb,pinfo,tree);
+               dissect_ansi_map_controlnetworkid(parameter_tvb,actx->pinfo,tree);
        }
 
 #6.5.2.gm CDMA2000HandoffInvokeIOSData
@@ -480,7 +480,7 @@ OriginationRequestRes
        if (parameter_tvb){
                item = get_ber_last_created_item();
                subtree = proto_item_add_subtree(item, ett_CDMA2000HandoffInvokeIOSData);
-               dissect_cdma2000_a1_elements(parameter_tvb, pinfo, subtree, 
+               dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree, 
                        0, tvb_length_remaining(parameter_tvb,0));
        }
 #6.5.2.gn CDMA2000HandoffResponseIOSData
@@ -493,7 +493,7 @@ OriginationRequestRes
        if (parameter_tvb){
                item = get_ber_last_created_item();
                subtree = proto_item_add_subtree(item, ett_CDMA2000HandoffResponseIOSData);
-               dissect_cdma2000_a1_elements(parameter_tvb, pinfo, subtree, 
+               dissect_cdma2000_a1_elements(parameter_tvb, actx->pinfo, subtree, 
                        0, tvb_length_remaining(parameter_tvb,0));
        }
 #6.5.2.wB ServiceIndicator N.S0011-0 v 1.0
index f164eefe093de5102758a86079284855bc7efd5d..ceeea4b8300ab23ea94b2cb05f0c4e70f3dce41d 100644 (file)
 #include <epan/conversation.h>
 #include <epan/tap.h>
 #include <epan/emem.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
 
+#include "packet-ber.h"
 #include "packet-ansi_map.h"
 #include "packet-ansi_a.h"
 #include "packet-gsm_map.h"
-#include "packet-ber.h"
 #include "packet-tcap.h"
 
 #define PNAME  "ANSI Mobile Application Part"
@@ -553,9 +554,9 @@ const value_string ansi_map_opr_code_strings[] = {
     { 0, NULL },
 };
 
-static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
-static int dissect_returnData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
-static int dissect_ansi_map_SystemMyTypeCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_);
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
+static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx);
+static int dissect_ansi_map_SystemMyTypeCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
 
 typedef struct dgt_set_t
 {
@@ -1662,7 +1663,7 @@ dissect_ansi_map_extendedmscid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
 }
 /* 6.5.2.65 ExtendedSystemMyTypeCode */
 static void
-dissect_ansi_map_extendedsystemmytypecode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_){
+dissect_ansi_map_extendedsystemmytypecode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx){
 
        int offset = 0;
        proto_item *item;
@@ -1673,7 +1674,7 @@ dissect_ansi_map_extendedsystemmytypecode(tvbuff_t *tvb, packet_info *pinfo _U_,
        /* Type (octet 1) */
        proto_tree_add_item(subtree, hf_ansi_map_msc_type, tvb, offset, 1, FALSE);
        offset++;
-       offset = dissect_ansi_map_SystemMyTypeCode(TRUE, tvb, offset, pinfo, subtree, hf_ansi_map_systemMyTypeCode);
+       offset = dissect_ansi_map_SystemMyTypeCode(TRUE, tvb, offset, actx, subtree, hf_ansi_map_systemMyTypeCode);
 }
 
 
@@ -3526,60 +3527,60 @@ static const value_string ansi_map_VoicePrivacyReport_vals[]  = {
 
 #include "packet-ansi_map-fn.c"
 
-static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
 
 
   switch(OperationCode){
    case 1: /*Handoff Measurement Request*/
-          offset = dissect_ansi_map_HandoffMeasurementRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffMeasurementRequest);
+          offset = dissect_ansi_map_HandoffMeasurementRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequest);
           break;
    case 2: /*Facilities Directive*/
-          offset = dissect_ansi_map_FacilitiesDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitiesDirective);
+          offset = dissect_ansi_map_FacilitiesDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirective);
           break;
    case 3: /*Mobile On Channel*/
           proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
           break;
    case 4: /*Handoff Back*/
-          offset = dissect_ansi_map_HandoffBack(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffBack);
+          offset = dissect_ansi_map_HandoffBack(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBack);
           break;
    case 5: /*Facilities Release*/
-          offset = dissect_ansi_map_FacilitiesRelease(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitiesRelease);
+          offset = dissect_ansi_map_FacilitiesRelease(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesRelease);
           break;
    case 6: /*Qualification Request*/
-          offset = dissect_ansi_map_QualificationRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_qualificationRequest);
+          offset = dissect_ansi_map_QualificationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequest);
           break;
    case 7: /*Qualification Directive*/
-          offset = dissect_ansi_map_QualificationDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_qualificationDirective);
+          offset = dissect_ansi_map_QualificationDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationDirective);
           break;
    case 8: /*Blocking*/
-          offset = dissect_ansi_map_Blocking(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_blocking);
+          offset = dissect_ansi_map_Blocking(TRUE, tvb, offset, actx, tree, hf_ansi_map_blocking);
           break;
    case 9: /*Unblocking*/
-          offset = dissect_ansi_map_Unblocking(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_unblocking);
+          offset = dissect_ansi_map_Unblocking(TRUE, tvb, offset, actx, tree, hf_ansi_map_unblocking);
           break;
    case 10: /*Reset Circuit*/
-          offset = dissect_ansi_map_ResetCircuit(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_resetCircuit);
+          offset = dissect_ansi_map_ResetCircuit(TRUE, tvb, offset, actx, tree, hf_ansi_map_resetCircuit);
           break;
    case 11: /*Trunk Test*/
-          offset = dissect_ansi_map_TrunkTest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_trunkTest);
+          offset = dissect_ansi_map_TrunkTest(TRUE, tvb, offset, actx, tree, hf_ansi_map_trunkTest);
           break;
    case 12: /*Trunk Test Disconnect*/
-         offset = dissect_ansi_map_TrunkTestDisconnect(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_trunkTestDisconnect);
+         offset = dissect_ansi_map_TrunkTestDisconnect(TRUE, tvb, offset, actx, tree, hf_ansi_map_trunkTestDisconnect);
          break;
    case  13: /*Registration Notification*/
-         offset = dissect_ansi_map_RegistrationNotification(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_registrationNotification);
+         offset = dissect_ansi_map_RegistrationNotification(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationNotification);
          break;
    case  14: /*Registration Cancellation*/
-          offset = dissect_ansi_map_RegistrationCancellation(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_registrationCancellation);
+          offset = dissect_ansi_map_RegistrationCancellation(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationCancellation);
          break;
    case  15: /*Location Request*/
-          offset = dissect_ansi_map_LocationRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_locationRequest);
+          offset = dissect_ansi_map_LocationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_locationRequest);
           break;
    case  16: /*Routing Request*/
-          offset = dissect_ansi_map_RoutingRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_routingRequest);
+          offset = dissect_ansi_map_RoutingRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_routingRequest);
           break;
    case  17: /*Feature Request*/
-          offset = dissect_ansi_map_FeatureRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_featureRequest);
+          offset = dissect_ansi_map_FeatureRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_featureRequest);
           break;
    case  18: /*Reserved 18 (Service Profile Request, IS-41-C)*/
           proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(18 (Service Profile Request, IS-41-C)");
@@ -3588,118 +3589,118 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
           proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(19 Service Profile Directive, IS-41-C)");
           break;
    case  20: /*Unreliable Roamer Data Directive*/
-          offset = dissect_ansi_map_UnreliableRoamerDataDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_unreliableRoamerDataDirective);
+          offset = dissect_ansi_map_UnreliableRoamerDataDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_unreliableRoamerDataDirective);
           break;
    case  21: /*Reserved 21 (Call Data Request, IS-41-C)*/
           proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(Reserved 21 (Call Data Request, IS-41-C)");
           break;
    case  22: /*MS Inactive*/
-          offset = dissect_ansi_map_MSInactive(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_mSInactive);
+          offset = dissect_ansi_map_MSInactive(TRUE, tvb, offset, actx, tree, hf_ansi_map_mSInactive);
           break;
    case  23: /*Transfer To Number Request*/
-          offset = dissect_ansi_map_TransferToNumberRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_transferToNumberRequest);
+          offset = dissect_ansi_map_TransferToNumberRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_transferToNumberRequest);
           break;
    case  24: /*Redirection Request*/
-          offset = dissect_ansi_map_RedirectionRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_redirectionRequest);
+          offset = dissect_ansi_map_RedirectionRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_redirectionRequest);
           break;
    case  25: /*Handoff To Third*/
-          offset = dissect_ansi_map_HandoffToThird(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffToThird);
+          offset = dissect_ansi_map_HandoffToThird(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThird);
           break;
    case  26: /*Flash Request*/
-          offset = dissect_ansi_map_FlashRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_flashRequest);
+          offset = dissect_ansi_map_FlashRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_flashRequest);
           break;
    case  27: /*Authentication Directive*/
-          offset = dissect_ansi_map_AuthenticationDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationDirective);
+          offset = dissect_ansi_map_AuthenticationDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirective);
           break;
    case  28: /*Authentication Request*/
-          offset = dissect_ansi_map_AuthenticationRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationRequest);
+          offset = dissect_ansi_map_AuthenticationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationRequest);
           break;
    case  29: /*Base Station Challenge*/
-          offset = dissect_ansi_map_BaseStationChallenge(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_baseStationChallenge);
+          offset = dissect_ansi_map_BaseStationChallenge(TRUE, tvb, offset, actx, tree, hf_ansi_map_baseStationChallenge);
           break;
    case  30: /*Authentication Failure Report*/
-          offset = dissect_ansi_map_AuthenticationFailureReport(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationFailureReport);
+          offset = dissect_ansi_map_AuthenticationFailureReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationFailureReport);
           break;
    case  31: /*Count Request*/
-          offset = dissect_ansi_map_CountRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_countRequest);
+          offset = dissect_ansi_map_CountRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_countRequest);
           break;
    case  32: /*Inter System Page*/
-          offset = dissect_ansi_map_InterSystemPage(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_interSystemPage);
+          offset = dissect_ansi_map_InterSystemPage(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPage);
           break;
    case  33: /*Unsolicited Response*/
-          offset = dissect_ansi_map_UnsolicitedResponse(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_unsolicitedResponse);
+          offset = dissect_ansi_map_UnsolicitedResponse(TRUE, tvb, offset, actx, tree, hf_ansi_map_unsolicitedResponse);
           break;
    case  34: /*Bulk Deregistration*/
-          offset = dissect_ansi_map_BulkDeregistration(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_bulkDeregistration);
+          offset = dissect_ansi_map_BulkDeregistration(TRUE, tvb, offset, actx, tree, hf_ansi_map_bulkDeregistration);
           break;
    case  35: /*Handoff Measurement Request 2*/
-          offset = dissect_ansi_map_HandoffMeasurementRequest2(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffMeasurementRequest2);
+          offset = dissect_ansi_map_HandoffMeasurementRequest2(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequest2);
           break;
    case  36: /*Facilities Directive 2*/
-          offset = dissect_ansi_map_FacilitiesDirective2(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitiesDirective2);
+          offset = dissect_ansi_map_FacilitiesDirective2(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirective2);
           break;
    case  37: /*Handoff Back 2*/
-          offset = dissect_ansi_map_HandoffBack2(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffBack2);
+          offset = dissect_ansi_map_HandoffBack2(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBack2);
           break;
    case  38: /*Handoff To Third 2*/
-          offset = dissect_ansi_map_HandoffToThird2(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffToThird2);
+          offset = dissect_ansi_map_HandoffToThird2(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThird2);
           break;
    case  39: /*Authentication Directive Forward*/
-          offset = dissect_ansi_map_AuthenticationDirectiveForward(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationDirectiveForward);
+          offset = dissect_ansi_map_AuthenticationDirectiveForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirectiveForward);
           break;
    case  40: /*Authentication Status Report*/
-          offset = dissect_ansi_map_AuthenticationStatusReport(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationStatusReport);
+          offset = dissect_ansi_map_AuthenticationStatusReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationStatusReport);
           break;
    case  41: /*Reserved 41*/
           proto_tree_add_text(tree, tvb, offset, -1, "Reserved 41, Unknown invokeData blob");
           break;
    case  42: /*Information Directive*/
-          offset = dissect_ansi_map_InformationDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_informationDirective);
+          offset = dissect_ansi_map_InformationDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationDirective);
           break;
    case  43: /*Information Forward*/
-          offset = dissect_ansi_map_InformationForward(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_informationForward);
+          offset = dissect_ansi_map_InformationForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationForward);
           break;
    case  44: /*Inter System Answer*/
-          offset = dissect_ansi_map_InterSystemAnswer(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_interSystemAnswer);
+          offset = dissect_ansi_map_InterSystemAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemAnswer);
           break;
    case  45: /*Inter System Page 2*/
-          offset = dissect_ansi_map_InterSystemPage2(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_interSystemPage2);
+          offset = dissect_ansi_map_InterSystemPage2(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPage2);
           break;
    case  46: /*Inter System Setup*/
-          offset = dissect_ansi_map_InterSystemSetup(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_interSystemSetup);
+          offset = dissect_ansi_map_InterSystemSetup(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemSetup);
           break;
   case  47: /*OriginationRequest*/
-         offset = dissect_ansi_map_OriginationRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_originationRequest);
+         offset = dissect_ansi_map_OriginationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_originationRequest);
          break;
   case  48: /*Random Variable Request*/
-         offset = dissect_ansi_map_RandomVariableRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_randomVariableRequest);
+         offset = dissect_ansi_map_RandomVariableRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_randomVariableRequest);
          break;
   case  49: /*Redirection Directive*/
-         offset = dissect_ansi_map_RedirectionDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_redirectionDirective);
+         offset = dissect_ansi_map_RedirectionDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_redirectionDirective);
          break;
   case  50: /*Remote User Interaction Directive*/
-         offset = dissect_ansi_map_RemoteUserInteractionDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_remoteUserInteractionDirective);
+         offset = dissect_ansi_map_RemoteUserInteractionDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_remoteUserInteractionDirective);
          break;
   case  51: /*SMS Delivery Backward*/
-         offset = dissect_ansi_map_SMSDeliveryBackward(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSDeliveryBackward);
+         offset = dissect_ansi_map_SMSDeliveryBackward(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryBackward);
          break;
   case  52: /*SMS Delivery Forward*/
-         offset = dissect_ansi_map_SMSDeliveryForward(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSDeliveryForward);
+         offset = dissect_ansi_map_SMSDeliveryForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryForward);
          break;
   case  53: /*SMS Delivery Point to Point*/
-         offset = dissect_ansi_map_SMSDeliveryPointToPoint(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSDeliveryPointToPoint);
+         offset = dissect_ansi_map_SMSDeliveryPointToPoint(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryPointToPoint);
          break;
   case  54: /*SMS Notification*/
-         offset = dissect_ansi_map_SMSNotification(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSNotification);
+         offset = dissect_ansi_map_SMSNotification(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSNotification);
          break;
   case  55: /*SMS Request*/
-         offset = dissect_ansi_map_SMSRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSRequest);
+         offset = dissect_ansi_map_SMSRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSRequest);
          break;
          /* End N.S0005*/
          /* N.S0010-0 v 1.0 */
          /* N.S0011-0 v 1.0 */
   case  56: /*OTASP Request 6.4.2.CC*/
-         offset = dissect_ansi_map_OTASPRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oTASPRequest);
+         offset = dissect_ansi_map_OTASPRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_oTASPRequest);
          break;
          /*End N.S0011-0 v 1.0 */
   case  57: /*Information Backward*/
@@ -3707,64 +3708,64 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
          break;
          /*  N.S0008-0 v 1.0 */
   case  58: /*Change Facilities*/
-         offset = dissect_ansi_map_ChangeFacilities(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_changeFacilities);
+         offset = dissect_ansi_map_ChangeFacilities(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeFacilities);
          break;
   case  59: /*Change Service*/
-         offset = dissect_ansi_map_ChangeService(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_changeService);
+         offset = dissect_ansi_map_ChangeService(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeService);
          break;
          /* End N.S0008-0 v 1.0 */     
   case  60: /*Parameter Request*/
-         offset = dissect_ansi_map_ParameterRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_parameterRequest);
+         offset = dissect_ansi_map_ParameterRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_parameterRequest);
          break;
   case  61: /*TMSI Directive*/
-         offset = dissect_ansi_map_TMSIDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tMSIDirective);
+         offset = dissect_ansi_map_TMSIDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_tMSIDirective);
          break;
          /*End  N.S0010-0 v 1.0 */
   case  62: /*Reserved 62*/
          proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob(Reserved 62)");
          break;
   case  63: /*Service Request N.S0012-0 v 1.0*/
-         offset = dissect_ansi_map_ServiceRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_serviceRequest);
+         offset = dissect_ansi_map_ServiceRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_serviceRequest);
          break;
          /* N.S0013 */
   case  64: /*Analyzed Information Request*/
-         offset = dissect_ansi_map_AnalyzedInformation(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_analyzedInformation);
+         offset = dissect_ansi_map_AnalyzedInformation(TRUE, tvb, offset, actx, tree, hf_ansi_map_analyzedInformation);
          break;
   case  65: /*Connection Failure Report*/
-         offset = dissect_ansi_map_ConnectionFailureReport(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_connectionFailureReport);
+         offset = dissect_ansi_map_ConnectionFailureReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_connectionFailureReport);
          break;
   case  66: /*Connect Resource*/
-         offset = dissect_ansi_map_ConnectResource(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_connectResource);
+         offset = dissect_ansi_map_ConnectResource(TRUE, tvb, offset, actx, tree, hf_ansi_map_connectResource);
          break;
   case  67: /*Disconnect Resource*/
          /* No data */
          break;
   case  68: /*Facility Selected and Available*/
-         offset = dissect_ansi_map_FacilitySelectedAndAvailable(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitySelectedAndAvailable);
+         offset = dissect_ansi_map_FacilitySelectedAndAvailable(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitySelectedAndAvailable);
          break;
   case  69: /*Instruction Request*/
          /* No data */
          break;
   case  70: /*Modify*/
-         offset = dissect_ansi_map_Modify(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_modify);
+         offset = dissect_ansi_map_Modify(TRUE, tvb, offset, actx, tree, hf_ansi_map_modify);
          break;
   case  71: /*Reset Timer*/
          /*No Data*/
          break;
   case  72: /*Search*/
-         offset = dissect_ansi_map_Search(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_search);
+         offset = dissect_ansi_map_Search(TRUE, tvb, offset, actx, tree, hf_ansi_map_search);
          break;
   case  73: /*Seize Resource*/
-         offset = dissect_ansi_map_SeizeResource(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_seizeResource);
+         offset = dissect_ansi_map_SeizeResource(TRUE, tvb, offset, actx, tree, hf_ansi_map_seizeResource);
          break;
   case  74: /*SRF Directive*/
-         offset = dissect_ansi_map_SRFDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sRFDirective);
+         offset = dissect_ansi_map_SRFDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_sRFDirective);
          break;
   case  75: /*T Busy*/
-         offset = dissect_ansi_map_TBusy(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tBusy);
+         offset = dissect_ansi_map_TBusy(TRUE, tvb, offset, actx, tree, hf_ansi_map_tBusy);
          break;
   case  76: /*T NoAnswer*/
-         offset = dissect_ansi_map_TNoAnswer(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tNoAnswer);
+         offset = dissect_ansi_map_TNoAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_tNoAnswer);
          break;
          /*END N.S0013 */
   case  77: /*Release*/
@@ -3775,47 +3776,47 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
          break;
          /* N.S0024*/
   case  79: /*Message Directive*/
-         offset = dissect_ansi_map_MessageDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_messageDirective);
+         offset = dissect_ansi_map_MessageDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_messageDirective);
          break;
          /*END N.S0024*/
          /* N.S0018 PN-4287*/
   case  80: /*Bulk Disconnection*/
-         offset = dissect_ansi_map_BulkDisconnection(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_bulkDisconnection);
+         offset = dissect_ansi_map_BulkDisconnection(TRUE, tvb, offset, actx, tree, hf_ansi_map_bulkDisconnection);
          break;
   case  81: /*Call Control Directive*/
-         offset = dissect_ansi_map_CallControlDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_callControlDirective);
+         offset = dissect_ansi_map_CallControlDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_callControlDirective);
          break;
   case  82: /*O Answer*/
-         offset = dissect_ansi_map_OAnswer(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oAnswer);
+         offset = dissect_ansi_map_OAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_oAnswer);
          break;
   case  83: /*O Disconnect*/
-         offset = dissect_ansi_map_ODisconnect(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oDisconnect);
+         offset = dissect_ansi_map_ODisconnect(TRUE, tvb, offset, actx, tree, hf_ansi_map_oDisconnect);
          break;
   case  84: /*Call Recovery Report*/
-         offset = dissect_ansi_map_CallRecoveryReport(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_callRecoveryReport);
+         offset = dissect_ansi_map_CallRecoveryReport(TRUE, tvb, offset, actx, tree, hf_ansi_map_callRecoveryReport);
          break;
   case  85: /*T Answer*/
-         offset = dissect_ansi_map_TAnswer(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tAnswer);
+         offset = dissect_ansi_map_TAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_tAnswer);
          break;
   case  86: /*T Disconnect*/
-         offset = dissect_ansi_map_TDisconnect(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tDisconnect);
+         offset = dissect_ansi_map_TDisconnect(TRUE, tvb, offset, actx, tree, hf_ansi_map_tDisconnect);
          break;
   case  87: /*Unreliable Call Data*/
-         offset = dissect_ansi_map_UnreliableCallData(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_unreliableCallData);
+         offset = dissect_ansi_map_UnreliableCallData(TRUE, tvb, offset, actx, tree, hf_ansi_map_unreliableCallData);
          break;
          /* N.S0018 PN-4287*/
          /*N.S0004 */
   case  88: /*O CalledPartyBusy*/
-         offset = dissect_ansi_map_OCalledPartyBusy(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oCalledPartyBusy);
+         offset = dissect_ansi_map_OCalledPartyBusy(TRUE, tvb, offset, actx, tree, hf_ansi_map_oCalledPartyBusy);
          break;
   case  89: /*O NoAnswer*/
-         offset = dissect_ansi_map_ONoAnswer(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oNoAnswer);
+         offset = dissect_ansi_map_ONoAnswer(TRUE, tvb, offset, actx, tree, hf_ansi_map_oNoAnswer);
          break;
   case  90: /*Position Request*/
-         offset = dissect_ansi_map_PositionRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_positionRequest);
+         offset = dissect_ansi_map_PositionRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequest);
          break;
   case  91: /*Position Request Forward*/
-         offset = dissect_ansi_map_PositionRequestForward(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_positionRequestForward);
+         offset = dissect_ansi_map_PositionRequestForward(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequestForward);
          break;
           /*END N.S0004 */
   case  92: /*Call Termination Report*/
@@ -3835,18 +3836,18 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
          break;
          /* 3GPP2 N.S0023-0 */
   case  97: /*ACG Directive*/
-         offset = dissect_ansi_map_ACGDirective(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_aCGDirective);
+         offset = dissect_ansi_map_ACGDirective(TRUE, tvb, offset, actx, tree, hf_ansi_map_aCGDirective);
          break;
          /* END 3GPP2 N.S0023-0 */
   case  98: /*Roamer Database Verification Request*/
-         offset = dissect_ansi_map_RoamerDatabaseVerificationRequest(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_roamerDatabaseVerificationRequest);
+         offset = dissect_ansi_map_RoamerDatabaseVerificationRequest(TRUE, tvb, offset, actx, tree, hf_ansi_map_roamerDatabaseVerificationRequest);
          break;
          /* N.S0029 */
   case  99: /*Add Service*/
-         offset = dissect_ansi_map_AddService(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_addService);
+         offset = dissect_ansi_map_AddService(TRUE, tvb, offset, actx, tree, hf_ansi_map_addService);
          break;
   case  100: /*Drop Service*/
-         offset = dissect_ansi_map_DropService(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_dropService);
+         offset = dissect_ansi_map_DropService(TRUE, tvb, offset, actx, tree, hf_ansi_map_dropService);
          break;
          /*End N.S0029 */
   default:
@@ -3858,191 +3859,191 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
 
  }
 
-static int dissect_returnData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
 
   switch(OperationCode){
    case 1: /*Handoff Measurement Request*/
-          offset = dissect_ansi_map_HandoffMeasurementRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffMeasurementRequestRes);
+          offset = dissect_ansi_map_HandoffMeasurementRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequestRes);
           break;
    case 2: /*Facilities Directive*/
-          offset = dissect_ansi_map_FacilitiesDirectiveRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitiesDirectiveRes);
+          offset = dissect_ansi_map_FacilitiesDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirectiveRes);
           break;
    case 4: /*Handoff Back*/
-          offset = dissect_ansi_map_HandoffBackRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffBackRes);
+          offset = dissect_ansi_map_HandoffBackRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBackRes);
           break;
    case 5: /*Facilities Release*/
-          offset = dissect_ansi_map_FacilitiesReleaseRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitiesReleaseRes);
+          offset = dissect_ansi_map_FacilitiesReleaseRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesReleaseRes);
           break;
   case 6: /*Qualification Request*/
-          offset = dissect_ansi_map_QualificationRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_qualificationRequestRes);
+          offset = dissect_ansi_map_QualificationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_qualificationRequestRes);
           break;
    case 10: /*Reset Circuit*/
-          offset = dissect_ansi_map_ResetCircuitRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_resetCircuitRes);
+          offset = dissect_ansi_map_ResetCircuitRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_resetCircuitRes);
           break;
    case 13: /*Registration Notification*/
-         offset = dissect_ansi_map_RegistrationNotificationRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_registrationNotificationRes);
+         offset = dissect_ansi_map_RegistrationNotificationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationNotificationRes);
          break;
    case  14: /*Registration Cancellation*/
-      offset = dissect_ansi_map_RegistrationCancellationRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_registrationCancellationRes);
+      offset = dissect_ansi_map_RegistrationCancellationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_registrationCancellationRes);
          break;
    case  15: /*Location Request*/
-          offset = dissect_ansi_map_LocationRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_locationRequestRes);
+          offset = dissect_ansi_map_LocationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_locationRequestRes);
           break;
    case  16: /*Routing Request*/
-          offset = dissect_ansi_map_RoutingRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_routingRequestRes);
+          offset = dissect_ansi_map_RoutingRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_routingRequestRes);
           break;
    case  17: /*Feature Request*/
-          offset = dissect_ansi_map_FeatureRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_featureRequestRes);
+          offset = dissect_ansi_map_FeatureRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_featureRequestRes);
           break;
    case  23: /*Transfer To Number Request*/
-          offset = dissect_ansi_map_TransferToNumberRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_transferToNumberRequestRes);
+          offset = dissect_ansi_map_TransferToNumberRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_transferToNumberRequestRes);
           break;
    case  25: /*Handoff To Third*/
-          offset = dissect_ansi_map_HandoffToThirdRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffToThirdRes);
+          offset = dissect_ansi_map_HandoffToThirdRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThirdRes);
           break;
    case  27: /*Authentication Directive*/
-          offset = dissect_ansi_map_AuthenticationDirectiveRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationDirectiveRes);
+          offset = dissect_ansi_map_AuthenticationDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirectiveRes);
           break;
    case  28: /*Authentication Request*/
-          offset = dissect_ansi_map_AuthenticationRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationRequestRes);
+          offset = dissect_ansi_map_AuthenticationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationRequestRes);
           break;
    case  30: /*Authentication Failure Report*/
-          offset = dissect_ansi_map_AuthenticationFailureReportRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationFailureReportRes);
+          offset = dissect_ansi_map_AuthenticationFailureReportRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationFailureReportRes);
           break;
    case  31: /*Count Request*/
-          offset = dissect_ansi_map_CountRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_countRequestRes);
+          offset = dissect_ansi_map_CountRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_countRequestRes);
           break;
    case  32: /*Inter System Page*/
-          offset = dissect_ansi_map_InterSystemPageRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_interSystemPageRes);
+          offset = dissect_ansi_map_InterSystemPageRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPageRes);
           break;
    case  33: /*Unsolicited Response*/
-          offset = dissect_ansi_map_UnsolicitedResponseRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_unsolicitedResponseRes);
+          offset = dissect_ansi_map_UnsolicitedResponseRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_unsolicitedResponseRes);
           break;
    case  35: /*Handoff Measurement Request 2*/
-          offset = dissect_ansi_map_HandoffMeasurementRequest2Res(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffMeasurementRequest2Res);
+          offset = dissect_ansi_map_HandoffMeasurementRequest2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffMeasurementRequest2Res);
           break;
    case  36: /*Facilities Directive 2*/
-          offset = dissect_ansi_map_FacilitiesDirective2Res(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitiesDirective2Res);
+          offset = dissect_ansi_map_FacilitiesDirective2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitiesDirective2Res);
           break;
    case  37: /*Handoff Back 2*/
-          offset = dissect_ansi_map_HandoffBack2Res(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffBack2Res);
+          offset = dissect_ansi_map_HandoffBack2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffBack2Res);
           break;
    case  38: /*Handoff To Third 2*/
-          offset = dissect_ansi_map_HandoffToThird2Res(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_handoffToThird2Res);
+          offset = dissect_ansi_map_HandoffToThird2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_handoffToThird2Res);
           break;
    case  39: /*Authentication Directive Forward*/
-          offset = dissect_ansi_map_AuthenticationDirectiveForwardRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationDirectiveForwardRes);
+          offset = dissect_ansi_map_AuthenticationDirectiveForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationDirectiveForwardRes);
           break;
    case  40: /*Authentication Status Report*/
-          offset = dissect_ansi_map_AuthenticationStatusReportRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_authenticationStatusReportRes);
+          offset = dissect_ansi_map_AuthenticationStatusReportRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_authenticationStatusReportRes);
           break;
                         /*Reserved 41*/
    case  43: /*Information Forward*/
-          offset = dissect_ansi_map_InformationForwardRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_informationForwardRes);
+          offset = dissect_ansi_map_InformationForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_informationForwardRes);
           break;
    case  45: /*Inter System Page 2*/
-          offset = dissect_ansi_map_InterSystemPage2Res(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_interSystemPage2Res);
+          offset = dissect_ansi_map_InterSystemPage2Res(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemPage2Res);
           break;
    case  46: /*Inter System Setup*/
-          offset = dissect_ansi_map_InterSystemSetupRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_interSystemSetupRes);
+          offset = dissect_ansi_map_InterSystemSetupRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_interSystemSetupRes);
           break;
   case  47: /*OriginationRequest*/
-         offset = dissect_ansi_map_OriginationRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_originationRequestRes);
+         offset = dissect_ansi_map_OriginationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_originationRequestRes);
          break;
   case  48: /*Random Variable Request*/
-         offset = dissect_ansi_map_RandomVariableRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_randomVariableRequestRes);
+         offset = dissect_ansi_map_RandomVariableRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_randomVariableRequestRes);
          break;
   case  50: /*Remote User Interaction Directive*/
-         offset = dissect_ansi_map_RemoteUserInteractionDirectiveRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_remoteUserInteractionDirectiveRes);
+         offset = dissect_ansi_map_RemoteUserInteractionDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_remoteUserInteractionDirectiveRes);
          break;
   case  51: /*SMS Delivery Backward*/
-         offset = dissect_ansi_map_SMSDeliveryBackwardRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSDeliveryBackwardRes);
+         offset = dissect_ansi_map_SMSDeliveryBackwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryBackwardRes);
          break;
   case  52: /*SMS Delivery Forward*/
-         offset = dissect_ansi_map_SMSDeliveryForwardRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSDeliveryForwardRes);
+         offset = dissect_ansi_map_SMSDeliveryForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryForwardRes);
          break;
   case  53: /*SMS Delivery Point to Point*/
-         offset = dissect_ansi_map_SMSDeliveryPointToPointRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSDeliveryPointToPointRes);
+         offset = dissect_ansi_map_SMSDeliveryPointToPointRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSDeliveryPointToPointRes);
          break;
   case  54: /*SMS Notification*/
-         offset = dissect_ansi_map_SMSNotificationRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSNotificationRes);
+         offset = dissect_ansi_map_SMSNotificationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSNotificationRes);
          break;
   case  55: /*SMS Request*/
-         offset = dissect_ansi_map_SMSRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sMSRequestRes);
+         offset = dissect_ansi_map_SMSRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sMSRequestRes);
          break;
          /*  N.S0008-0 v 1.0 */
   case  56: /*OTASP Request 6.4.2.CC*/
-         offset = dissect_ansi_map_OTASPRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oTASPRequestRes);
+         offset = dissect_ansi_map_OTASPRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oTASPRequestRes);
          break;
   case  58: /*Change Facilities*/
-         offset = dissect_ansi_map_ChangeFacilitiesRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_changeFacilitiesRes);
+         offset = dissect_ansi_map_ChangeFacilitiesRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeFacilitiesRes);
          break;
   case  59: /*Change Service*/
-         offset = dissect_ansi_map_ChangeServiceRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_changeServiceRes);
+         offset = dissect_ansi_map_ChangeServiceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_changeServiceRes);
          break;
   case  60: /*Parameter Request*/
-         offset = dissect_ansi_map_ParameterRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_parameterRequestRes);
+         offset = dissect_ansi_map_ParameterRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_parameterRequestRes);
          break;
   case  61: /*TMSI Directive*/
-         offset = dissect_ansi_map_TMSIDirectiveRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tMSIDirectiveRes);
+         offset = dissect_ansi_map_TMSIDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tMSIDirectiveRes);
          break;
   case  63: /*Service Request*/
-         offset = dissect_ansi_map_ServiceRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_serviceRequestRes);
+         offset = dissect_ansi_map_ServiceRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_serviceRequestRes);
          break;
          /* N.S0013 */
   case  64: /*Analyzed Information Request*/
-         offset = dissect_ansi_map_AnalyzedInformationRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_analyzedInformationRes);
+         offset = dissect_ansi_map_AnalyzedInformationRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_analyzedInformationRes);
          break;
   case  68: /*Facility Selected and Available*/
-         offset = dissect_ansi_map_FacilitySelectedAndAvailableRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_facilitySelectedAndAvailableRes);
+         offset = dissect_ansi_map_FacilitySelectedAndAvailableRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_facilitySelectedAndAvailableRes);
          break;
   case  70: /*Modify*/
-         offset = dissect_ansi_map_ModifyRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_modifyRes);
+         offset = dissect_ansi_map_ModifyRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_modifyRes);
          break;
   case  72: /*Search*/
-         offset = dissect_ansi_map_SearchRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_searchRes);;
+         offset = dissect_ansi_map_SearchRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_searchRes);;
          break;
   case  73: /*Seize Resource*/
-         offset = dissect_ansi_map_SeizeResourceRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_seizeResourceRes);
+         offset = dissect_ansi_map_SeizeResourceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_seizeResourceRes);
          break;
   case  74: /*SRF Directive*/
-         offset = dissect_ansi_map_SRFDirectiveRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_sRFDirectiveRes);
+         offset = dissect_ansi_map_SRFDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_sRFDirectiveRes);
          break;
   case  75: /*T Busy*/
-         offset = dissect_ansi_map_TBusyRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tBusyRes);
+         offset = dissect_ansi_map_TBusyRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tBusyRes);
          break;
   case  76: /*T NoAnswer*/
-         offset = dissect_ansi_map_TNoAnswerRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tNoAnswerRes);
+         offset = dissect_ansi_map_TNoAnswerRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tNoAnswerRes);
          break;
   case  81: /*Call Control Directive*/
-         offset = dissect_ansi_map_CallControlDirectiveRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_callControlDirectiveRes);
+         offset = dissect_ansi_map_CallControlDirectiveRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_callControlDirectiveRes);
          break;
   case  83: /*O Disconnect*/
-         offset = dissect_ansi_map_ODisconnectRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oDisconnectRes);
+         offset = dissect_ansi_map_ODisconnectRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oDisconnectRes);
          break;
   case  86: /*T Disconnect*/
-         offset = dissect_ansi_map_TDisconnectRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_tDisconnectRes);
+         offset = dissect_ansi_map_TDisconnectRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_tDisconnectRes);
          break;
   case  88: /*O CalledPartyBusy*/
-         offset = dissect_ansi_map_OCalledPartyBusyRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oCalledPartyBusyRes);
+         offset = dissect_ansi_map_OCalledPartyBusyRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oCalledPartyBusyRes);
          break;
    case  89: /*O NoAnswer*/
-         offset = dissect_ansi_map_ONoAnswerRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_oNoAnswerRes);
+         offset = dissect_ansi_map_ONoAnswerRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_oNoAnswerRes);
          break;
   case  90: /*Position Request*/
-         offset = dissect_ansi_map_PositionRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_positionRequestRes);
+         offset = dissect_ansi_map_PositionRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequestRes);
          break;
   case  91: /*Position Request Forward*/
-         offset = dissect_ansi_map_PositionRequestForwardRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_positionRequestForwardRes);
+         offset = dissect_ansi_map_PositionRequestForwardRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_positionRequestForwardRes);
          break;
   case  98: /*Roamer Database Verification Request*/
-         offset = dissect_ansi_map_RoamerDatabaseVerificationRequestRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_roamerDatabaseVerificationRequestRes);
+         offset = dissect_ansi_map_RoamerDatabaseVerificationRequestRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_roamerDatabaseVerificationRequestRes);
          break;
   case  99: /*Add Service*/
-         offset = dissect_ansi_map_AddServiceRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_addServiceRes);
+         offset = dissect_ansi_map_AddServiceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_addServiceRes);
          break;
   case  100: /*Drop Service*/
-         offset = dissect_ansi_map_DropServiceRes(TRUE, tvb, offset, pinfo, tree, hf_ansi_map_dropServiceRes);
+         offset = dissect_ansi_map_DropServiceRes(TRUE, tvb, offset, actx, tree, hf_ansi_map_dropServiceRes);
          break;
          /*End N.S0029 */
 
@@ -4061,6 +4062,8 @@ dissect_ansi_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     proto_item *ansi_map_item;
     proto_tree *ansi_map_tree = NULL;
     int        offset = 0;
+       asn1_ctx_t asn1_ctx;
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
        SMS_BearerData_tvb = NULL;
     g_pinfo = pinfo;
@@ -4081,7 +4084,7 @@ dissect_ansi_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        ansi_map_is_invoke = FALSE;
        is683_ota = FALSE;
        is801_pld = FALSE;
-       dissect_ansi_map_ComponentPDU(FALSE, tvb, offset, pinfo, ansi_map_tree, -1);
+       dissect_ansi_map_ComponentPDU(FALSE, tvb, offset, &asn1_ctx, ansi_map_tree, -1);
 
 }
 
index 8de2aacae93e2c64e9b4aa0576ee93b63b418218..0d783ab87887ed89ac155534e6c0f1ed489160e6 100644 (file)
@@ -24,15 +24,15 @@ MAP-CH-DataTypes gsm_map
 Component 
 #----------------------------------------------------------------------------------------
 #.FN_BODY InvokeParameter
-       offset = dissect_invokeData(pinfo, tree, tvb, offset);
+       offset = dissect_invokeData(tree, tvb, offset, actx);
 
 #----------------------------------------------------------------------------------------
 #.FN_BODY ReturnResultParameter
-       offset = dissect_returnResultData(pinfo, tree, tvb, offset);
+       offset = dissect_returnResultData(tree, tvb, offset, actx);
 
 #----------------------------------------------------------------------------------------
 #.FN_BODY ReturnErrorParameter
-       offset = dissect_returnErrorData(pinfo, tree, tvb, offset);
+       offset = dissect_returnErrorData(tree, tvb, offset, actx);
 
 #----------------------------------------------------------------------------------------
 #.FN_PARS  CAMELOperationLocalvalue
@@ -42,11 +42,11 @@ Component
 #.FN_BODY  CAMELOperationLocalvalue
 
 %(DEFAULT_BODY)s 
-  if (check_col(pinfo->cinfo, COL_INFO)){
-    col_append_fstr(pinfo->cinfo, COL_INFO, 
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_append_fstr(actx->pinfo->cinfo, COL_INFO, 
        val_to_str(opcode, camel_opr_code_strings, "Unknown CAMEL (%%u)"));
-    col_append_str(pinfo->cinfo, COL_INFO, " ");
-    col_set_fence(pinfo->cinfo, COL_INFO);
+    col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
+    col_set_fence(actx->pinfo->cinfo, COL_INFO);
   }
   gp_camelsrt_info->opcode=opcode;
 
@@ -123,7 +123,7 @@ tvbuff_t    *parameter_tvb;
 %(DEFAULT_BODY)s
  if (!parameter_tvb)
        return offset;
- dissect_camel_CAMEL_CallResult(implicit_tag, parameter_tvb, 0, pinfo, tree, -1);
+ dissect_camel_CAMEL_CallResult(implicit_tag, parameter_tvb, 0, actx, tree, -1);
  
 #.END
 
@@ -475,13 +475,12 @@ tvbuff_t  *parameter_tvb;
  subtree = proto_item_add_subtree(item, ett_camel_pdptypenumber);
 
  if (tvb_reported_length_remaining(tvb,start_offset) == 7){
-       dissect_gsm_map_CellGlobalIdOrServiceAreaIdFixedLength(TRUE, tvb, start_offset, pinfo, subtree, hf_camel_cellGlobalIdOrServiceAreaIdFixedLength);
+       dissect_gsm_map_CellGlobalIdOrServiceAreaIdFixedLength(TRUE, tvb, start_offset, actx, subtree, hf_camel_cellGlobalIdOrServiceAreaIdFixedLength);
  }else{
-       dissect_gsm_map_LAIFixedLength(TRUE, tvb, start_offset, pinfo, subtree, hf_camel_locationAreaId);
+       dissect_gsm_map_LAIFixedLength(TRUE, tvb, start_offset, actx, subtree, hf_camel_locationAreaId);
  }                     
 #.END
 
-#----------------------------------------------------------------------------------------
 #----------------------------------------------------------------------------------------
 
 #.TYPE_ATTR
index 3d6b3a5e753b1297ff5cbecdf658c27c63b11418..8bc71cb842e4acf3b1fa72ef538677d48ff48e8f 100644 (file)
@@ -43,6 +43,7 @@
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
 #include <epan/tap.h>
+#include <epan/asn1.h>
 #include "epan/expert.h"
 
 #include <stdio.h>
@@ -103,9 +104,9 @@ int hf_camelsrt_DeltaTime80=-1;
 static struct camelsrt_info_t * gp_camelsrt_info;
 
 /* Forward declarations */
-static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
-static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
-static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx);
+static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx);
+static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx);
 
 
 #include "packet-camel-hf.c"
@@ -358,7 +359,7 @@ dissect_RP_cause_ie(tvbuff_t *tvb, guint32 offset, _U_ guint len,
 }
 
 
-static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
   proto_item *cause;
   gint8 bug_class;
   gboolean bug_pc, bug_ind_field;
@@ -367,196 +368,196 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
 
   switch(opcode){
   case 0: /*InitialDP*/
-    offset=dissect_camel_InitialDPArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_InitialDPArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 16: /*AssistRequestInstructions*/
-    offset=dissect_camel_AssistRequestInstructionsArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_AssistRequestInstructionsArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 17: /*EstablishTemporaryConnection*/
-    offset=dissect_camel_EstablishTemporaryConnectionArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_EstablishTemporaryConnectionArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 18: /*DisconnectForwardConnections*/
     proto_tree_add_text(tree, tvb, offset, -1, "Disconnect Forward Connection");
     break;
   case 19: /*ConnectToResource*/
-    offset=dissect_camel_ConnectToResourceArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ConnectToResourceArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 20: /*Connect*/
-    offset=dissect_camel_ConnectArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ConnectArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 22: /*releaseCall*/
-    offset=dissect_camel_ReleaseCallArg(FALSE, tvb, offset, pinfo, tree, hf_camel_cause);
+    offset=dissect_camel_ReleaseCallArg(FALSE, tvb, offset, actx, tree, hf_camel_cause);
     break;
   case 23: /*RequestReportBCSMEvent*/
-    offset=dissect_camel_RequestReportBCSMEventArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_RequestReportBCSMEventArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 24: /*EventReportBCSM*/
-    offset=dissect_camel_EventReportBCSMArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_EventReportBCSMArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 27: /*CollectInformation*/
-    offset=dissect_camel_CollectInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CollectInformationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 31: /*Continue*/
     /* Continue: no arguments - do nothing */
     break;
   case 32: /*initiateCallAttempt*/
-    offset=dissect_camel_InitiateCallAttemptArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_InitiateCallAttemptArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 33: /*ResetTimer*/
-    offset=dissect_camel_ResetTimerArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ResetTimerArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 34: /*FurnishChargingInformation*/
-    /* offset=dissect_camel_FurnishChargingInformationArg(TRUE, tvb, offset, pinfo, tree, -1); */
+    /* offset=dissect_camel_FurnishChargingInformationArg(TRUE, tvb, offset, tree, -1); */
     offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
     offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
-    offset=dissect_camel_CAMEL_FCIBillingChargingCharacteristics(TRUE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CAMEL_FCIBillingChargingCharacteristics(TRUE, tvb, offset, actx, tree, -1);
     break;
   case 35: /*ApplyCharging*/
-    offset=dissect_camel_ApplyChargingArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ApplyChargingArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 36: /*ApplyChargingReport*/
-    /* offset=dissect_camel_ApplyChargingReportArg(TRUE, tvb, offset, pinfo, tree, -1); */
+    /* offset=dissect_camel_ApplyChargingReportArg(TRUE, tvb, offset, tree, -1); */
     offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
     offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
-    offset=dissect_camel_CAMEL_CallResult(TRUE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CAMEL_CallResult(TRUE, tvb, offset, actx, tree, -1);
     break;
   case 41: /*CallGap*/
-    offset=dissect_camel_CallGapArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CallGapArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 44: /*CallInformationReport*/
-    offset=dissect_camel_CallInformationReportArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CallInformationReportArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 45: /*CallInformationRequest*/
-    offset=dissect_camel_CallInformationRequestArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CallInformationRequestArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 46: /*SendChargingInformation*/
-    offset=dissect_camel_SendChargingInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_SendChargingInformationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 47: /*PlayAnnouncement*/
-    offset=dissect_camel_PlayAnnouncementArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_PlayAnnouncementArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 48: /*PromptAndCollectUserInformation*/
-    offset=dissect_camel_PromptAndCollectUserInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_PromptAndCollectUserInformationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 49: /*SpecializedResourceReport*/
-    offset=dissect_camel_SpecializedResourceReportArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_SpecializedResourceReportArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 53: /*Cancel*/
-    offset=dissect_camel_CancelArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CancelArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 56: /*ContinueWithArgument*/
-    offset=dissect_camel_ContinueWithArgumentArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ContinueWithArgumentArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 60: /*InitialDPSMS*/
-    offset=dissect_camel_InitialDPSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_InitialDPSMSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 61: /*FurnishChargingInformationSMS*/
-    /* offset=dissect_camel_FurnishChargingInformationSMSArg(FALSE, tvb, offset, pinfo, tree, -1); */
+    /* offset=dissect_camel_FurnishChargingInformationSMSArg(FALSE, tvb, offset, tree, -1); */
     offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
     offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
-    offset=dissect_camel_CAMEL_FCISMSBillingChargingCharacteristics(TRUE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CAMEL_FCISMSBillingChargingCharacteristics(TRUE, tvb, offset, actx, tree, -1);
     break;
   case 62: /*ConnectSMS*/
-    offset=dissect_camel_ConnectSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ConnectSMSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 63: /*RequestReportSMSEvent*/
-    offset=dissect_camel_RequestReportSMSEventArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_RequestReportSMSEventArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 64: /*EventReportSMS*/
-    offset=dissect_camel_EventReportSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_EventReportSMSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 65: /*ContinueSMS*/
     /* ContinueSMS: no arguments - do nothing */
     break;
   case 66: /*ReleaseSMS*/
-    offset=dissect_camel_ReleaseSMSArg(FALSE, tvb, offset, pinfo, tree, hf_camel_RP_Cause);
+    offset=dissect_camel_ReleaseSMSArg(FALSE, tvb, offset, actx, tree, hf_camel_RP_Cause);
     break;
   case 67: /*ResetTimerSMS*/
-    offset=dissect_camel_ResetTimerSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ResetTimerSMSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 71: /*ApplyChargingGPRS*/
-    offset=dissect_camel_ApplyChargingGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ApplyChargingGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 72: /*ApplyChargingReportGPRS*/
-    offset=dissect_camel_ApplyChargingReportGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ApplyChargingReportGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 73: /*CancelGPRS*/
-    offset=dissect_camel_CancelGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CancelGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 74: /*ConnectGPRS*/
-    offset=dissect_camel_ConnectGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ConnectGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 75: /*ContinueGPRS*/
-    offset=dissect_camel_ContinueGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ContinueGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 76: /*EntityReleasedGPRS*/
-    offset=dissect_camel_EntityReleasedGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_EntityReleasedGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 77: /*FurnishChargingInformationGPRS*/
-    /* offset=dissect_camel_FurnishChargingInformationGPRSArg(FALSE, tvb, offset, pinfo, tree, -1); */
+    /* offset=dissect_camel_FurnishChargingInformationGPRSArg(FALSE, tvb, offset, tree, -1); */
     offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
     offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
-    offset=dissect_camel_CAMEL_FCIGPRSBillingChargingCharacteristics(TRUE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CAMEL_FCIGPRSBillingChargingCharacteristics(TRUE, tvb, offset, actx, tree, -1);
     break;
   case 78: /*InitialDPGPRS*/
-    offset=dissect_camel_InitialDPGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_InitialDPGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 79: /*ReleaseGPRS*/
-    offset=dissect_camel_ReleaseGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ReleaseGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 80: /*EventReportGPRS*/
-    offset=dissect_camel_EventReportGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_EventReportGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 81: /*RequestReportGPRSEvent*/
-    offset=dissect_camel_RequestReportGPRSEventArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_RequestReportGPRSEventArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 82: /*ResetTimerGPRS*/
-    offset=dissect_camel_ResetTimerGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ResetTimerGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 83: /*SendChargingInformationGPRS*/
-    offset=dissect_camel_SendChargingInformationGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_SendChargingInformationGPRSArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 86: /*DFCWithArgument*/
-    offset= dissect_camel_DisconnectForwardConnectionWithArgumentArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset= dissect_camel_DisconnectForwardConnectionWithArgumentArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 88: /*ContinueWithArgument*/
          /* XXX Same as opcode 56 ??? */
-    offset= dissect_camel_ContinueWithArgumentArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset= dissect_camel_ContinueWithArgumentArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 90: /*DisconnectLeg*/
-    offset= dissect_camel_DisconnectLegArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset= dissect_camel_DisconnectLegArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 93: /*MoveLeg*/
-    offset= dissect_camel_MoveLegArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset= dissect_camel_MoveLegArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 95: /*SplitLeg*/
-    offset= dissect_camel_SplitLegArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset= dissect_camel_SplitLegArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 96: /*EntityReleased*/
-    offset= dissect_camel_EntityReleasedArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset= dissect_camel_EntityReleasedArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 97: /*PlayTone*/
-    offset= dissect_camel_PlayToneArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset= dissect_camel_PlayToneArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
     /* todo call the asn.1 dissector */
   }
   return offset;
 }
 
 
-static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx) {
   proto_item *cause;
 
   switch(opcode){
   case 32: /*initiateCallAttempt*/
-    offset=dissect_camel_InitiateCallAttemptRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_InitiateCallAttemptRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 48: /*PromptAndCollectUserInformation*/
-    offset=dissect_camel_ReceivedInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_ReceivedInformationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 55: /*ActivityTest*/
     /* ActivityTest: no arguments - do nothing */
@@ -567,31 +568,31 @@ static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode);
+    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode);
   }
   return offset;
 }
 
-static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,asn1_ctx_t *actx) {
   proto_item *cause;
 
   switch(errorCode) {
   case 1: /*CancelFailed*/
-    offset=dissect_camel_CancelFailedPARAM(TRUE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_CancelFailedPARAM(TRUE, tvb, offset, actx, tree, -1);
     break;
   case 10: /*RequestedInfoError*/
-    offset=dissect_camel_RequestedInfoErrorPARAM(TRUE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_camel_RequestedInfoErrorPARAM(TRUE, tvb, offset, actx, tree, -1);
     break;
   case 11: /*SystemFailure*/
-   offset=dissect_camel_SystemFailurePARAM(TRUE, tvb, offset, pinfo, tree, -1);
+   offset=dissect_camel_SystemFailurePARAM(TRUE, tvb, offset, actx, tree, -1);
     break;
   case 12: /*TaskRefused*/
-   offset=dissect_camel_TaskRefusedPARAM(TRUE, tvb, offset, pinfo, tree, -1);
+   offset=dissect_camel_TaskRefusedPARAM(TRUE, tvb, offset, actx, tree, -1);
     break;
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode);
+    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode);
   }
   return offset;
 }
@@ -604,6 +605,9 @@ static void dissect_camelext_CAPGPRSReferenceNumber(tvbuff_t *tvb, packet_info *
   proto_tree    *tree=NULL;
   proto_item    *camel_item=NULL;
   proto_tree    *camel_tree=NULL;
+  asn1_ctx_t   asn1_ctx;
+
+  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
 
   if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
@@ -620,19 +624,19 @@ static void dissect_camelext_CAPGPRSReferenceNumber(tvbuff_t *tvb, packet_info *
     item = proto_tree_add_text(camel_tree, tvb, 0, -1, "GPRS Reference Number");
     tree = proto_item_add_subtree(item, ett_camel_CAPGPRSReferenceNumber);
   }
-  dissect_camel_CAPGPRSReferenceNumber(FALSE, tvb, 0, pinfo, tree, -1);
+  dissect_camel_CAPGPRSReferenceNumber(FALSE, tvb, 0, &asn1_ctx, tree, -1);
 }
 
 static int
-dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
+dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_,proto_tree *tree, int hf_index) {
 
   char *version_ptr;
   struct tcap_private_t * p_private_tcap;
 
   opcode = 0;
   application_context_version = 0;
-  if (pinfo->private_data != NULL){
-    p_private_tcap=pinfo->private_data; 
+  if (actx->pinfo->private_data != NULL){
+    p_private_tcap=actx->pinfo->private_data; 
     
     if (p_private_tcap->acv==TRUE ){
       version_ptr = strrchr(p_private_tcap->oid,'.');
@@ -642,6 +646,7 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac
     gp_camelsrt_info->tcap_context=p_private_tcap->context; 
     if (p_private_tcap->context)
       gp_camelsrt_info->tcap_session_id
+
        = ( (struct tcaphash_context_t *) (p_private_tcap->context))->session_id;
   }
 
@@ -649,13 +654,13 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pac
   /* Get the length and add 2 */
   camel_pdu_size = tvb_get_guint8(tvb, offset+1)+2;
 
-  if (check_col(pinfo->cinfo, COL_INFO)){
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
     /* Populate the info column with PDU type*/
-    col_set_str(pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camel_Component_vals, "Unknown Camel (%u)"));
-    col_append_fstr(pinfo->cinfo, COL_INFO, " ");
+    col_set_str(actx->pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camel_Component_vals, "Unknown Camel (%u)"));
+    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
   }
 
-  offset = dissect_camel_Component(FALSE, tvb, 0, pinfo, tree, hf_index);
+  offset = dissect_camel_Component(FALSE, tvb, 0, actx, tree, hf_index);
 
   return offset;
 }
@@ -667,6 +672,8 @@ dissect_camel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
   proto_tree    *tree=NULL;
   proto_item  *stat_item=NULL;
   proto_tree  *stat_tree=NULL;
+  asn1_ctx_t asn1_ctx;
+  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
   if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "Camel");
@@ -680,7 +687,7 @@ dissect_camel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
   /* camelsrt reset counter, and initialise global pointer
      to store service response time related data */
   gp_camelsrt_info=camelsrt_razinfo();
-  dissect_camel_camelPDU(FALSE, tvb, 0, pinfo, tree, -1);
+  dissect_camel_camelPDU(FALSE, tvb, 0, &asn1_ctx , tree, -1);
   
   /* If a Tcap context is associated to this transaction */
   if (gcamel_HandleSRT &&
index 332a9e9a0383ce9acb1976d602f37bd287eee2ba..aeb7abe2a0797328ca3034bceba0d238320b9b5a 100644 (file)
@@ -20,8 +20,8 @@ CompressedData    B "1.3.26.0.4406.0.4.2"  "cdt"
                           val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
                                       "unknown"));
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ", 
+  if (check_col (actx->pinfo->cinfo, COL_INFO))
+    col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", 
                      val_to_str (value, cdt_AlgorithmID_ShortForm_vals, 
                                  "unknown"));
 
@@ -36,8 +36,8 @@ CompressedData    B "1.3.26.0.4406.0.4.2"  "cdt"
                           val_to_str (value, cdt_ContentType_ShortForm_vals, 
                                       "unknown"));
 
-  if (check_col (pinfo->cinfo, COL_INFO))
-    col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ", 
+  if (check_col (actx->pinfo->cinfo, COL_INFO))
+    col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", 
                      val_to_str (value, cdt_ContentType_ShortForm_vals, 
                                  "unknown"));
 
@@ -57,8 +57,8 @@ CompressedData    B "1.3.26.0.4406.0.4.2"  "cdt"
 
     proto_item_append_text (cdt_item, ", %%s", name);
 
-    if (check_col (pinfo->cinfo, COL_INFO))
-      col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ", name);
+    if (check_col (actx->pinfo->cinfo, COL_INFO))
+      col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", name);
   }
 
 #.FN_PARS CompressedContent
@@ -73,10 +73,10 @@ CompressedData    B "1.3.26.0.4406.0.4.2"  "cdt"
   if (compr_tvb == NULL) {
     tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
                               "[Error: Unable to get compressed content]");
-    expert_add_info_format (pinfo, tf, PI_UNDECODED, PI_ERROR,
+    expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
                             "Unable to get compressed content");
-    if (check_col (pinfo->cinfo, COL_INFO))
-      col_append_fstr (pinfo->cinfo, COL_INFO, 
+    if (check_col (actx->pinfo->cinfo, COL_INFO))
+      col_append_fstr (actx->pinfo->cinfo, COL_INFO, 
                        "[Error: Unable to get compressed content]");
     return offset;
   }
@@ -86,17 +86,17 @@ CompressedData    B "1.3.26.0.4406.0.4.2"  "cdt"
   if (next_tvb == NULL) {
     tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
                               "[Error: Unable to uncompress content]");
-    expert_add_info_format (pinfo, tf, PI_UNDECODED, PI_ERROR,
+    expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
                             "Unable to uncompress content");
-    if (check_col (pinfo->cinfo, COL_INFO))
-      col_append_fstr (pinfo->cinfo, COL_INFO, 
+    if (check_col (actx->pinfo->cinfo, COL_INFO))
+      col_append_fstr (actx->pinfo->cinfo, COL_INFO, 
                        "[Error: Unable to uncompress content]");
     return offset;
   }
 
   tvb_set_child_real_data_tvbuff (tvb, next_tvb);
-  add_new_data_source (pinfo, next_tvb, "Uncompressed Content");
+  add_new_data_source (actx->pinfo, next_tvb, "Uncompressed Content");
 
-  dissect_x411_mts_apdu (next_tvb, pinfo, top_tree);
+  dissect_x411_mts_apdu (next_tvb, actx->pinfo, top_tree);
   
 #.END
index 4a048aba4e80eb89c2fba90d0bcbd6bf38c8fe5d..718c8e7b7f20ae547f6f9b0607dd6e0a40cf9afc 100644 (file)
@@ -34,6 +34,7 @@
 #include <epan/packet.h>
 #include <epan/oid_resolv.h>
 #include <epan/expert.h>
+#include <epan/asn1.h>
 
 #include "packet-ber.h"
 #include "packet-x411.h"
index ffb6f959918cd63ee45f8fd2902cd7824828fd85..5b17c93c4a57ea21546af33ab23288bf92a530db 100644 (file)
@@ -15,6 +15,13 @@ ObjectClass
 Attribute
 RDNSequence
 
+#.REGISTER
+OperationalState               B "2.9.3.2.7.35" "smi2AttributeID(7)operationalState(35)"
+Destination                            B "2.9.3.2.7.55" "smi2AttributeID(7)destination(55)"
+DiscriminatorConstruct B "2.9.3.2.7.56" "smi2AttributeID(7)discriminatorConstruct(56)"
+NameBinding                            B "2.9.3.2.7.63" "smi2AttributeID(7)nameBinding(63)"
+ObjectClass                            B "2.9.3.2.7.65" "smi2AttributeID(7)objectClass(65)"
+
 #.NO_EMIT
 
 #.PDU
@@ -24,14 +31,14 @@ RDNSequence
 #.FIELD_RENAME
 
 #.FN_HDR CMIPAbortInfo
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_append_fstr(pinfo->cinfo, COL_INFO, "CMIP-A-ABORT");
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_append_fstr(actx->pinfo->cinfo, COL_INFO, "CMIP-A-ABORT");
   }
 #.END
 
 #.FN_HDR CMIPUserInfo
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_append_fstr(pinfo->cinfo, COL_INFO, "CMIP-A-ASSOCIATE");
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_append_fstr(actx->pinfo->cinfo, COL_INFO, "CMIP-A-ASSOCIATE");
   }
 #.END
 
@@ -39,43 +46,43 @@ RDNSequence
   guint32 value;
 
   %(DEFAULT_BODY)s
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_append_fstr(pinfo->cinfo, COL_INFO, " AbortSource:%%s", val_to_str(value, cmip_CMIPAbortSource_vals, " Unknown AbortSource:%%d"));
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " AbortSource:%%s", val_to_str(value, cmip_CMIPAbortSource_vals, " Unknown AbortSource:%%d"));
   }
 #.END
 
 #.FN_BODY Opcode  VAL_PTR = &opcode
   %(DEFAULT_BODY)s
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_prepend_fstr(pinfo->cinfo, COL_INFO, "%%s", val_to_str(opcode, cmip_Opcode_vals, " Unknown Opcode:%%d"));
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%%s", val_to_str(opcode, cmip_Opcode_vals, " Unknown Opcode:%%d"));
   }
 #.END
 
 #.FN_HDR Invoke
   opcode_type=OPCODE_INVOKE;
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_prepend_fstr(pinfo->cinfo, COL_INFO, "Invoke ");
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "Invoke ");
   }
 #.END
 
 #.FN_HDR ReturnResult
   opcode_type=OPCODE_RETURN_RESULT;
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_prepend_fstr(pinfo->cinfo, COL_INFO, "ReturnResult ");
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "ReturnResult ");
   }
 #.END
 
 #.FN_HDR ReturnError
   opcode_type=OPCODE_RETURN_ERROR;
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_prepend_fstr(pinfo->cinfo, COL_INFO, "ReturnError ");
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "ReturnError ");
   }
 #.END
 
 #.FN_HDR Reject
   opcode_type=OPCODE_REJECT;
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    col_prepend_fstr(pinfo->cinfo, COL_INFO, "Reject ");
+  if(check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "Reject ");
   }
 #.END
 
@@ -85,55 +92,55 @@ RDNSequence
 
 #.FN_BODY AttributeId/localForm
   attributeform = ATTRIBUTE_LOCAL_FORM;
-  offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_cmip_localForm, NULL);
+  offset = dissect_ber_integer(implicit_tag, actx->pinfo, tree, tvb, offset, hf_cmip_localForm, NULL);
 
 #.FN_BODY Attribute/value
   /*XXX handle local form here */
   if(attributeform==ATTRIBUTE_GLOBAL_FORM){
-    offset=call_ber_oid_callback(attribute_identifier_id, tvb, offset, pinfo, tree);
+    offset=call_ber_oid_callback(attribute_identifier_id, tvb, offset, actx->pinfo, tree);
   }
 #.FN_PARS AttributeValueAssertion/id
        FN_VARIANT = _str  VAL_PTR = &attributevalueassertion_id
 
 #.FN_BODY AttributeValueAssertion/value
-    offset=call_ber_oid_callback(attributevalueassertion_id, tvb, offset, pinfo, tree);
+    offset=call_ber_oid_callback(attributevalueassertion_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_BODY Argument
   switch(opcode_type){
   case OPCODE_INVOKE:
     switch(opcode){
     case 0: /* M-eventreport */
-      offset = dissect_cmip_EventReportArgument(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_EventReportArgument(FALSE, tvb, offset, actx, tree, -1);
       break;
     case 1: /* M-eventreport-confirmed */
-      offset = dissect_cmip_EventReportArgument(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_EventReportArgument(FALSE, tvb, offset, actx, tree, -1);
       break;
     case 2: /* M-linkedreply */
-      offset = dissect_cmip_LinkedReplyArgument(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_LinkedReplyArgument(FALSE, tvb, offset, actx, tree, -1);
       break;
     case 3: /* M-get */
-      offset = dissect_cmip_GetArgument(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_GetArgument(FALSE, tvb, offset,actx, tree, -1);
       break;
     case 4: /* M-set */
-      offset = dissect_cmip_SetArgument(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_SetArgument(FALSE, tvb, offset,actx, tree, -1);
       break;
     case 5: /* M-set-confirmed */
-      offset = dissect_cmip_SetArgument(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_SetArgument(FALSE, tvb, offset,actx, tree, -1);
       break;
     case 6: /* M-action*/
-      offset = dissect_cmip_ActionArgument(FALSE, tvb,  offset, pinfo, tree, -1);
+      offset = dissect_cmip_ActionArgument(FALSE, tvb,  offset, actx, tree, -1);
       break;
     case 7: /* M-action-confirmed*/
-      offset = dissect_cmip_ActionArgument(FALSE, tvb,  offset, pinfo, tree, -1);
+      offset = dissect_cmip_ActionArgument(FALSE, tvb,  offset, actx, tree, -1);
       break;
     case 8: /* M-create*/
-      offset = dissect_cmip_CreateArgument(FALSE, tvb,  offset, pinfo, tree, -1);
+      offset = dissect_cmip_CreateArgument(FALSE, tvb,  offset, actx, tree, -1);
       break;
     case 9: /* M-delete*/
-      offset = dissect_cmip_DeleteArgument(FALSE, tvb,  offset, pinfo, tree, -1);
+      offset = dissect_cmip_DeleteArgument(FALSE, tvb,  offset, actx, tree, -1);
       break;
     case 10: /* M-cancelget */
-      offset = dissect_cmip_InvokeIDType(FALSE, tvb,  offset, pinfo, tree, -1);
+      offset = dissect_cmip_InvokeIDType(FALSE, tvb,  offset, actx, tree, -1);
       break;
     }
     break;
@@ -142,28 +149,28 @@ RDNSequence
     case 0: /* M-eventreport*/
       break;  /* No return data */
     case 1: /* M-eventreport-confirmed */
-      offset = dissect_cmip_EventReportResult(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_EventReportResult(FALSE, tvb, offset, actx, tree, -1);
       break;
     case 2: /* M-linkedreply*/
       break;  /* No return data */
     case 3: /* M-get */
-      offset = dissect_cmip_GetResult(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_GetResult(FALSE, tvb, offset, actx, tree, -1);
       break;
     case 4: /* M-set */
       break;  /* No return data */
     case 5: /* M-set-confirmed*/
-      offset = dissect_cmip_SetResult(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_SetResult(FALSE, tvb, offset, actx, tree, -1);
       break;
     case 6: /* M-action*/
       break;  /* No return data */
     case 7: /* M-action-confirmed*/
-      offset = dissect_cmip_ActionResult(FALSE, tvb, offset, pinfo, tree, -1);
+      offset = dissect_cmip_ActionResult(FALSE, tvb, offset, actx, tree, -1);
       break;
     case 8: /* M-create*/
-      offset = dissect_cmip_CreateResult(FALSE, tvb,  offset, pinfo, tree, -1);
+      offset = dissect_cmip_CreateResult(FALSE, tvb,  offset, actx, tree, -1);
       break;
     case 9: /* M-delete*/
-      offset = dissect_cmip_DeleteResult(FALSE, tvb,  offset, pinfo, tree, -1);
+      offset = dissect_cmip_DeleteResult(FALSE, tvb,  offset, actx, tree, -1);
       break;
     case 10: /* M-cancelget */
       break; /* doe this one return any data? */
@@ -184,43 +191,43 @@ RDNSequence
   FN_VARIANT = _str  HF_INDEX = hf_cmip_actionType_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY ActionInfo/actionInfoArg
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS ActionReply/actionType
   FN_VARIANT = _str  HF_INDEX = hf_cmip_actionType_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY ActionReply/actionReplyInfo
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS EventReportArgument/eventType
   FN_VARIANT = _str  HF_INDEX = hf_cmip_eventType_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY EventReportArgument/eventInfo
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS EventReply/eventType
   FN_VARIANT = _str  HF_INDEX = hf_cmip_eventType_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY EventReply/eventReplyInfo
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS ModificationItem/attributeId
   FN_VARIANT = _str  HF_INDEX = hf_cmip_attributeId_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY ModificationItem/attributeValue
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS SpecificErrorInfo/errorId
   FN_VARIANT = _str  HF_INDEX = hf_cmip_errorId_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY SpecificErrorInfo/errorInfo
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS AttributeError/attributeId
   FN_VARIANT = _str  HF_INDEX = hf_cmip_attributeId_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY AttributeError/attributeValue
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS ErrorInfo/actionType
   FN_VARIANT = _str  HF_INDEX = hf_cmip_actionType_OID  VAL_PTR = &object_identifier_id
@@ -235,7 +242,7 @@ RDNSequence
   FN_VARIANT = _str  HF_INDEX = hf_cmip_eventType_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY InvalidArgumentValueEventValue/eventInfo
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.END
 
index cd85d95891b74907fcc2bba286d4773046c7d0f7..6f0b0af0eb2c13e829722fdbb6a9abe81d59a24b 100644 (file)
@@ -31,6 +31,7 @@
 #include <epan/packet.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -90,45 +91,6 @@ static const char *objectclass_identifier_id;
 #include "packet-cmip-fn.c"
 
 
-static void
-dissect_cmip_attribute_35(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
-{
-
-       dissect_cmip_OperationalState(FALSE, tvb, 0, pinfo, parent_tree, hf_OperationalState);
-
-}
-
-static void
-dissect_cmip_attribute_55(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
-{
-
-       dissect_cmip_Destination(FALSE, tvb, 0, pinfo, parent_tree,hf_Destination);
-
-}
-
-static void
-dissect_cmip_attribute_56(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
-{
-
-       dissect_cmip_DiscriminatorConstruct(FALSE, tvb, 0, pinfo, parent_tree, hf_DiscriminatorConstruct);
-
-}
-
-static void
-dissect_cmip_attribute_63(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
-{
-
-       dissect_cmip_NameBinding(FALSE, tvb, 0, pinfo, parent_tree, hf_NameBinding);
-
-}
-
-static void
-dissect_cmip_attribute_65(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
-{
-
-       dissect_cmip_ObjectClass(FALSE, tvb, 0, pinfo, parent_tree, hf_ObjectClass);
-
-}
 
 
 /* XXX this one should be broken out later and moved into the conformance file */
@@ -138,6 +100,8 @@ dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        static struct SESSION_DATA_STRUCTURE* session = NULL;
        proto_item *item = NULL;
        proto_tree *tree = NULL;
+       asn1_ctx_t asn1_ctx;
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
 
        /* do we have spdu type from the session dissector?  */
@@ -173,13 +137,13 @@ dissect_cmip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                case SES_DISCONNECT:
                case SES_FINISH:
                case SES_REFUSE:
-                       dissect_cmip_CMIPUserInfo(FALSE,tvb,0,pinfo,tree,-1);
+                       dissect_cmip_CMIPUserInfo(FALSE,tvb,0,&asn1_ctx,tree,-1);
                        break;
                case SES_ABORT:
-                       dissect_cmip_CMIPAbortInfo(FALSE,tvb,0,pinfo,tree,-1);
+                       dissect_cmip_CMIPAbortInfo(FALSE,tvb,0,&asn1_ctx,tree,-1);
                        break;
                case SES_DATA_TRANSFER:
-                       dissect_cmip_ROS(FALSE,tvb,0,pinfo,tree,-1);
+                       dissect_cmip_ROS(FALSE,tvb,0,&asn1_ctx,tree,-1);
                        break;
                default:
                        ;
@@ -251,14 +215,10 @@ void proto_register_cmip(void) {
 void proto_reg_handoff_cmip(void) {
        register_ber_oid_dissector("2.9.0.0.2", dissect_cmip, proto_cmip, "cmip");
        register_ber_oid_dissector("2.9.1.1.4", dissect_cmip, proto_cmip, "joint-iso-itu-t(2) ms(9) cmip(1) cmip-pci(1) abstractSyntax(4)");
-       register_ber_oid_dissector("2.9.3.2.7.35", dissect_cmip_attribute_35, proto_cmip, "smi2AttributeID (7) operationalState(35)");
-       register_ber_oid_dissector("2.9.3.2.7.55", dissect_cmip_attribute_55, proto_cmip, "smi2AttributeID (7) destination(55)");
-       register_ber_oid_dissector("2.9.3.2.7.56", dissect_cmip_attribute_56, proto_cmip, "smi2AttributeID (7) discriminatorConstruct(56)");
-       register_ber_oid_dissector("2.9.3.2.7.63", dissect_cmip_attribute_63, proto_cmip, "smi2AttributeID (7) nameBinding(63)");
-       register_ber_oid_dissector("2.9.3.2.7.65", dissect_cmip_attribute_65, proto_cmip, "smi2AttributeID (7) objectClass(65)");
 
        add_oid_str_name("2.9.3.2.3.4","eventForwardingDiscriminator(4)");
        add_oid_str_name("2.9.1.1.4","joint-iso-itu-t(2) ms(9) cmip(1) cmip-pci(1) abstractSyntax(4)");
 
+#include "packet-cmip-dis-tab.c"
 }
 
index 95049ccc6f63303dc11508fbe6693d63293d4159..d6d36a16a9783f6eb00b5c6b9e1d33d102adf839 100644 (file)
@@ -25,20 +25,20 @@ SignatureValue
 UnsignedAttributes
 
 #.REGISTER
-ContentInfo       B "1.2.840.113549.1.9.16.1.6" "id-ct-contentInfo"
-#OctetString   B "1.2.840.113549.1.7.1"      "id-data"                  see x509sat.cnf
-SignedData        B "1.2.840.113549.1.7.2"      "id-signedData"
-EnvelopedData     B "1.2.840.113549.1.7.3"      "id-envelopedData"
-DigestedData      B "1.2.840.113549.1.7.5"      "id-digestedData"
-EncryptedData     B "1.2.840.113549.1.7.6"      "id-encryptedData"
-AuthenticatedData B "1.2.840.113549.1.9.16.1.2" "id-ct-authenticatedData"
+ContentInfo                    B "1.2.840.113549.1.9.16.1.6" "id-ct-contentInfo"
+#OctetString           B "1.2.840.113549.1.7.1"      "id-data"                  see x509sat.cnf
+SignedData                     B "1.2.840.113549.1.7.2"      "id-signedData"
+EnvelopedData          B "1.2.840.113549.1.7.3"      "id-envelopedData"
+DigestedData           B "1.2.840.113549.1.7.5"      "id-digestedData"
+EncryptedData          B "1.2.840.113549.1.7.6"      "id-encryptedData"
+AuthenticatedData      B "1.2.840.113549.1.9.16.1.2" "id-ct-authenticatedData"
 
-ContentType              B "1.2.840.113549.1.9.3"      "id-contentType"
-MessageDigest    B "1.2.840.113549.1.9.4"      "id-messageDigest"
-SigningTime              B "1.2.840.113549.1.9.5"      "id-signingTime"
-Countersignature  B "1.2.840.113549.1.9.6"     "id-counterSignature"
+ContentType                    B "1.2.840.113549.1.9.3"        "id-contentType"
+MessageDigest          B "1.2.840.113549.1.9.4"        "id-messageDigest"
+SigningTime                    B "1.2.840.113549.1.9.5"        "id-signingTime"
+Countersignature       B "1.2.840.113549.1.9.6"        "id-counterSignature"
 
-ContentInfo     B "2.6.1.4.18" "id-et-pkcs7"
+ContentInfo                    B "2.6.1.4.18" "id-et-pkcs7"
 
 IssuerAndSerialNumber  B "1.3.6.1.4.1.311.16.4" "ms-oe-encryption-key-preference"
 SMIMECapabilities      B "1.2.840.113549.1.9.15" "id-smime-capabilities"
@@ -80,7 +80,7 @@ EncryptedContentInfo/contentType      encryptedContentType
        }
 
 #.FN_BODY ContentInfo/content
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
 #.FN_BODY EncapsulatedContentInfo/eContent
@@ -92,11 +92,11 @@ EncryptedContentInfo/contentType    encryptedContentType
   int content_offset;
 
   /* XXX Do we care about printing out the octet string? */
-  offset = dissect_cms_OCTET_STRING(FALSE, tvb, offset, pinfo, NULL, hf_cms_eContent);
+  offset = dissect_cms_OCTET_STRING(FALSE, tvb, offset, actx, NULL, hf_cms_eContent);
 
   pdu_offset = get_ber_identifier(tvb, pdu_offset, &class, &pc, &tag);
   content_offset = pdu_offset = get_ber_length(tree, tvb, pdu_offset, &len, &ind);
-  pdu_offset = call_ber_oid_callback(object_identifier_id, tvb, pdu_offset, pinfo, top_tree ? top_tree : tree);
+  pdu_offset = call_ber_oid_callback(object_identifier_id, tvb, pdu_offset, actx->pinfo, top_tree ? top_tree : tree);
   
   /* save the content for checking the message digest */       
   content_tvb = tvb_new_subset(tvb, content_offset, len, -1);
@@ -105,7 +105,7 @@ EncryptedContentInfo/contentType    encryptedContentType
   FN_VARIANT = _str  HF_INDEX = hf_cms_ci_contentType  VAL_PTR = &object_identifier_id
 
 #.FN_BODY OtherKeyAttribute/keyAttr
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
 #.FN_PARS Attribute/attrType
@@ -123,7 +123,7 @@ EncryptedContentInfo/contentType    encryptedContentType
 
 #.FN_BODY AttributeValue
 
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_BODY MessageDigest
   proto_item *pi;
@@ -156,7 +156,7 @@ EncryptedContentInfo/contentType    encryptedContentType
 
 #.FN_BODY T_parameters
 
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 
 #.FN_PARS RC2ParameterVersion
index 315ee5d732150ff7f5bccf4d45b1693b4d48b922..ba9436c49d962b2b14d8411c7dea50e7c77eb178 100644 (file)
@@ -31,6 +31,7 @@
 #include <epan/packet.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -55,7 +56,7 @@ static int hf_cms_ci_contentType = -1;
 /* Initialize the subtree pointers */
 #include "packet-cms-ett.c"
 
-static int dissect_cms_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) ; /* XXX kill a compiler warning until asn2wrs stops generating these silly wrappers */
+static int dissect_cms_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) ; /* XXX kill a compiler warning until asn2wrs stops generating these silly wrappers */
 
 
 static const char *object_identifier_id;
index fcfa9523aa3e73985a98e3c0a99f0a6a1b7708d4..65b2f3418ece376ef42247b29ef182e4ed3120ec 100644 (file)
@@ -138,14 +138,14 @@ TokenData/time            utctime
        guint32 len;
 
        /* check and see if this is an empty set */
-       dissect_ber_length(pinfo, tree, tvb, offset+1, &len, NULL);
+       dissect_ber_length(actx->pinfo, tree, tvb, offset+1, &len, NULL);
 
        if(len == 0) {
                /* its an empty set - i.e anonymous  (assuming version is DEFAULTed) */
                proto_tree_add_text(tree, tvb, offset, -1,"Anonymous");
 
-               if(check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " anonymous");
+               if(check_col(actx->pinfo->cinfo, COL_INFO))
+                       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " anonymous");
 
        }
        /* do the default thing */
@@ -156,8 +156,8 @@ TokenData/time              utctime
 
        %(DEFAULT_BODY)s
 
-       if(check_col(pinfo->cinfo, COL_INFO))   
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", x509if_get_last_dn());
+       if(check_col(actx->pinfo->cinfo, COL_INFO))     
+               col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", x509if_get_last_dn());
 
 #.FN_PARS OCTET_STRING
        VAL_PTR=&out_tvb 
@@ -196,8 +196,8 @@ TokenData/time              utctime
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_SecurityProblem_vals, "SecurityProblem(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_SecurityProblem_vals, "SecurityProblem(%%d)"));
   }
 
 #.FN_PARS ServiceProblem
@@ -208,8 +208,8 @@ TokenData/time              utctime
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_ServiceProblem_vals, "ServiceProblem(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_ServiceProblem_vals, "ServiceProblem(%%d)"));
   }
 
 #.FN_PARS UpdateProblem
@@ -220,8 +220,8 @@ TokenData/time              utctime
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_UpdateProblem_vals, "UpdateProblem(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_UpdateProblem_vals, "UpdateProblem(%%d)"));
   }
 
 #.FN_PARS LimitProblem
@@ -232,8 +232,8 @@ TokenData/time              utctime
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_LimitProblem_vals, "LimitProblem(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_LimitProblem_vals, "LimitProblem(%%d)"));
   }
 
 #.FN_PARS T_subset
@@ -244,8 +244,8 @@ TokenData/time              utctime
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(subset, dap_T_subset_vals, "Subset(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(subset, dap_T_subset_vals, "Subset(%%d)"));
   }
 
 
@@ -254,9 +254,9 @@ TokenData/time              utctime
 
        %(DEFAULT_BODY)s
 
-       if(check_col(pinfo->cinfo, COL_INFO)) {
+       if(check_col(actx->pinfo->cinfo, COL_INFO)) {
                dn = x509if_get_last_dn();
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", (dn && *dn) ? dn : "(root)");
+               col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", (dn && *dn) ? dn : "(root)");
        }
 
 #.FN_BODY T_subordinates_item
index 4bc4a31d3b7baaf51ac46899a87b6636f97364a1..9ed91fff5164c136860c014c024f8c306c389b15 100644 (file)
@@ -32,6 +32,7 @@
 #include <epan/prefs.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -85,8 +86,11 @@ dissect_dap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        int old_offset;
        proto_item *item=NULL;
        proto_tree *tree=NULL;
-       int (*dap_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL;
+       int (*dap_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) = NULL;
        char *dap_op_name;
+       asn1_ctx_t asn1_ctx;
+
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
        /* do we have operation information from the ROS dissector?  */
        if( !pinfo->private_data ){
@@ -258,7 +262,7 @@ dissect_dap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
 
          while (tvb_reported_length_remaining(tvb, offset) > 0){
            old_offset=offset;
-           offset=(*dap_dissector)(FALSE, tvb, offset, pinfo , tree, -1);
+           offset=(*dap_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
            if(offset == old_offset){
              proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DAP PDU");
              offset = tvb_length(tvb);
index 058d99a911ec7e78dc5258a3d997cf315600ebdb..a135dc5820032a521aefcf6d76241ef8d64128cf 100644 (file)
@@ -40,8 +40,8 @@ ModificationParameter         B "dop.modify.roleb.2.5.19.1"   "shadow-modify-roleb"
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_T_standard_vals, "standard(%%d"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_T_standard_vals, "standard(%%d"));
   }
 
 #.FN_PARS RefreshInformation
@@ -52,8 +52,8 @@ ModificationParameter         B "dop.modify.roleb.2.5.19.1"   "shadow-modify-roleb"
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RefreshInformation_vals, "unknown(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RefreshInformation_vals, "unknown(%%d)"));
   }
 
 #.FN_PARS StandardUpdate
@@ -64,8 +64,8 @@ ModificationParameter         B "dop.modify.roleb.2.5.19.1"   "shadow-modify-roleb"
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_StandardUpdate_vals, "unknown(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_StandardUpdate_vals, "unknown(%%d)"));
   }
 
 #.FN_PARS CoordinateShadowUpdateResult
@@ -76,8 +76,8 @@ ModificationParameter         B "dop.modify.roleb.2.5.19.1"   "shadow-modify-roleb"
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_CoordinateShadowUpdateResult_vals, "unknown(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_CoordinateShadowUpdateResult_vals, "unknown(%%d)"));
   }
 
 #.FN_PARS RequestShadowUpdateResult
@@ -88,8 +88,8 @@ ModificationParameter         B "dop.modify.roleb.2.5.19.1"   "shadow-modify-roleb"
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RequestShadowUpdateResult_vals, "unknown(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RequestShadowUpdateResult_vals, "unknown(%%d)"));
   }
 
 #.FN_PARS UpdateShadowResult
@@ -100,8 +100,8 @@ ModificationParameter       B "dop.modify.roleb.2.5.19.1"   "shadow-modify-roleb"
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_UpdateShadowResult_vals, "unknown(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_UpdateShadowResult_vals, "unknown(%%d)"));
   }
 
 #.FN_PARS ShadowProblem
@@ -112,6 +112,6 @@ ModificationParameter       B "dop.modify.roleb.2.5.19.1"   "shadow-modify-roleb"
 
   %(DEFAULT_BODY)s
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-       col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, disp_ShadowProblem_vals, "ShadowProblem(%%d)"));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, disp_ShadowProblem_vals, "ShadowProblem(%%d)"));
   }
index 300bfba385a22c7c167740f13b1a105c6b751fba..97b7465c5d17d858e805a5557b916b9f3a5f2441 100644 (file)
@@ -32,6 +32,7 @@
 #include <epan/prefs.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -87,8 +88,11 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        int old_offset;
        proto_item *item=NULL;
        proto_tree *tree=NULL;
-       int (*disp_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL;
+       int (*disp_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) = NULL;
        char *disp_op_name;
+       asn1_ctx_t asn1_ctx;
+
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
        /* do we have operation information from the ROS dissector?  */
        if( !pinfo->private_data ){
@@ -184,7 +188,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
 
          while (tvb_reported_length_remaining(tvb, offset) > 0){
            old_offset=offset;
-           offset=(*disp_dissector)(FALSE, tvb, offset, pinfo , tree, -1);
+           offset=(*disp_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
            if(offset == old_offset){
              proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DISP PDU");
              offset = tvb_length(tvb);
index 19f10a0784a43fa82af656c538d953143654698b..0bb4dc7ebfc852d43d2dae5ab3728a3dd4a747fa 100644 (file)
@@ -95,74 +95,74 @@ ACIItem             B       "2.5.24.6" "id-aca-subentryACI"
 
   %(DEFAULT_BODY)s
 
-  if(check_col(pinfo->cinfo, COL_INFO)) {
+  if(check_col(actx->pinfo->cinfo, COL_INFO)) {
     name = get_oid_str_name(binding_type);
-    col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", name ? name : binding_type);
+    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", name ? name : binding_type);
   }
 
 #.FN_BODY      EstablishSymmetric
 
-  offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, pinfo, tree, "symmetric");
+  offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
 
 #.FN_BODY      EstablishRoleAInitiates
 
-  offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, pinfo, tree, "roleA");
+  offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
 
 #.FN_BODY      EstablishRoleBInitiates
 
-  offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, pinfo, tree, "roleB");
+  offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
 
 #.FN_BODY      ModifySymmetric
 
-  offset = call_dop_oid_callback("dop.modify.symmetric", tvb, offset, pinfo, tree, "symmetric");
+  offset = call_dop_oid_callback("dop.modify.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
 
 #.FN_BODY      ModifyRoleAInitiates
 
-  offset = call_dop_oid_callback("dop.modify.rolea", tvb, offset, pinfo, tree, "roleA");
+  offset = call_dop_oid_callback("dop.modify.rolea", tvb, offset, actx->pinfo, tree, "roleA");
 
 #.FN_BODY      ModifyRoleBInitiates
 
-  offset = call_dop_oid_callback("dop.modify.roleb", tvb, offset, pinfo, tree, "roleB");
+  offset = call_dop_oid_callback("dop.modify.roleb", tvb, offset, actx->pinfo, tree, "roleB");
 
 #.FN_BODY      TerminateSymmetric
 
-  offset = call_dop_oid_callback("dop.terminate.symmetric", tvb, offset, pinfo, tree, "symmetric");
+  offset = call_dop_oid_callback("dop.terminate.symmetric", tvb, offset, actx->pinfo, tree, "symmetric");
 
 #.FN_BODY      TerminateRoleAInitiates
 
-  offset = call_dop_oid_callback("dop.terminate.rolea", tvb, offset, pinfo, tree, "roleA");
+  offset = call_dop_oid_callback("dop.terminate.rolea", tvb, offset, actx->pinfo, tree, "roleA");
 
 #.FN_BODY      TerminateRoleBInitiates
 
-  offset = call_dop_oid_callback("dop.terminate.roleb", tvb, offset, pinfo, tree, "roleB");
+  offset = call_dop_oid_callback("dop.terminate.roleb", tvb, offset, actx->pinfo, tree, "roleB");
 
 #.FN_BODY      T_agreement
 
-  offset = call_dop_oid_callback("dop.agreement", tvb, offset, pinfo, tree, NULL);
+  offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
 
 #.FN_BODY      T_symmetric
 
-  offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, pinfo, tree, "symmetric"); 
+  offset = call_dop_oid_callback("dop.establish.symmetric", tvb, offset, actx->pinfo, tree, "symmetric"); 
 
 #.FN_BODY      T_roleA_replies
 
-  offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, pinfo, tree, "roleA");
+  offset = call_dop_oid_callback("dop.establish.rolea", tvb, offset, actx->pinfo, tree, "roleA");
 
 #.FN_BODY      T_roleB_replies
 
-  offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, pinfo, tree, "roleB");
+  offset = call_dop_oid_callback("dop.establish.roleb", tvb, offset, actx->pinfo, tree, "roleB");
 
 #.FN_BODY      T_agreementProposal
 
-  offset = call_dop_oid_callback("dop.agreement", tvb, offset, pinfo, tree, NULL);
+  offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
 
 #.FN_BODY      ResultNewAgreement
 
-  offset = call_dop_oid_callback("dop.agreement", tvb, offset, pinfo, tree, NULL);
+  offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
 
 #.FN_BODY      ArgumentNewAgreement
 
-  offset = call_dop_oid_callback("dop.agreement", tvb, offset, pinfo, tree, NULL);
+  offset = call_dop_oid_callback("dop.agreement", tvb, offset, actx->pinfo, tree, NULL);
 
 
 #.FN_PARS INTEGER
@@ -173,11 +173,11 @@ ACIItem           B       "2.5.24.6" "id-aca-subentryACI"
 
        %(DEFAULT_BODY)s
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
+       if (check_col(actx->pinfo->cinfo, COL_INFO)) {
                if(hf_index == hf_dop_identifier) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " id=%%d", value);
+                       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " id=%%d", value);
                } else if (hf_index == hf_dop_version) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ",%%d", value);
+                       col_append_fstr(actx->pinfo->cinfo, COL_INFO, ",%%d", value);
                }
        }
 
index 801ee49a39b1d0a2c4062ca19ef1f3b55248ad64..c6b56b5fd33cb35c7cc172e3c63b81f98b197c6b 100644 (file)
@@ -32,6 +32,7 @@
 #include <epan/prefs.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -99,8 +100,11 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        int old_offset;
        proto_item *item=NULL;
        proto_tree *tree=NULL;
-       int (*dop_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL;
+       int (*dop_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) = NULL;
        char *dop_op_name;
+       asn1_ctx_t asn1_ctx;
+
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
        /* do we have operation information from the ROS dissector?  */
        if( !pinfo->private_data ){
@@ -198,7 +202,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
 
          while (tvb_reported_length_remaining(tvb, offset) > 0){
            old_offset=offset;
-           offset=(*dop_dissector)(FALSE, tvb, offset, pinfo , tree, -1);
+           offset=(*dop_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
            if(offset == old_offset){
              proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DOP PDU");
              offset = tvb_length(tvb);
index fb449d735cd3227630af4fccf15a90454df9c583..56d2f358cb620812021bbb0e08337b4040d8c481 100644 (file)
@@ -32,6 +32,7 @@
 #include <epan/prefs.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -81,8 +82,11 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        int old_offset;
        proto_item *item=NULL;
        proto_tree *tree=NULL;
-       int (*dsp_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL;
+       int (*dsp_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) = NULL;
        char *dsp_op_name;
+       asn1_ctx_t asn1_ctx;
+
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
        /* do we have operation information from the ROS dissector?  */
        if( !pinfo->private_data ){
@@ -258,7 +262,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
 
          while (tvb_reported_length_remaining(tvb, offset) > 0){
            old_offset=offset;
-           offset=(*dsp_dissector)(FALSE, tvb, offset, pinfo , tree, -1);
+           offset=(*dsp_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
            if(offset == old_offset){
              proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DSP PDU");
              offset = tvb_length(tvb);
index 03e7ea579e262d58b9a743780fc29dbf3a167125..cea949b29e23f0a16fbeeb3b8d7363a28e78c5b1 100644 (file)
@@ -39,7 +39,7 @@ EnumeratedTag    B "2.16.840.1.101.2.1.8.3.4"   "id-enumeratedRestrictiveAttribu
   FN_VARIANT = _str  HF_INDEX = hf_ess_SecurityCategory_type_OID  VAL_PTR = &object_identifier_id
 
 #.FN_BODY SecurityCategory/value
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.END
 
index 4fe269da241581a1df4a6e90fa65138993f837d0..12a20057df991f2466c659e4dc73e5c04370aa01 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <glib.h>
 #include <epan/packet.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
index 37330bbd9f27f2221904fc8326710f7fd998344d..49b7d1c26ceb3da250d5b1eaafc065034566cfd1 100644 (file)
@@ -68,16 +68,16 @@ Legal-Qualification-Attribute/actual-values actual_values9
        FN_VARIANT = _str  VAL_PTR = &object_identifier_id
 
 #.FN_BODY Contents-Type-Attribute/document-type/parameter
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_BODY Extension-Attribute/extension-attribute
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_PARS Attribute-Extensions-Pattern/_item/extension-set-attribute-Patterns/_item/extension-attribute-identifier
        FN_VARIANT = _str  VAL_PTR = &object_identifier_id
 
 #.FN_BODY Attribute-Extensions-Pattern/_item/extension-set-attribute-Patterns/_item/extension-attribute-Pattern
-  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
 
 #.FN_BODY AP-title
        /* XXX have no idea about this one */
@@ -98,7 +98,7 @@ Legal-Qualification-Attribute/actual-values   actual_values9
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
   offset = dissect_ber_restricted_string(TRUE, 1,
-                                         pinfo, tree, tvb, offset, hf_index,
+                                         actx->pinfo, tree, tvb, offset, hf_index,
                                          NULL);
 
 #.FN_BODY Protocol-Version
@@ -114,7 +114,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_bitstring(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
                                  Protocol_Version_bits, hf_index, ett_ftam_Protocol_Version,
                                  NULL);
 
@@ -131,7 +131,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_bitstring(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
                                  Service_Class_bits, hf_index, ett_ftam_Service_Class,
                                  NULL);
 
@@ -148,7 +148,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_bitstring(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
                                  Functional_Units_bits, hf_index, ett_ftam_Functional_Units,
                                  NULL);
 
@@ -166,7 +166,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_bitstring(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
                                  Attribute_Groups_bits, hf_index, ett_ftam_Attribute_Groups,
                                  NULL);
 
@@ -184,7 +184,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 #.FN_BODY Contents-Type-List
@@ -200,7 +200,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence_of(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence_of(TRUE,  actx, tree, tvb, offset,
                                    Contents_Type_List_sequence_of, hf_index, ett_ftam_Contents_Type_List);
 
 
@@ -217,7 +217,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 #.FN_BODY Request-Type
@@ -233,7 +233,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 #.FN_BODY Abstract-Syntax-Name
@@ -249,7 +249,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_object_identifier(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_object_identifier(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                             NULL);
 
 
@@ -266,7 +266,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 Access_Context_sequence, hf_index, ett_ftam_Access_Context);
 
 #.FN_BODY Access-Passwords
@@ -282,7 +282,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 Access_Passwords_sequence, hf_index, ett_ftam_Access_Passwords);
 
 #.FN_BODY Access-Request
@@ -298,7 +298,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
       offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
       offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
   }
-  offset = dissect_ber_bitstring(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
                                  Access_Request_bits, hf_index, ett_ftam_Access_Request,
                                  NULL);
 #.FN_BODY Account
@@ -315,7 +315,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
   offset = dissect_ber_restricted_string(TRUE, 4,
-                                         pinfo, tree, tvb, offset, hf_index,
+                                         actx->pinfo, tree, tvb, offset, hf_index,
                                          NULL);
 #.FN_BODY Action-Result
  gint8 class;
@@ -330,7 +330,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 
@@ -347,7 +347,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 #.FN_BODY Change-Attributes
@@ -363,7 +363,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 Change_Attributes_sequence, hf_index, ett_ftam_Change_Attributes);
 
 
@@ -380,7 +380,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence_of(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence_of(TRUE,  actx, tree, tvb, offset,
                                    Charging_sequence_of, hf_index, ett_ftam_Charging);
 
 
@@ -397,7 +397,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 Concurrency_Control_sequence, hf_index, ett_ftam_Concurrency_Control);
 
 
@@ -414,7 +414,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_object_identifier(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_object_identifier(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                             NULL);
 
 #.FN_BODY Create-Attributes
@@ -430,7 +430,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 Create_Attributes_sequence, hf_index, ett_ftam_Create_Attributes);
 
 #.FN_BODY Diagnostic
@@ -446,7 +446,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence_of(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence_of(TRUE,  actx, tree, tvb, offset,
                                    Diagnostic_sequence_of, hf_index, ett_ftam_Diagnostic);
 
 
@@ -465,7 +465,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 #.FN_BODY Read-Attributes
@@ -481,7 +481,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 Read_Attributes_sequence, hf_index, ett_ftam_Read_Attributes);
 
 #.FN_BODY Select-Attributes
@@ -497,7 +497,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence(TRUE, actx, tree, tvb, offset,
                                 Select_Attributes_sequence, hf_index, ett_ftam_Select_Attributes);
 
 #.FN_BODY State-Result
@@ -513,7 +513,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 #.FN_BODY User-Identity
@@ -530,7 +530,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
   offset = dissect_ber_restricted_string(TRUE, 22,
-                                         pinfo, tree, tvb, offset, hf_index,
+                                         actx->pinfo, tree, tvb, offset, hf_index,
                                          NULL);
 #.FN_BODY Scope
  gint8 class;
@@ -545,7 +545,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence_of(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence_of(TRUE,  actx, tree, tvb, offset,
                                    Scope_sequence_of, hf_index, ett_ftam_Scope);
 
 #.FN_BODY Objects-Attributes-List
@@ -561,7 +561,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence_of(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence_of(TRUE,  actx, tree, tvb, offset,
                                    Objects_Attributes_List_sequence_of, hf_index, ett_ftam_Objects_Attributes_List);
 
 
@@ -578,7 +578,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_sequence_of(TRUE, pinfo, tree, tvb, offset,
+  offset = dissect_ber_sequence_of(TRUE,  actx, tree, tvb, offset,
                                    Path_Access_Passwords_sequence_of, hf_index, ett_ftam_Path_Access_Passwords);
 
 #.FN_BODY Request-Operation-Result
@@ -594,7 +594,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index,
+  offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
                                   NULL);
 
 #.FN_BODY Shared-ASE-Informatio
@@ -610,7 +610,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_acse_EXTERNALt(TRUE, tvb, offset, pinfo, tree, hf_index);
+  offset = dissect_acse_EXTERNALt(TRUE, tvb, offset, actx->pinfo, tree, hf_index);
 
 #.FN_BODY Attribute-Value-Assertions
  gint8 class;
@@ -625,7 +625,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ftam_OR_Set(TRUE, tvb, offset, pinfo, tree, hf_index);
+  offset = dissect_ftam_OR_Set(TRUE, tvb, offset, actx, tree, hf_index);
 
 #.FN_BODY Referent-Indicator
  gint8 class;
@@ -640,7 +640,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_boolean(TRUE, pinfo, tree, tvb, offset, hf_index);
+  offset = dissect_ber_boolean(TRUE, actx->pinfo, tree, tvb, offset, hf_index);
 
 #.FN_BODY Password
  gint8 class;
@@ -655,7 +655,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_choice(pinfo, tree, tvb, offset,
+  offset = dissect_ber_choice(actx, tree, tvb, offset,
                               Password_choice, hf_index, ett_ftam_Password, NULL);
 
 
@@ -672,7 +672,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_choice(pinfo, tree, tvb, offset,
+  offset = dissect_ber_choice(actx, tree, tvb, offset,
                               FADU_Identity_choice, hf_index, ett_ftam_FADU_Identity, NULL);
 
 #.FN_BODY Operation-Result
@@ -688,7 +688,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
  }
-  offset = dissect_ber_choice(pinfo, tree, tvb, offset,
+  offset = dissect_ber_choice(actx, tree, tvb, offset,
                               Operation_Result_choice, hf_index, ett_ftam_Operation_Result, NULL);
 #.FN_PARS FTAM-Regime-PDU
        VAL_PTR = &branch_taken
@@ -699,8 +699,8 @@ Legal-Qualification-Attribute/actual-values actual_values9
   %(DEFAULT_BODY)s
   
   if( (branch_taken!=-1) && ftam_FTAM_Regime_PDU_vals[branch_taken].strptr ){
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %%s:", ftam_FTAM_Regime_PDU_vals[branch_taken].strptr);
+       if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+               col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_FTAM_Regime_PDU_vals[branch_taken].strptr);
        }
   }
 
@@ -713,8 +713,8 @@ Legal-Qualification-Attribute/actual-values actual_values9
   %(DEFAULT_BODY)s
 
   if( (branch_taken!=-1) && ftam_File_PDU_vals[branch_taken].strptr ){
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %%s:", ftam_File_PDU_vals[branch_taken].strptr);
+       if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+               col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_File_PDU_vals[branch_taken].strptr);
        }
   }
 
@@ -727,8 +727,8 @@ Legal-Qualification-Attribute/actual-values actual_values9
   %(DEFAULT_BODY)s
 
   if( (branch_taken!=-1) && ftam_Bulk_Data_PDU_vals[branch_taken].strptr ){
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %%s:", ftam_Bulk_Data_PDU_vals[branch_taken].strptr);
+       if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+               col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_Bulk_Data_PDU_vals[branch_taken].strptr);
        }
   }
 
@@ -741,7 +741,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
   %(DEFAULT_BODY)s
 
   if( (branch_taken!=-1) && ftam_FSM_PDU_vals[branch_taken].strptr ){
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %%s:", ftam_FSM_PDU_vals[branch_taken].strptr);
+       if (check_col(actx->pinfo->cinfo, COL_INFO)) {
+               col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_FSM_PDU_vals[branch_taken].strptr);
        }
   }
index 5a5fe3228092b96a9744bb5028c14178bfd904e5..fe44af82dd861a0da6016aaf914d926a4c667421 100644 (file)
@@ -36,6 +36,7 @@
 #include <epan/packet.h>
 #include <epan/conversation.h>
 #include <epan/oid_resolv.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -53,7 +54,7 @@ int proto_ftam = -1;
 
 static const char *object_identifier_id;
 /* Declare the function to avoid a compiler warning */
-static int dissect_ftam_OR_Set(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_);
+static int dissect_ftam_OR_Set(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
 
 #include "packet-ftam-hf.c"
 
@@ -73,6 +74,9 @@ dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        int old_offset;
        proto_item *item=NULL;
        proto_tree *tree=NULL;
+       asn1_ctx_t asn1_ctx;
+
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
        if(parent_tree){
                item = proto_tree_add_item(parent_tree, proto_ftam, tvb, 0, -1, FALSE);
@@ -85,7 +89,7 @@ dissect_ftam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
 
        while (tvb_reported_length_remaining(tvb, offset) > 0){
                old_offset=offset;
-               offset=dissect_ftam_PDU(FALSE, tvb, offset, pinfo , tree, -1);
+               offset=dissect_ftam_PDU(FALSE, tvb, offset, &asn1_ctx, tree, -1);
                if(offset == old_offset){
                        proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte FTAM PDU");
                        offset = tvb_length(tvb);
index 68139d4ba433699d524ac4124ffca43ec8b0ce1f..1a83bbcdfbd528b07570ac532321cd494fbceb40 100644 (file)
@@ -30,6 +30,7 @@
 #include <glib.h>
 #include <epan/packet.h>
 #include <epan/conversation.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
index 96c231b3ea3daf3487d49c274090f2042495cc63..e60ddfdfd1b6e2e8baa51401d74a8e57db78b59d 100644 (file)
 #include <glib.h>
 #include <epan/packet.h>
 #include <epan/conversation.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
-#include "packet-cmip.h"
 #include "packet-ber.h"
+#include "packet-cmip.h"
 #include "packet-gnm.h"
 
 #define PNAME  "ITU M.3100 Generic Network Information Model"
@@ -61,8 +62,11 @@ static int hf_gnm_AdministrativeState = -1;
 static void
 dissect_gnm_attribute_ObjectInstance(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
 {
+       asn1_ctx_t asn1_ctx;
+
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
-       dissect_cmip_ObjectInstance(FALSE, tvb, 0, pinfo, parent_tree, -1);
+       dissect_cmip_ObjectInstance(FALSE, tvb, 0, &asn1_ctx, parent_tree, -1);
 
 }
 
index c8017b1ce067881c5ed8bcd06d2ea78bb02c94bc..dfac655e257744d66347dac2ba01e96f43b9cfb9 100644 (file)
@@ -21,7 +21,7 @@
  tvbuff_t      *parameter_tvb;
  char          *digit_str;
 
- offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index,
                                     &parameter_tvb);
  if (parameter_tvb) {
    digit_str = unpack_digits(parameter_tvb, 1);
@@ -36,7 +36,7 @@
  tvbuff_t      *parameter_tvb;
  char          *digit_str;
 
- offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index,
                                     &parameter_tvb);
  if (parameter_tvb) {
    digit_str = unpack_digits(parameter_tvb, 1);
index c4ee8a81ed05b30d754de2e599f4a73108666a6a..7b01e225a045075d3f6730007e026d476ed99c27 100644 (file)
@@ -42,6 +42,7 @@
 #include <epan/prefs.h>
 #include <epan/conversation.h>
 #include <epan/tap.h>
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -170,78 +171,78 @@ static int hf_gsm_ss_SS_Code = -1;
 
 
 int
-gsm_ss_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,guint32 opcode, gint comp_type_tag)
+gsm_ss_dissect(tvbuff_t *tvb, proto_tree *tree, int offset, asn1_ctx_t *actx, guint32 opcode, gint comp_type_tag)
 {
        switch (comp_type_tag){
                case 1: /* invoke */
                        switch (opcode){
                                case 10: /* Register SS -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_RegisterSS_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_RegisterSS_Arg(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 11: /* Erase SS -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 12: /* Activate SS -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 13: /*Deactivate SS -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 14: /*Interrogate SS -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 16: /*Notify SS */
-                                       offset = dissect_notifySS(pinfo, tree, tvb, offset, NULL /* actx */);
+                                       offset = dissect_notifySS(tree, tvb, offset, actx);
                                        break;
                                case 17: /*Register Password -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_SS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_Code(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 18: /*Get Password -- imports operations from MAP-SupplementaryServiceOperations*/
-                                        offset=dissect_gsm_map_GetPasswordArg(FALSE, tvb, offset, pinfo, tree, hf_gsm_ss_getPassword);
+                                        offset=dissect_gsm_map_GetPasswordArg(FALSE, tvb, offset, actx, tree, hf_gsm_ss_getPassword);
                                        break;
                                case 19: /*Process Unstructured SS Data */
-                                       offset = dissect_processUnstructuredSS_Data(pinfo, tree, tvb, offset, NULL /* axtx */);
+                                       offset = dissect_processUnstructuredSS_Data(tree, tvb, offset, NULL /* axtx */);
                                        break;
                                case 38: /*Forward Check SS Indication -- imports operation from MAP-MobileServiceOperations*/
                                        break;
                                case 59: /*Process Unstructured SS Request -- imports operations from MAP-SupplementaryServiceOperations*/
-                                        offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+                                        offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 60: /*Unstructured SS Request -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 61: /*Unstructured SS Notify -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 77: /*Erase CC Entry -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_EraseCC_EntryArg(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_EraseCC_EntryArg(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 112: /*lcs-AreaEventCancellation */
-                                       offset = dissect_lcs_AreaEventCancellation(pinfo, tree, tvb, offset,NULL /* axtx */);
+                                       offset = dissect_lcs_AreaEventCancellation(tree, tvb, offset,NULL /* axtx */);
                                        break;
                                case 113: /*lcs-AreaEventReport */
-                                       offset = dissect_lcs_AreaEventReport(pinfo, tree, tvb, offset,NULL /* axtx */);
+                                       offset = dissect_lcs_AreaEventReport(tree, tvb, offset,NULL /* axtx */);
                                        break;
                                case 114: /*LCS-AreaEventRequest */
-                                       offset = dissect_lcs_AreaEventRequest(pinfo, tree, tvb, offset,NULL /* axtx */);
+                                       offset = dissect_lcs_AreaEventRequest(tree, tvb, offset,NULL /* axtx */);
                                        break;
                                case 115: /*LCS MOLR */
-                                       offset = dissect_lcs_MOLR(pinfo, tree, tvb, offset,NULL /* axtx */);
+                                       offset = dissect_lcs_MOLR(tree, tvb, offset,NULL /* axtx */);
                                        break;
                                case 116: /*LCS Location Notification */
-                                       offset = dissect_lcs_LocationNotification(pinfo, tree, tvb,offset,NULL /* axtx */);
+                                       offset = dissect_lcs_LocationNotification(tree, tvb,offset,NULL /* axtx */);
                                        break;
                                case 117: /*Call Deflection */
-                                       offset = dissect_callDeflection(pinfo, tree, tvb,offset,NULL /* axtx */);
+                                       offset = dissect_callDeflection(tree, tvb,offset,NULL /* axtx */);
                                        break;
                                case 118: /*User User Service */
-                                       offset = dissect_gsm_ss_UserUserServiceArg(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset = dissect_gsm_ss_UserUserServiceArg(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 119: /* Access Register CC Entry */
-                                       offset = dissect_gsm_ss_AccessRegisterCCEntryArg(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset = dissect_gsm_ss_AccessRegisterCCEntryArg(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 120: /*Forward CUG Info */
-                                       offset = dissect_forwardCUG_Info(pinfo, tree, tvb,offset,NULL /* axtx */);
+                                       offset = dissect_forwardCUG_Info(tree, tvb,offset,NULL /* axtx */);
                                        break;
                                case 121: /*Split MPTY */
                                        break;
@@ -252,7 +253,7 @@ gsm_ss_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,g
                                case 124: /*Build MPTY */
                                        break;
                                case 125: /*Forward Charge Advice */
-                                       dissect_forwardChargeAdvice(pinfo, tree, tvb,offset,NULL /* axtx */);
+                                       dissect_forwardChargeAdvice(tree, tvb,offset,NULL /* axtx */);
                                        break;
                                case 126: /*Explicit CT */
                                        break;
@@ -263,44 +264,44 @@ gsm_ss_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,g
                case 2: /* returnResultLast */
                        switch (opcode){
                                case  10: /*registerSS*/
-                                   offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+                                   offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
                                    break;
                                case  11: /*eraseSS*/
-                                       offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 12: /*activateSS*/
-                                       offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 13: /*deactivateSS*/
-                                       offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 14: /*interrogateSS*/
-                                       offset=dissect_gsm_map_InterrogateSS_Res(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_InterrogateSS_Res(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 16: /*Notify SS */
                                        break;
                                case 17: /*Register Password -- imports operations from MAP-SupplementaryServiceOperations*/
-                                   offset=dissect_gsm_map_NewPassword(FALSE, tvb, offset, pinfo, tree, hf_gsm_ss_SS_Code);
+                                   offset=dissect_gsm_map_NewPassword(FALSE, tvb, offset, actx, tree, hf_gsm_ss_SS_Code);
                                        break;
                                case 18: /*Get Password -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_CurrentPassword(FALSE, tvb, offset, pinfo, tree, hf_gsm_ss_currentPassword);
+                                       offset=dissect_gsm_map_CurrentPassword(FALSE, tvb, offset, actx, tree, hf_gsm_ss_currentPassword);
                                        break;
                                case 19: /*Process Unstructured SS Data */
-                                       offset=dissect_gsm_ss_SS_UserData(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_ss_SS_UserData(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 38: /*Forward Check SS Indication -- imports operation from MAP-MobileServiceOperations*/
                                        break;
                                case 59: /*Process Unstructured SS Request -- imports operations from MAP-SupplementaryServiceOperations*/
-                                        offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, pinfo, tree, -1);
+                                        offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 60: /*Unstructured SS Request -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 61: /*Unstructured SS Notify -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 77: /*Erase CC Entry -- imports operations from MAP-SupplementaryServiceOperations*/
-                                       offset=dissect_gsm_map_EraseCC_EntryRes(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_map_EraseCC_EntryRes(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 112: /*lcs-AreaEventCancellation */
                                        break;
@@ -309,17 +310,17 @@ gsm_ss_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,g
                                case 114: /*LCS-AreaEventRequest */
                                        break;
                                case 115: /*LCS MOLR */
-                                       offset=dissect_gsm_ss_LCS_MOLRRes(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_ss_LCS_MOLRRes(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 116: /*LCS Location Notification */
-                                       offset=dissect_gsm_ss_LocationNotificationRes(FALSE, tvb, offset, pinfo, tree, -1);
+                                       offset=dissect_gsm_ss_LocationNotificationRes(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 117: /*Call Deflection */
                                        break;
                                case 118: /*User User Service */
                                        break;
                                case 119: /* Access Register CC Entry */
-                                   offset=dissect_gsm_map_RegisterCC_EntryRes(FALSE, tvb, offset, pinfo, tree, -1);
+                                   offset=dissect_gsm_map_RegisterCC_EntryRes(FALSE, tvb, offset, actx, tree, -1);
                                        break;
                                case 120: /*Forward CUG Info */
                                        break;
index d46bf8eedcfd4fa61524b0ed4224427e4f302d48..1071990958b27ebf6ce4830b640948c068e388f4 100644 (file)
@@ -33,7 +33,7 @@
 
 #ifndef PACKET_GSM_SS_H
 #define PACKET_GSM_SS_H
-int gsm_ss_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, guint32 opcode, gint comp_type_tag);
+int gsm_ss_dissect(tvbuff_t *tvb, proto_tree *tree, int offset, asn1_ctx_t *actx, guint32 opcode, gint comp_type_tag);
 
 extern const value_string gsm_ss_opr_code_strings[];
 extern const value_string gsm_ss_err_code_strings[];
index de30fea4dcf7bb05e051c1d489d61c5e459a5999..3ed8a05781b5f750ae97573e91f83c7037deaf60 100644 (file)
@@ -126,13 +126,13 @@ OPERATION/localValue operationLocalvalue
 Component 
 
 #.FN_BODY InvokeParameter
-       offset = dissect_invokeData(pinfo, tree, tvb, offset);
+       offset = dissect_invokeData(tree, tvb, offset, actx);
 
 #.FN_BODY ReturnResultParameter
-       offset = dissect_returnResultData(pinfo, tree, tvb, offset);
+       offset = dissect_returnResultData(tree, tvb, offset, actx);
 
 #.FN_BODY ReturnErrorParameter
-       offset = dissect_returnErrorData(pinfo, tree, tvb, offset);
+       offset = dissect_returnErrorData(tree, tvb, offset, actx);
 
 #.FN_PARS  GSMMAPOperationLocalvalue
 
@@ -141,8 +141,8 @@ Component
 #.FN_BODY  GSMMAPOperationLocalvalue
 
 %(DEFAULT_BODY)s 
-  if (check_col(pinfo->cinfo, COL_INFO)){
-    col_append_fstr(pinfo->cinfo, COL_INFO, gsm_map_opr_code(opcode));
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_append_fstr(actx->pinfo->cinfo, COL_INFO, gsm_map_opr_code(opcode));
   }
 
 #.FN_PARS  GSMMAPLocalErrorcode
@@ -165,7 +165,7 @@ Component
  if (!tpdu_tvb)
        return offset;
 
-    dissector_try_port(sms_dissector_table, 0, tpdu_tvb, pinfo, top_tree);
+    dissector_try_port(sms_dissector_table, 0, tpdu_tvb, actx->pinfo, top_tree);
 #.END
 #----------------------------------------------------------------------------------------
 #.FN_PARS  IMSI
@@ -211,7 +211,7 @@ Component
  digit_str = unpack_digits(parameter_tvb, 1);
 
  proto_tree_add_string(tree, hf_gsm_map_servicecentreaddress_digits, parameter_tvb, 1, -1, digit_str);
- pinfo->p2p_dir = P2P_DIR_SENT;
actx->pinfo->p2p_dir = P2P_DIR_SENT;
 
 #.END
 #----------------------------------------------------------------------------------------
@@ -251,7 +251,7 @@ Component
  if ((na == 1) && (np==1))/*International Number & E164*/
        dissect_e164_cc(parameter_tvb, subtree, 1, TRUE);
 
- pinfo->p2p_dir = P2P_DIR_RECV;
actx->pinfo->p2p_dir = P2P_DIR_RECV;
 
 
 #.END
@@ -387,7 +387,7 @@ Component
                length = tvb_get_guint8(parameter_tvb,1);
                if ( octet == 0) {/* DISCRIMINATION TS 48 006 */
                        next_tvb = tvb_new_subset(parameter_tvb, 2, -1, -1);
-                       dissect_bssmap(next_tvb, pinfo, tree);
+                       dissect_bssmap(next_tvb, actx->pinfo, tree);
                }
                break;
        /* ets-300102-1 (~Q.931 ) */
@@ -432,12 +432,12 @@ Component
                if ( octet == 0) {/* DISCRIMINATION TS 48 006 */
                        /* gsm-BSSMAP? */
                        next_tvb = tvb_new_subset(parameter_tvb, 2, -1, -1);
-                       dissect_bssmap(next_tvb, pinfo, tree);
+                       dissect_bssmap(next_tvb, actx->pinfo, tree);
                }
                break;
        /* ts3G-25413 */
        case 2:
-               call_dissector(ranap_handle, parameter_tvb, pinfo, tree); 
+               call_dissector(ranap_handle, parameter_tvb, actx->pinfo, tree); 
                break;
        default:
                break;
@@ -521,9 +521,9 @@ Component
        
   proto_tree_add_text(tree, tvb, offset, -1, "Extension Data");
   if (obj_id){
-        offset=call_ber_oid_callback(obj_id, tvb, offset, pinfo, tree);
+        offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree);
   }else{
-        call_dissector(data_handle, tvb, pinfo, tree);
+        call_dissector(data_handle, tvb, actx->pinfo, tree);
         offset = tvb_length_remaining(tvb,offset);
   }    
                
@@ -594,7 +594,7 @@ Component
 
        if (!parameter_tvb)
                return offset;
-       dissect_gsm_map_ext_qos_subscribed(tvb, pinfo, tree);
+       dissect_gsm_map_ext_qos_subscribed(tvb, actx->pinfo, tree);
 
 #.FN_PARS GSN-Address
                
@@ -688,7 +688,7 @@ Component
        if (!parameter_tvb) 
                 return offset;
 
-       asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
        dissect_ranap_Service_Handover(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_map_ranap_service_Handover);
 
 #.FN_BODY IntegrityProtectionInformation VAL_PTR = &parameter_tvb
@@ -700,7 +700,7 @@ Component
        if (!parameter_tvb) 
                 return offset;
 
-       asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
        dissect_ranap_IntegrityProtectionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_mapIntegrityProtectionInformation);
 
 #.FN_BODY EncryptionInformation VAL_PTR = &parameter_tvb
@@ -712,7 +712,7 @@ Component
        if (!parameter_tvb) 
                 return offset;
 
-       asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
        dissect_ranap_EncryptionInformation(parameter_tvb, 0, &asn1_ctx, tree, hf_gsm_mapEncryptionInformation);
 
 #----------------------------------------------------------------------------------------
index 71dbccea96ca86095354082242c63c0784b464bb..133b8ab6dc102b80527ddca2c75b3545a8da21f1 100644 (file)
@@ -126,7 +126,7 @@ static int hf_geo_loc_included_angle = -1;
 static int hf_gsm_map_ranap_service_Handover = -1;
 static int hf_gsm_mapIntegrityProtectionInformation = -1;
 static int hf_gsm_mapEncryptionInformation = -1;
-
+static int hf_gsm_map_PlmnContainer_PDU = -1;
 #include "packet-gsm_map-hf.c"
 
 /* Initialize the subtree pointers */
@@ -170,9 +170,9 @@ const char *obj_id = NULL;
 static int gsm_map_tap = -1;
 
 /* Forward declarations */
-static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
-static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
-static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
+static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
+static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
 const gchar* gsm_map_opr_code(guint32 val);
 
 /* Value strings */
@@ -786,7 +786,7 @@ const gchar* gsm_map_opr_code(guint32 val) {
 typedef int (* dissect_function_t)( gboolean,
                                    tvbuff_t *,
                                    int ,
-                                   packet_info *,
+                                       asn1_ctx_t *,
                                    proto_tree *,
                                    int);
 
@@ -810,7 +810,7 @@ typedef int (* dissect_function_t)( gboolean,
  */
 static int dissect_mc_message(tvbuff_t *tvb,
                              int offset,
-                             packet_info *pinfo _U_,
+                                 asn1_ctx_t *actx,
                              proto_tree *tree,
                              gboolean implicit_param _U_, dissect_function_t parameter, int hf_index_param _U_,
                              gboolean implicit_seq   _U_, dissect_function_t sequence,  int hf_index_seq   _U_,
@@ -831,133 +831,133 @@ static int dissect_mc_message(tvbuff_t *tvb,
     offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
     offset = get_ber_length(tree, tvb, offset, &bug_len, &bug_ind_field);
     if (sequence3 != NULL) {
-      offset= (sequence3) (implicit_seq3, tvb, offset, pinfo, tree, hf_index_seq3);
+      offset= (sequence3) (implicit_seq3, tvb, offset, actx, tree, hf_index_seq3);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented [3] sequence, cannot decode");
       proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented [3] sequence");
+      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented [3] sequence");
     }
   } else if (octet == 0x30) {
     if (sequence != NULL) {
-      offset= (sequence) (implicit_seq, tvb, offset, pinfo, tree, hf_index_seq);
+      offset= (sequence) (implicit_seq, tvb, offset, actx, tree, hf_index_seq);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented sequence");
       proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented sequence");
+      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented sequence");
     }
   } else {
     if (parameter != NULL) {
-      offset= (parameter) (implicit_param, tvb, offset, pinfo, tree, hf_index_param);
+      offset= (parameter) (implicit_param, tvb, offset, actx, tree, hf_index_param);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented parameter");
       proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented parameter");
+      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented parameter");
     }
   }
   return offset;
 }
 
-static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
  
   proto_item *cause;
 
   switch(opcode){
   case  2: /*updateLocation*/  
-    offset=dissect_gsm_map_UpdateLocationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_UpdateLocationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  3: /*cancelLocation*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_Identity, hf_gsm_map_identity,
                              FALSE, dissect_gsm_map_CancelLocationArgV2, -1,/*undefined*/
                              TRUE , dissect_gsm_map_CancelLocationArg, -1);
     break;
   case  4: /*provideRoamingNumber*/
-    offset=dissect_gsm_map_ProvideRoamingNumberArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideRoamingNumberArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  5: /*noteSubscriberDataModified*/
-    offset=dissect_gsm_map_NoteSubscriberDataModifiedArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_NoteSubscriberDataModifiedArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  6: /*resumeCallHandling*/
-    offset=dissect_gsm_map_ResumeCallHandlingArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ResumeCallHandlingArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  7: /*insertSubscriberData*/
-    offset=dissect_gsm_map_InsertSubscriberDataArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_InsertSubscriberDataArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  8: /*deleteSubscriberData*/
-    offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, actx, tree, -1);
     break;
     /* TODO find out why this isn't in the ASN1 file */
     /* reserved sendParameters (9) */
   case  10: /*registerSS*/
-    offset=dissect_gsm_map_RegisterSS_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RegisterSS_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  11: /*eraseSS*/
-    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 12: /*activateSS*/
-    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 13: /*deactivateSS*/
-    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 14: /*interrogateSS*/
-    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_ForBS_Code(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 15: /*authenticationFailureReport*/
-    offset=dissect_gsm_map_AuthenticationFailureReportArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AuthenticationFailureReportArg(FALSE, tvb, offset, actx, tree, -1);
     break;
     /* undefined 16 */
   case 17: /*registerPassword*/
-    offset=dissect_gsm_map_SS_Code(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_ss_Code);
+    offset=dissect_gsm_map_SS_Code(FALSE, tvb, offset, actx, tree, hf_gsm_map_ss_Code);
     break;
   case 18: /*getPassword*/
-    offset=dissect_gsm_map_GetPasswordArg(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_getPassword);
+    offset=dissect_gsm_map_GetPasswordArg(FALSE, tvb, offset, actx, tree, hf_gsm_map_getPassword);
     break;
     /* reserved processUnstructuredSS-Data (19) */
   case 20: /*releaseResources*/
-    offset=dissect_gsm_map_ReleaseResourcesArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ReleaseResourcesArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 21: /*mt-ForwardSM-VGCS*/
-    offset=dissect_gsm_map_Mt_ForwardSM_VGCS_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Mt_ForwardSM_VGCS_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 22: /*sendRoutingInfo*/
-    offset=dissect_gsm_map_SendRoutingInfoArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SendRoutingInfoArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 23: /*updateGprsLocation*/
-    offset=dissect_gsm_map_UpdateGprsLocationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_UpdateGprsLocationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 24: /*sendRoutingInfoForGprs*/
-    offset=dissect_gsm_map_SendRoutingInfoForGprsArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SendRoutingInfoForGprsArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 25: /*failureReport*/
-    offset=dissect_gsm_map_FailureReportArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_FailureReportArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 26: /*noteMsPresentForGprs*/
-    offset=dissect_gsm_map_NoteMsPresentForGprsArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_NoteMsPresentForGprsArg(FALSE, tvb, offset, actx, tree, -1);
     break;
     /* undefined 27 */
     /* reserved performHandover (28) */
   case 29: /*sendEndSignal*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, dissect_gsm_map_Bss_APDU, -1,
                              TRUE , dissect_gsm_map_SendEndSignalArgV3, -1);
     break;
     /* reserved performSubsequentHandover (30) */
   case 31: /*provideSIWFSNumber*/
-    offset=dissect_gsm_map_ProvideSIWFSNumberArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideSIWFSNumberArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 32: /*sIWFSSignallingModify*/
-    offset=dissect_gsm_map_SIWFSSignallingModifyArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SIWFSSignallingModifyArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 33: /*processAccessSignalling*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, dissect_gsm_map_Bss_APDU, -1,
                              TRUE , dissect_gsm_map_ProcessAccessSignallingArgV3, -1);
     break;
   case 34: /*forwardAccessSignalling*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, dissect_gsm_map_Bss_APDU, -1,
                              TRUE , dissect_gsm_map_ForwardAccessSignallingArgV3, -1);
@@ -965,580 +965,580 @@ static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tv
     /* reserved noteInternalHandover (35) */
     /* undefined 36 */
   case 37: /*reset*/
-    offset=dissect_gsm_map_ResetArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ResetArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 38: /*forwardCheckSS-Indication*/
     return offset;
     break;
   case 39: /*prepareGroupCall*/
-    offset=dissect_gsm_map_PrepareGroupCallArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_PrepareGroupCallArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 40: /*sendGroupCallEndSignal*/
-    dissect_gsm_map_SendGroupCallEndSignalArg(FALSE, tvb, offset, pinfo, tree, -1);
+    dissect_gsm_map_SendGroupCallEndSignalArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 41: /*processGroupCallSignalling*/
-    dissect_gsm_map_ProcessGroupCallSignallingArg(FALSE, tvb, offset, pinfo, tree, -1);
+    dissect_gsm_map_ProcessGroupCallSignallingArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 42: /*forwardGroupCallSignalling*/
-    offset=dissect_gsm_map_ForwardGroupCallSignallingArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ForwardGroupCallSignallingArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 43: /*checkIMEI*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_IMEI, hf_gsm_map_imei,
                              FALSE, dissect_gsm_map_CheckIMEIArgV3, -1,
                              TRUE , NULL, -1); /* no [3] SEQUENCE */
     break;
   case 44: /*mt-forwardSM(v3) or ForwardSM(v1/v2)*/
     if (application_context_version == 3)
-      offset=dissect_gsm_map_Mt_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+      offset=dissect_gsm_map_Mt_forwardSM_Arg(FALSE, tvb, offset, actx, tree, -1);
     else {
-      offset=dissect_gsm_map_ForwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+      offset=dissect_gsm_map_ForwardSM_Arg(FALSE, tvb, offset, actx, tree, -1);
     }
     break;
   case 45: /*sendRoutingInfoForSM*/
-    offset=dissect_gsm_map_RoutingInfoForSMArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RoutingInfoForSMArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 46: /*mo-forwardSM(v3) or ForwardSM(v1/v2)*/
     if (application_context_version == 3)
-      offset=dissect_gsm_map_Mo_forwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+      offset=dissect_gsm_map_Mo_forwardSM_Arg(FALSE, tvb, offset, actx, tree, -1);
     else {
-      offset=dissect_gsm_map_ForwardSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+      offset=dissect_gsm_map_ForwardSM_Arg(FALSE, tvb, offset, actx, tree, -1);
     }
     break;
   case 47: /*reportSM-DeliveryStatus*/
-    offset=dissect_gsm_map_ReportSM_DeliveryStatusArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ReportSM_DeliveryStatusArg(FALSE, tvb, offset, actx, tree, -1);
     break;
     /* reserved noteSubscriberPresent (48) */
     /* reserved alertServiceCentreWithoutResult (49) */
   case 50: /*activateTraceMode*/
-    offset=dissect_gsm_map_ActivateTraceModeArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ActivateTraceModeArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 51: /*deactivateTraceMode*/
-    offset=dissect_gsm_map_DeactivateTraceModeArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_DeactivateTraceModeArg(FALSE, tvb, offset, actx, tree, -1);
     break;
     /* reserved traceSubscriberActivity (52) */
     /* undefined 53 */
     /* reserved beginSubscriberActivity (54) */
   case 55: /*sendIdentification*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_TMSI, hf_gsm_map_tmsi,
                              FALSE, dissect_gsm_map_SendIdentificationArg, -1,
                              TRUE,  NULL, -1);
     break;
   case 56: /*sendAuthenticationInfo*/ 
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_IMSI, hf_gsm_map_imsi,
                              FALSE, dissect_gsm_map_SendAuthenticationInfoArgV2, -1,
                              TRUE,  NULL, -1);
     break;
   case 57: /*restoreData*/
-    offset=dissect_gsm_map_RestoreDataArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RestoreDataArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 58: /*sendIMSI*/
-    offset = dissect_gsm_map_ISDN_AddressString(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_msisdn);
+    offset = dissect_gsm_map_ISDN_AddressString(FALSE, tvb, offset, actx, tree, hf_gsm_map_msisdn);
     break;
   case 59: /*processUnstructuredSS-Request*/
-    offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 60: /*unstructuredSS-Request*/
-    offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 61: /*unstructuredSS-Notify*/
-    offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Ussd_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 62: /*AnyTimeSubscriptionInterrogation*/
-    offset=dissect_gsm_map_AnyTimeSubscriptionInterrogationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AnyTimeSubscriptionInterrogationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 63: /*informServiceCentre*/
-    offset=dissect_gsm_map_InformServiceCentreArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_InformServiceCentreArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 64: /*alertServiceCentre*/
-    offset=dissect_gsm_map_AlertServiceCentreArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AlertServiceCentreArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 65: /*AnyTimeModification*/
-    offset=dissect_gsm_map_AnyTimeModificationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AnyTimeModificationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 66: /*readyForSM*/
-    offset=dissect_gsm_map_ReadyForSM_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ReadyForSM_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 67: /*purgeMS*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_IMSI, hf_gsm_map_imsi,
                              FALSE, dissect_gsm_map_PurgeMSArgV2, -1, /*undefined*/
                              TRUE , dissect_gsm_map_PurgeMSArg, -1);
     break;
   case 68: /*prepareHandover*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, dissect_gsm_map_PrepareHO_Arg, -1,
                              TRUE, dissect_gsm_map_PrepareHO_ArgV3, -1);
     break;
   case 69: /*prepareSubsequentHandover*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, NULL, -1,
                              TRUE, dissect_gsm_map_PrepareSubsequentHOArg, -1);
     break;
   case 70: /*provideSubscriberInfo*/
-    offset=dissect_gsm_map_ProvideSubscriberInfoArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideSubscriberInfoArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 71: /*anyTimeInterrogation*/
-    offset=dissect_gsm_map_AnyTimeInterrogationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AnyTimeInterrogationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 72: /*ss-InvocationNotificatio*/
-    offset=dissect_gsm_map_Ss_InvocationNotificationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Ss_InvocationNotificationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 73: /*setReportingState*/
-    offset=dissect_gsm_map_SetReportingStateArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SetReportingStateArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 74: /*statusReport*/
-    offset=dissect_gsm_map_StatusReportArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_StatusReportArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 75: /*remoteUserFree*/
-    offset=dissect_gsm_map_RemoteUserFreeArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RemoteUserFreeArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 76: /*registerCC-Entry*/
-    offset=dissect_gsm_map_RegisterCC_EntryArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RegisterCC_EntryArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 77: /*eraseCC-Entry*/
-    offset=dissect_gsm_map_EraseCC_EntryArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_EraseCC_EntryArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 78: /*secureTransportClass1*/
   case 79: /*secureTransportClass1*/
   case 80: /*secureTransportClass1*/
   case 81: /*secureTransportClass1*/
-    offset=dissect_gsm_map_SecureTransportArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SecureTransportArg(FALSE, tvb, offset, actx, tree, -1);
     break;
     /* undefined 82 */
   case 83: /*provideSubscriberLocation*/
-    offset=dissect_gsm_map_ProvideSubscriberLocation_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideSubscriberLocation_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 84: /*sendGroupCallInfo*/
-    offset=dissect_gsm_map_SendGroupCallInfoArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SendGroupCallInfoArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 85: /*sendRoutingInfoForLCS*/
-    offset=dissect_gsm_map_RoutingInfoForLCS_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RoutingInfoForLCS_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 86: /*subscriberLocationReport*/
-    offset=dissect_gsm_map_SubscriberLocationReport_Arg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SubscriberLocationReport_Arg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 87: /*ist-Alert*/
-    offset=dissect_gsm_map_IST_AlertArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_IST_AlertArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 88: /*ist-Command*/
-    offset=dissect_gsm_map_IST_CommandArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_IST_CommandArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 89: /*noteMM-Event*/
-    offset=dissect_gsm_map_NoteMM_EventArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_NoteMM_EventArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
   }
   return offset;
 }
 
 
-static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
 
   proto_item *cause;
        
   switch(opcode){
   case  2: /*updateLocation*/ 
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_IMSI, hf_gsm_map_imsi,
                              FALSE, dissect_gsm_map_UpdateLocationRes, -1,
                              TRUE , NULL, -1);
     break;
   case  3: /*cancelLocation*/
-    offset=dissect_gsm_map_CancelLocationRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_CancelLocationRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  4: /*provideRoamingNumber*/
-    offset=dissect_gsm_map_ProvideRoamingNumberRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideRoamingNumberRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  5: /*noteSubscriberDataModified*/
-    offset=dissect_gsm_map_NoteSubscriberDataModifiedRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_NoteSubscriberDataModifiedRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  6: /*resumeCallHandling*/
-    offset=dissect_gsm_map_ResumeCallHandlingRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ResumeCallHandlingRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  7: /*insertSubscriberData*/
-    offset=dissect_gsm_map_InsertSubscriberDataRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_InsertSubscriberDataRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  8: /*deleteSubscriberData*/
-    offset=dissect_gsm_map_DeleteSubscriberDataRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_DeleteSubscriberDataRes(FALSE, tvb, offset, actx, tree, -1);
     break;
        /* TODO find out why this isn't in the ASN1 file
   case  9: sendParameters
-    offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_DeleteSubscriberDataArg(FALSE, tvb, offset, actx, tree, -1);
     break;
        */
   case  10: /*registerSS*/
-    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
     break;
   case  11: /*eraseSS*/
-    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 12: /*activateSS*/
-    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 13: /*deactivateSS*/
-    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SS_Info(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 14: /*interrogateSS*/
-    offset=dissect_gsm_map_InterrogateSS_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_InterrogateSS_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 15: /*authenticationFailureReport*/
-    offset=dissect_gsm_map_AuthenticationFailureReportRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AuthenticationFailureReportRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 17: /*registerPassword*/
     /* change hf_gsm_map_ss_Code to something with password */
-    offset=dissect_gsm_map_NewPassword(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_ss_Code);
+    offset=dissect_gsm_map_NewPassword(FALSE, tvb, offset, actx, tree, hf_gsm_map_ss_Code);
     break;
   case 18: /*getPassword*/
-    offset=dissect_gsm_map_CurrentPassword(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_currentPassword);
+    offset=dissect_gsm_map_CurrentPassword(FALSE, tvb, offset, actx, tree, hf_gsm_map_currentPassword);
     break;
   case 20: /*releaseResources*/
-    offset=dissect_gsm_map_ReleaseResourcesRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ReleaseResourcesRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 21: /*mt-ForwardSM-VGCS*/
-    offset=dissect_gsm_map_Mt_ForwardSM_VGCS_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Mt_ForwardSM_VGCS_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 22: /*sendRoutingInfo*/ 
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_IMSI, hf_gsm_map_imsi,
                              FALSE, NULL, -1,
                              TRUE , dissect_gsm_map_SendRoutingInfoRes, -1);
     break;
   case 23: /*updateGprsLocation*/
-    offset=dissect_gsm_map_UpdateGprsLocationRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_UpdateGprsLocationRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 24: /*sendRoutingInfoForGprs*/
-    offset=dissect_gsm_map_SendRoutingInfoForGprsRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SendRoutingInfoForGprsRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 25: /*failureReport*/
-    offset=dissect_gsm_map_FailureReportRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_FailureReportRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 26: /*noteMsPresentForGprs*/
-    offset=dissect_gsm_map_NoteMsPresentForGprsRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_NoteMsPresentForGprsRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 29: /*sendEndSignal*/
          /* Taken from MAP-MobileServiceOperations{ 0 identified-organization (4) etsi (0) mobileDomain 
           * (0) gsm-Network (1) modules (3) map-MobileServiceOperations (5) version9 (9) }
           */
-    offset=dissect_gsm_map_SendEndSignalRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SendEndSignalRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 31: /*provideSIWFSNumber*/
-    offset=dissect_gsm_map_ProvideSIWFSNumberRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideSIWFSNumberRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 32: /*provideSIWFSSignallingModify*/
-    offset=dissect_gsm_map_SIWFSSignallingModifyRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SIWFSSignallingModifyRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 39: /*prepareGroupCall*/
-    offset=dissect_gsm_map_PrepareGroupCallRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_PrepareGroupCallRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 40: /*sendGroupCallEndSignal*/
-    dissect_gsm_map_SendGroupCallEndSignalRes(FALSE, tvb, offset, pinfo, tree, -1);
+    dissect_gsm_map_SendGroupCallEndSignalRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 43: /*checkIMEI*/ 
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_EquipmentStatus, hf_gsm_map_equipmentStatus,
                              FALSE, dissect_gsm_map_CheckIMEIRes, -1,
                              TRUE,  NULL, -1);
     break;
   case 44: /*mt-forwardSM*/
-    offset=dissect_gsm_map_Mt_forwardSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Mt_forwardSM_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 45: /*sendRoutingInfoForSM*/
-    offset=dissect_gsm_map_RoutingInfoForSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RoutingInfoForSM_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 46: /*mo-forwardSM*/
-    offset=dissect_gsm_map_Mo_forwardSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Mo_forwardSM_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 47: /*reportSM-DeliveryStatus*/
-    offset=dissect_gsm_map_ReportSM_DeliveryStatusRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ReportSM_DeliveryStatusRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 48: /*reportSM-DeliveryStatus*/
-    offset=dissect_gsm_map_ReportSM_DeliveryStatusRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ReportSM_DeliveryStatusRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 50: /*activateTraceMode*/
-    offset=dissect_gsm_map_ActivateTraceModeRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ActivateTraceModeRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 51: /*deactivateTraceMode*/
-    offset=dissect_gsm_map_DeactivateTraceModeRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_DeactivateTraceModeRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 55: /*sendIdentification */
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, dissect_gsm_map_IMSI, hf_gsm_map_imsi,
                              FALSE, dissect_gsm_map_SendIdentificationResV2, -1,/*undefined*/
                              TRUE,  dissect_gsm_map_SendIdentificationRes, -1);
     break;
   case 56: /*sendAuthenticationInfo*/ 
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, dissect_gsm_map_SendAuthenticationInfoRes, -1,
                              TRUE , dissect_gsm_map_SendAuthenticationInfoResV3, -1);
     break;
   case 57: /*restoreData*/
-    offset=dissect_gsm_map_RestoreDataRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RestoreDataRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 58: /*sendIMSI*/
-    offset=dissect_gsm_map_IMSI(FALSE, tvb, offset, pinfo, tree, hf_gsm_map_imsi);
+    offset=dissect_gsm_map_IMSI(FALSE, tvb, offset, actx, tree, hf_gsm_map_imsi);
     break;
   case 59: /*unstructuredSS-Request*/
-    offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 60: /*unstructuredSS-Request*/
-    offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Ussd_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 61: /*unstructuredSS-Notify*/
     /* TRUE ? */
     proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
     break;
   case 62: /*AnyTimeSubscriptionInterrogation*/
-    offset=dissect_gsm_map_AnyTimeSubscriptionInterrogationRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AnyTimeSubscriptionInterrogationRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 64: /*alertServiceCentre*/
     /* TRUE */
     break;
   case 65: /*AnyTimeModification*/
-    offset=dissect_gsm_map_AnyTimeModificationRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AnyTimeModificationRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 66: /*readyForSM*/
-    offset=dissect_gsm_map_ReadyForSM_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ReadyForSM_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 67: /*purgeMS*/
-    offset=dissect_gsm_map_PurgeMSRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_PurgeMSRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 68: /*prepareHandover*/ 
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, dissect_gsm_map_PrepareHO_Res, -1,
                              TRUE , dissect_gsm_map_PrepareHO_ResV3, -1);
     break;
   case 69: /*prepareSubsequentHandover*/
-    offset=dissect_mc_message(tvb, offset, pinfo, tree,    
+    offset=dissect_mc_message(tvb, offset, actx, tree,    
                              FALSE, NULL, -1,
                              FALSE, NULL, -1,
                              TRUE , dissect_gsm_map_PrepareSubsequentHOResV3, -1);
     break;
   case 70: /*provideSubscriberInfo*/
-    offset=dissect_gsm_map_ProvideSubscriberInfoRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideSubscriberInfoRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 71: /*anyTimeInterrogation*/
-    offset=dissect_gsm_map_AnyTimeInterrogationRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_AnyTimeInterrogationRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 72: /*ss-InvocationNotificatio*/
-    offset=dissect_gsm_map_Ss_InvocationNotificationRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_Ss_InvocationNotificationRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 73: /*setReportingState*/
-    offset=dissect_gsm_map_SetReportingStateRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SetReportingStateRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 74: /*statusReport*/
-    offset=dissect_gsm_map_StatusReportRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_StatusReportRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 75: /*remoteUserFree*/
-    offset=dissect_gsm_map_RemoteUserFreeRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RemoteUserFreeRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 76: /*registerCC-Entry*/
-    offset=dissect_gsm_map_RegisterCC_EntryRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RegisterCC_EntryRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 77: /*eraseCC-Entry*/
-    offset=dissect_gsm_map_EraseCC_EntryRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_EraseCC_EntryRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 78: /*secureTransportClass1*/
   case 79: /*secureTransportClass2*/
   case 80: /*secureTransportClass3*/
   case 81: /*secureTransportClass4*/
-    offset=dissect_gsm_map_SecureTransportRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SecureTransportRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 83: /*provideSubscriberLocation*/
-    offset=dissect_gsm_map_ProvideSubscriberLocation_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_ProvideSubscriberLocation_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 84: /*sendGroupCallInfo*/
-    offset=dissect_gsm_map_SendGroupCallInfoRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SendGroupCallInfoRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 85: /*sendRoutingInfoForLCS*/
-    offset=dissect_gsm_map_RoutingInfoForLCS_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_RoutingInfoForLCS_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 86: /*subscriberLocationReport*/
-    offset=dissect_gsm_map_SubscriberLocationReport_Res(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_SubscriberLocationReport_Res(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 87: /*ist-Alert*/
-    offset=dissect_gsm_map_IST_AlertRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_IST_AlertRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 88: /*ist-Command*/
-    offset=dissect_gsm_map_IST_CommandRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_IST_CommandRes(FALSE, tvb, offset, actx, tree, -1);
     break;
   case 89: /*noteMM-Event*/
-    offset=dissect_gsm_map_NoteMM_EventRes(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_gsm_map_NoteMM_EventRes(FALSE, tvb, offset, actx, tree, -1);
     break;
  default:
    cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
    proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-   expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+   expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
   }
   return offset;
 }
 
 
 
-static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
+static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) {
   proto_item *cause;
        
   switch(errorCode){
   case 1: /* UnknownSubscriberParam */
-         offset=dissect_gsm_map_UnknownSubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_UnknownSubscriberParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 4: /* SecureTransportErrorParam */
-         offset=dissect_gsm_map_SecureTransportErrorParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SecureTransportErrorParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 5: /* UnidentifiedSubParam */
-         offset=dissect_gsm_map_UnidentifiedSubParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_UnidentifiedSubParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 6: /* AbsentSubscriberSM-Param */
-         offset=dissect_gsm_map_AbsentSubscriberSM_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_AbsentSubscriberSM_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 8: /* RoamingNotAllowedParam */
-         offset=dissect_gsm_map_RoamingNotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_RoamingNotAllowedParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 9: /* IllegalSubscriberParam */
-         offset=dissect_gsm_map_IllegalSubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_IllegalSubscriberParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 10: /* BearerServNotProvParam */
-         offset=dissect_gsm_map_BearerServNotProvParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_BearerServNotProvParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 11: /* TeleservNotProvParam */
-         offset=dissect_gsm_map_TeleservNotProvParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_TeleservNotProvParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 12: /* IllegalEquipmentParam */
-         offset=dissect_gsm_map_IllegalEquipmentParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_IllegalEquipmentParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 13: /* CallBarredParam */
-         offset=dissect_gsm_map_CallBarredParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_CallBarredParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 14: /* ForwardingViolationParam */
-         offset=dissect_gsm_map_ForwardingViolationParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_ForwardingViolationParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 15: /* CUG-RejectParam */
-         offset=dissect_gsm_map_CUG_RejectParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_CUG_RejectParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 16: /* IllegalSS-OperationParam */
-         offset=dissect_gsm_map_IllegalSS_OperationParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_IllegalSS_OperationParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 17: /* SS-ErrorStatus */
-         offset=dissect_gsm_map_SS_Status(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SS_Status(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 18: /* SS-NotAvailableParam */
-         offset=dissect_gsm_map_SS_NotAvailableParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SS_NotAvailableParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 19: /* SS-SubscriptionViolationParam */
-         offset=dissect_gsm_map_SS_SubscriptionViolationParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SS_SubscriptionViolationParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 20: /* SS-IncompatibilityCause */
-         offset=dissect_gsm_map_SS_IncompatibilityCause(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SS_IncompatibilityCause(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 21: /* FacilityNotSupParam */
-         offset=dissect_gsm_map_FacilityNotSupParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_FacilityNotSupParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 22: /* OngoingGroupCallParam */
-          offset=dissect_gsm_map_OngoingGroupCallParam(FALSE, tvb, offset, pinfo, tree, -1);
+          offset=dissect_gsm_map_OngoingGroupCallParam(FALSE, tvb, offset, actx, tree, -1);
           break;
   case 27: /* AbsentSubscriberParam */
-         offset=dissect_gsm_map_AbsentSubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_AbsentSubscriberParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 28: /* IncompatibleTerminalParam */
-         offset=dissect_gsm_map_IncompatibleTerminalParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_IncompatibleTerminalParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 29: /* ShortTermDenialParam */
-         offset=dissect_gsm_map_ShortTermDenialParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_ShortTermDenialParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 30: /* LongTermDenialParam */
-         offset=dissect_gsm_map_LongTermDenialParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_LongTermDenialParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 31: /* SubBusyForMT-SMS-Param */
-         offset=dissect_gsm_map_SubBusyForMT_SMS_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SubBusyForMT_SMS_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 32: /* SM-DeliveryFailureCause */
-         offset=dissect_gsm_map_SM_DeliveryFailureCause(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SM_DeliveryFailureCause(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 33: /* MessageWaitListFullParam */
-         offset=dissect_gsm_map_MessageWaitListFullParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_MessageWaitListFullParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 34: /* SystemFailureParam */
-         offset=dissect_gsm_map_SystemFailureParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_SystemFailureParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 35: /* DataMissingParam */
-         offset=dissect_gsm_map_DataMissingParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_DataMissingParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 36: /* UnexpectedDataParam */
-         offset=dissect_gsm_map_UnexpectedDataParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_UnexpectedDataParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 37: /* PW-RegistrationFailureCause */
-         offset=dissect_gsm_map_PW_RegistrationFailureCause(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_PW_RegistrationFailureCause(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 39: /* NoRoamingNbParam */
-         offset=dissect_gsm_map_NoRoamingNbParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_NoRoamingNbParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 40: /* TracingBufferFullParam */
-         offset=dissect_gsm_map_TracingBufferFullParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_TracingBufferFullParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 42: /* TargetCellOutsideGCA-Param */
-         offset=dissect_gsm_map_TargetCellOutsideGCA_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_TargetCellOutsideGCA_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 44: /* NumberChangedParam */
-         offset=dissect_gsm_map_NumberChangedParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_NumberChangedParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 45: /* BusySubscriberParam */
-         offset=dissect_gsm_map_BusySubscriberParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_BusySubscriberParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 46: /* NoSubscriberReplyParam */
-         offset=dissect_gsm_map_NoSubscriberReplyParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_NoSubscriberReplyParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 47: /* ForwardingFailedParam */
-         offset=dissect_gsm_map_ForwardingFailedParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_ForwardingFailedParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 48: /* OR-NotAllowedParam */
-         offset=dissect_gsm_map_Or_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_Or_NotAllowedParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 49: /* ATI-NotAllowedParam */
-         offset=dissect_gsm_map_ATI_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_ATI_NotAllowedParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 50: /* NoGroupCallNbParam */
-         offset=dissect_gsm_map_NoGroupCallNbParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_NoGroupCallNbParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 51: /* ResourceLimitationParam */
-         offset=dissect_gsm_map_ResourceLimitationParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_ResourceLimitationParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 52: /* UnauthorizedRequestingNetwork-Param */
-         offset=dissect_gsm_map_UnauthorizedRequestingNetwork_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_UnauthorizedRequestingNetwork_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 53: /* UnauthorizedLCSClient-Param */
-         offset=dissect_gsm_map_UnauthorizedLCSClient_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_UnauthorizedLCSClient_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 54: /* PositionMethodFailure-Param */
-         offset=dissect_gsm_map_PositionMethodFailure_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_PositionMethodFailure_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 58: /* UnknownOrUnreachableLCSClient-Param */
-         offset=dissect_gsm_map_UnknownOrUnreachableLCSClient_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_UnknownOrUnreachableLCSClient_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 59: /* MM-EventNotSupported-Param */
-         offset=dissect_gsm_map_MM_EventNotSupported_Param(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_MM_EventNotSupported_Param(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 60: /* ATSI-NotAllowedParam */
-         offset=dissect_gsm_map_ATSI_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_ATSI_NotAllowedParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 61: /* ATM-NotAllowedParam */
-         offset=dissect_gsm_map_ATM_NotAllowedParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_ATM_NotAllowedParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   case 62: /* InformationNotAvailableParam */
-         offset=dissect_gsm_map_InformationNotAvailableParam(FALSE, tvb, offset, pinfo, tree, -1);
+         offset=dissect_gsm_map_InformationNotAvailableParam(FALSE, tvb, offset, actx, tree, -1);
          break;
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
+    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
     break;
   }
   return offset;
@@ -1548,13 +1548,14 @@ static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_
 static void dissect_gsm_mapext_PlmnContainer(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
   proto_item    *item=NULL;
   proto_tree    *tree=NULL;
-  
+  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_map_PlmnContainer);
   }
-  dissect_gsm_map_PlmnContainer(FALSE, tvb, 0, pinfo, tree, -1);
+  dissect_gsm_map_PlmnContainer(FALSE, tvb, 0, &asn1_ctx, tree, hf_gsm_map_PlmnContainer_PDU);
 }
 
 
@@ -1562,15 +1563,15 @@ static guint8 gsmmap_pdu_type = 0;
 static guint8 gsm_map_pdu_size = 0;
 
 static int
-dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tree *tree, int hf_index _U_) {
+dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) {
 
   char *version_ptr;
   struct tcap_private_t * p_private_tcap;
 
   opcode = 0;
   application_context_version = 0;
-  if (pinfo->private_data != NULL){
-    p_private_tcap=pinfo->private_data;
+  if (actx->pinfo->private_data != NULL){
+    p_private_tcap=actx->pinfo->private_data;
     if (p_private_tcap->acv==TRUE ){
       version_ptr = strrchr(p_private_tcap->oid,'.');
       if (version_ptr)
@@ -1582,11 +1583,11 @@ dissect_gsm_map_GSMMAPPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
   /* Get the length and add 2 */
   gsm_map_pdu_size = tvb_get_guint8(tvb, offset+1)+2;
 
-  if (check_col(pinfo->cinfo, COL_INFO)){
-    col_set_str(pinfo->cinfo, COL_INFO, val_to_str(gsmmap_pdu_type, gsm_map_Component_vals, "Unknown GSM-MAP PDU (%u)"));
-       col_append_fstr(pinfo->cinfo, COL_INFO, " ");
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_set_str(actx->pinfo->cinfo, COL_INFO, val_to_str(gsmmap_pdu_type, gsm_map_Component_vals, "Unknown GSM-MAP PDU (%u)"));
+       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
   }
-  offset = dissect_gsm_map_Component(FALSE, tvb, 0, pinfo, tree, hf_gsm_map_Component_PDU);
+  offset = dissect_gsm_map_Component(FALSE, tvb, 0, actx, tree, hf_gsm_map_Component_PDU);
   return offset;
 /*
   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
@@ -1604,6 +1605,9 @@ dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
     /* Used for gsm_map TAP */
     static             gsm_map_tap_rec_t tap_rec;
     gint               op_idx;
+       asn1_ctx_t asn1_ctx;
+
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
 
 
     if (check_col(pinfo->cinfo, COL_PROTOCOL))
@@ -1619,7 +1623,7 @@ dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
         tree = proto_item_add_subtree(item, ett_gsm_map);
     }
 
-    dissect_gsm_map_GSMMAPPDU(FALSE, tvb, 0, pinfo, tree, -1);
+    dissect_gsm_map_GSMMAPPDU(FALSE, tvb, 0, &asn1_ctx, tree, -1);
     match_strval_idx(opcode, gsm_map_opr_code_strings, &op_idx);
 
     tap_rec.invoke = FALSE;
@@ -2274,6 +2278,10 @@ void proto_register_gsm_map(void) {
       { "EncryptionInformation", "gsm_map.ranap.EncryptionInformation",
         FT_NONE, BASE_NONE, NULL, 0,
         "gsm_map.ranap.EncryptionInformation", HFILL }},
+    { &hf_gsm_map_PlmnContainer_PDU,
+      { "PlmnContainer", "gsm_map.PlmnContainer",
+        FT_NONE, BASE_NONE, NULL, 0,
+        "gsm_map.PlmnContainer", HFILL }},
 
 #include "packet-gsm_map-hfarr.c"
   };
index f7eed44fa7a30fac8573c6b2a763a6f238bfe624..cab4f9c20cbe2929a7159c9c48bd386c6baf95cc 100644 (file)
@@ -77,12 +77,12 @@ IndAudStatisticsDescriptor/statName         iAStatName
 
 
 #.FN_HDR Message
-    curr_info.msg = gcp_msg(pinfo,TVB_RAW_OFFSET(tvb),keep_persistent_data);
+    curr_info.msg = gcp_msg(actx->pinfo,TVB_RAW_OFFSET(tvb),keep_persistent_data);
 #.END
 
 #.FN_FTR Message
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_set_str(pinfo->cinfo, COL_INFO, gcp_msg_to_str(curr_info.msg,keep_persistent_data));
+    if (check_col(actx->pinfo->cinfo, COL_INFO))
+        col_set_str(actx->pinfo->cinfo, COL_INFO, gcp_msg_to_str(curr_info.msg,keep_persistent_data));
         
     if (keep_persistent_data)
         gcp_analyze_msg(h248_tree, h248_tvb, curr_info.msg, &h248_arrel);
@@ -90,14 +90,14 @@ IndAudStatisticsDescriptor/statName         iAStatName
 
 #.FN_BODY TransactionRequest/transactionId
     guint32 trx_id = 0;
-       offset = dissect_h248_trx_id(implicit_tag, pinfo, tree, tvb, offset, &trx_id);
+       offset = dissect_h248_trx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &trx_id);
     curr_info.trx = gcp_trx(curr_info.msg, trx_id, GCP_TRX_REQUEST, keep_persistent_data);
     error_code = 0;
 #.END
 
 #.FN_BODY ActionRequest/contextId
     guint32 ctx_id = 0;
-       offset = dissect_h248_ctx_id(implicit_tag, pinfo, tree, tvb, offset, &ctx_id);
+       offset = dissect_h248_ctx_id(implicit_tag, actx->pinfo, tree, tvb, offset, &ctx_id);
     curr_info.ctx = gcp_ctx(curr_info.msg,curr_info.trx,ctx_id,keep_persistent_data);
     curr_info.cmd = NULL;
     curr_info.term = NULL;
@@ -234,8 +234,8 @@ IndAudStatisticsDescriptor/statName         iAStatName
 #.END
 
 #.FN_BODY ErrorDescriptor/errorCode
-    offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_h248_error_code, &error_code);
-    expert_add_info_format(pinfo, get_ber_last_created_item(), PI_RESPONSE_CODE, PI_WARN, "Errored Command");
+    offset = dissect_ber_integer(implicit_tag, actx->pinfo, tree, tvb, offset, hf_h248_error_code, &error_code);
+    expert_add_info_format(actx->pinfo, get_ber_last_created_item(), PI_RESPONSE_CODE, PI_WARN, "Errored Command");
     
     if (curr_info.cmd) {
         gcp_cmd_set_error(curr_info.cmd,error_code);
@@ -253,7 +253,7 @@ IndAudStatisticsDescriptor/statName         iAStatName
 
 #.FN_BODY WildcardField
     tvbuff_t* new_tvb;
-    offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb);
+    offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
     tree = proto_item_add_subtree(get_ber_last_created_item(),ett_wildcard);
     proto_tree_add_item(tree,hf_h248_term_wild_type,new_tvb,0,1,FALSE);
     proto_tree_add_item(tree,hf_h248_term_wild_level,new_tvb,0,1,FALSE);
@@ -265,7 +265,7 @@ IndAudStatisticsDescriptor/statName         iAStatName
 
 #.FN_BODY TerminationID/id
        tvbuff_t* new_tvb;
-       offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb);
+       offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
        
        if (new_tvb) {
                curr_info.term->len = tvb_length(new_tvb);
@@ -279,7 +279,7 @@ IndAudStatisticsDescriptor/statName         iAStatName
                curr_info.term = gcp_cmd_add_term(curr_info.msg, curr_info.trx, curr_info.cmd, curr_info.term, wild_term, keep_persistent_data);
 
                if (h248_term_handle) {
-                       call_dissector(h248_term_handle, new_tvb, pinfo, tree);
+                       call_dissector(h248_term_handle, new_tvb, actx->pinfo, tree);
                }
        } else {
                curr_info.term->len = 0;
@@ -297,7 +297,7 @@ IndAudStatisticsDescriptor/statName         iAStatName
  if (!parameter_tvb)
        return offset;
 
- dissect_h248_ServiceChangeReasonStr(FALSE, parameter_tvb, 0, pinfo, tree, hf_h248_serviceChangeReasonStr);
+ dissect_h248_ServiceChangeReasonStr(FALSE, parameter_tvb, 0, actx, tree, hf_h248_serviceChangeReasonStr);
 
 #.TYPE_ATTR
 IP4Address/address  TYPE = FT_IPv4  DISPLAY = BASE_NONE  STRINGS = NULL
index 077ace6568e2ba31bda28007379a39a580ebfcc6..8b2f3ae4f5f555d3457c92d3ac6c74bc7048a690 100644 (file)
@@ -107,7 +107,7 @@ static dissector_handle_t h248_term_handle;
 static dissector_handle_t h248_tpkt_handle;
 
 /* Forward declarations */
-static int dissect_h248_ServiceChangeReasonStr(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index);
+static int dissect_h248_ServiceChangeReasonStr(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index);
 
 static const value_string package_name_vals[] = {
   {   0x0000, "Media stream properties H.248.1 Annex C" },
@@ -705,7 +705,7 @@ void h248_register_package(const h248_package_t* pkg) {
 
 static guint32 packageandid;
 
-static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
+static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
   tvbuff_t *new_tvb = NULL;
   proto_tree *package_tree=NULL;
   guint16 name_major, name_minor;
@@ -714,7 +714,7 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse
   guint i;
 
   old_offset=offset;
-  offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb);
+  offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
 
   if (new_tvb) {
     /* this field is always 4 bytes  so just read it into two integers */
@@ -763,7 +763,7 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse
   return offset;
 }
 
-static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
+static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
   tvbuff_t *new_tvb;
   proto_tree *package_tree=NULL;
   guint16 name_major, name_minor;
@@ -773,7 +773,7 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs
   guint i;
 
   old_offset=offset;
-  offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb);
+  offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
 
   if (new_tvb) {
     /* this field is always 4 bytes  so just read it into two integers */
@@ -840,7 +840,7 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs
 
 
 
-static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int offset, packet_info *pinfo , proto_tree *tree, int hf_index) {
+static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int offset,  asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
   tvbuff_t *new_tvb;
   proto_tree *package_tree=NULL;
   guint16 name_major, name_minor;
@@ -850,7 +850,7 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of
   guint i;
 
   old_offset=offset;
-  offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb);
+  offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
 
   if (new_tvb) {
     /* this field is always 4 bytes so just read it into two integers */
@@ -914,7 +914,7 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of
   return offset;
 }
 
-static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index _U_) {
+static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) {
 
        gint8 class;
        gboolean pc, ind;
@@ -928,8 +928,8 @@ static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int
        const h248_pkg_param_t* prop;
 
        old_offset=offset;
-       offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
-       offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
+       offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+       offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
        end_offset=offset+len;
 
        if( (class!=BER_CLASS_UNI)
@@ -957,21 +957,21 @@ static int dissect_h248_PropertyID(gboolean implicit_tag _U_, tvbuff_t *tvb, int
 
        if (prop && prop->hfid ) {
                if (!prop->dissector) prop = &no_param;
-               prop->dissector(tree, next_tvb, pinfo, *(prop->hfid), &curr_info, prop->data);
+               prop->dissector(tree, next_tvb, actx->pinfo, *(prop->hfid), &curr_info, prop->data);
        }
 
        return end_offset;
 }
 
 
-static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) {
        tvbuff_t *next_tvb;
        guint32 param_id = 0xffffffff;
        const h248_pkg_param_t* sigpar;
        const gchar* strval;
        proto_item* pi;
        
-       offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset,  hf_index, &next_tvb);
+       offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset,  hf_index, &next_tvb);
        pi = get_ber_last_created_item();
        
        switch(tvb_length(next_tvb)) {
@@ -1004,7 +1004,7 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv
        return offset;
 }
 
-static int dissect_h248_SigParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+static int dissect_h248_SigParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) {
        tvbuff_t *next_tvb;
        int old_offset, end_offset;
        gint8 class;
@@ -1013,8 +1013,8 @@ static int dissect_h248_SigParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb,
        guint32 len;
 
        old_offset=offset;
-       offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
-       offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
+       offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+       offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
        end_offset=offset+len;
 
        if( (class!=BER_CLASS_UNI)
@@ -1027,20 +1027,20 @@ static int dissect_h248_SigParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb,
        next_tvb = tvb_new_subset(tvb,offset,len,len);
 
        if ( curr_info.par && curr_info.par->dissector) {
-               curr_info.par->dissector(tree, next_tvb, pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
+               curr_info.par->dissector(tree, next_tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
        }
 
        return end_offset;
 }
 
-static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) {
        tvbuff_t *next_tvb;
        guint32 param_id = 0xffffffff;
        const h248_pkg_param_t* evtpar;
        const gchar* strval;
        proto_item* pi;
 
-       offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &next_tvb);
+       offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &next_tvb);
        pi = get_ber_last_created_item();
 
        if (next_tvb) {
@@ -1079,7 +1079,7 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *
        return offset;
 }
 
-static int dissect_h248_EventParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
+static int dissect_h248_EventParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_) {
        tvbuff_t *next_tvb;
        int old_offset, end_offset;
        gint8 class;
@@ -1088,8 +1088,8 @@ static int dissect_h248_EventParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb
        guint32 len;
 
        old_offset=offset;
-       offset=dissect_ber_identifier(pinfo, tree, tvb, offset, &class, &pc, &tag);
-       offset=dissect_ber_length(pinfo, tree, tvb, offset, &len, &ind);
+       offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &class, &pc, &tag);
+       offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, &ind);
        end_offset=offset+len;
 
        if( (class!=BER_CLASS_UNI)
@@ -1102,20 +1102,20 @@ static int dissect_h248_EventParamValue(gboolean implicit_tag _U_, tvbuff_t *tvb
        next_tvb = tvb_new_subset(tvb,offset,len,len);
 
        if ( curr_info.par && curr_info.par->dissector) {
-               curr_info.par->dissector(tree, next_tvb, pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
+               curr_info.par->dissector(tree, next_tvb, actx->pinfo, *(curr_info.par->hfid), &curr_info, curr_info.par->data);
        }
 
        return end_offset;
 }
 
-static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index) {
+static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int offset,  asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index) {
   tvbuff_t *new_tvb;
   proto_tree *mtp_tree=NULL;
   guint32 val;
   int i, len, old_offset;
 
   old_offset=offset;
-  offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb);
+  offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
 
   if (new_tvb) {
     /* this field is either 2 or 4 bytes  so just read it into an integer */
@@ -1137,7 +1137,7 @@ static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int off
   return offset;
 }
 
-#define H248_TAP() do { if (keep_persistent_data && curr_info.cmd) tap_queue_packet(h248_tap, pinfo, curr_info.cmd); } while(0)
+#define H248_TAP() do { if (keep_persistent_data && curr_info.cmd) tap_queue_packet(h248_tap, actx->pinfo, curr_info.cmd); } while(0)
 
 #include "packet-h248-fn.c"
 
@@ -1149,10 +1149,12 @@ static void
 dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
     proto_item *h248_item;
-
+       asn1_ctx_t asn1_ctx;
     h248_tree = NULL;
     h248_tvb = NULL;
 
+       asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+
     curr_info.msg = NULL;
     curr_info.trx = NULL;
     curr_info.ctx = NULL;
@@ -1190,7 +1192,7 @@ dissect_h248(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         h248_tree = proto_item_add_subtree(h248_item, ett_h248);
     }
 
-    dissect_h248_MegacoMessage(FALSE, tvb, 0, pinfo, h248_tree, -1);
+    dissect_h248_MegacoMessage(FALSE, tvb, 0, &asn1_ctx, h248_tree, -1);
 
 }
 
index dd92e6533859bcdc649aaf73a6c8dc5829092a60..a44d4268542db049f04f68bd531dcea629ac3c7b 100644 (file)
@@ -2,6 +2,108 @@ IN-CS-1-Operations-appendix { ccitt recommendation q 1218 modules(0) cs-1-operat
 --  This module contains additional type definitions for IN CS-1 operations.
 DEFINITIONS IMPLICIT TAGS ::=
 BEGIN
+
+-- IMPORTED ROS stuff for Wireshark use
+-- ROS def's
+-- Module Remote-Operations-Apdus (H.450.1:02/1998)
+--Remote-Operations-Apdus {itu-t recommendation h 450 1 version1(0)
+--  remote-operations-apdus(11)} DEFINITIONS AUTOMATIC TAGS ::=
+--BEGIN
+
+Component ::=  CHOICE {
+                               invoke                          [1] IMPLICIT Invoke,
+                               returnResultLast        [2] IMPLICIT ReturnResult,
+                               returnError                     [3] IMPLICIT ReturnError,
+                               reject                          [4] IMPLICIT Reject,
+-- TCAP adds returnResultNotLast to allow for the segmentation of a result.
+                               returnResultNotLast     [7] IMPLICIT ReturnResult
+}
+Invoke ::=             SEQUENCE {
+                               invokeID                        InvokeIdType,
+                               linkedID                        [0] IMPLICIT InvokeIdType OPTIONAL,
+                               opCode                          OPERATION,
+                               invokeparameter         InvokeParameter OPTIONAL
+}
+
+InvokeParameter ::= ANY
+
+-- ANY is filled by the single ASN.1 data type following the keyword PARAMETER or the keyword ARGUMENT
+-- in the type definition of a particular operation.
+
+ReturnResult ::=       SEQUENCE {
+                               invokeID                                InvokeIdType,
+                               resultretres                    SEQUENCE {
+                               opCode                                  OPERATION,
+                               returnparameter                         ReturnResultParameter OPTIONAL
+                               } OPTIONAL
+                       }
+
+ReturnResultParameter ::= ANY
+
+-- ANY is filled by the single ASN.1 data type following the keyword RESULT in the type definition
+-- of a particular operation.
+
+ReturnError ::=        SEQUENCE {
+                               invokeID                                InvokeIdType,
+                               errorCode                               ERROR,
+                               parameter                               ReturnErrorParameter  OPTIONAL }
+
+ReturnErrorParameter ::= ANY
+-- ANY is filled by the single ASN.1 data type following the keyword PARAMETER in the type definition
+-- of a particular error.
+
+Reject ::=             SEQUENCE {
+                               invokeIDRej CHOICE {
+                                       derivable                       InvokeIdType,
+                                       not-derivable           NULL },
+                               problem CHOICE {
+                                       generalProblem          [0] IMPLICIT GeneralProblem,
+                                       invokeProblem           [1] IMPLICIT InvokeProblem,
+                                       returnResultProblem     [2] IMPLICIT ReturnResultProblem,
+                                       returnErrorProblem      [3] IMPLICIT ReturnErrorProblem } }
+
+InvokeIdType ::=       INTEGER (-128..127)
+
+
+OPERATION      ::=     CHOICE {
+                                                       localValue OperationLocalvalue,
+                                                       globalValue OBJECT IDENTIFIER } 
+
+LocalErrorcode ::= INAPLocalErrorcode
+OperationLocalvalue ::= INAPOperationLocalvalue
+INAPLocalErrorcode ::= INTEGER
+INAPOperationLocalvalue ::= INTEGER
+ERROR  ::=     CHOICE {
+                       localValue LocalErrorcode,
+                       globalValue OBJECT IDENTIFIER } 
+
+-- PROBLEMS
+
+GeneralProblem         ::=     INTEGER {               unrecognizedComponent (0),
+                                                               mistypedComponent (1),
+                                                               badlyStructuredComponent (2) }
+
+InvokeProblem          ::=     INTEGER {               duplicateInvokeID (0),
+                                                               unrecognizedOperation (1),
+                                                               mistypedParameter (2),
+                                                               resourceLimitation (3),
+                                                               initiatingRelease (4),
+                                                               unrecognizedLinkedID (5),
+                                                               linkedResponseUnexpected (6),
+                                                               unexpectedLinkedOperation (7) }
+
+ReturnResultProblem    ::=     INTEGER {               unrecognizedInvokeID (0),
+                                                               returnResultUnexpected (1),
+                                                               mistypedParameter (2) }
+
+ReturnErrorProblem     ::=     INTEGER {               unrecognizedInvokeID (0),
+                                                               returnErrorUnexpected (1),
+                                                               unrecognizedError (2),
+                                                               unexpectedError (3),
+                                                               mistypedParameter (4) }
+
 --  TYPE DEFINITION FOR ADDITIONAL     IN CS-1 OPERATIONS
 --  SCF-SSF operations
 --  SCF ? SSF
@@ -1469,44 +1571,5 @@ TaskRefused ::=  ENUMERATED {
 --unknownResource ERROR
 -- ::= localValue 18
 
--- additional pdus for reject
-
-InvokeIDType ::= INTEGER
-
-RejectPDU ::= SEQUENCE {
-               rinvokeID CHOICE {
-                               invidtype InvokeIDType, 
-                               null NULL},
-               rproblem CHOICE {
-                               gp [0] IMPLICIT GeneralProblem,
-                               ip [1] IMPLICIT InvokeProblem,
-                               rrp [2] IMPLICIT ReturnResultProblem,
-                               rep [3] IMPLICIT ReturnErrorProblem}}
-
-GeneralProblem ::= INTEGER { -- ROSE-provider detected
-               unrecognisedAPDU(0),
-               mistypedAPDU(1),
-               badlyStructuredAPDU(2)}
-InvokeProblem ::= INTEGER { -- ROSE-user detected
-               duplicateInvocation(0),
-               unrecognisedOperation(1),
-               mistypedArgument(2),
-               resourceLimitation(3),
-               initiatorReleasing(4),
-               unrecognisedLinkedID(5),
-               linkedResponseUnexpected(6),
-               unexpectedChildOperation(7)}
-ReturnResultProblem ::= INTEGER { -- ROSE-user detected
-               unrecognisedInvocation(0),
-               resultResponseUnexpected(1),
-               mistypedResult(2)}
-ReturnErrorProblem ::= INTEGER { -- ROSE-user detected
-               unrecognisedInvocation(0),
-               errorResponseUnexpected(1),
-               unrecognisedError(2),
-               unexpectedError(3),
-               mistypedParameter(4)}
-
-
 
 END
\ No newline at end of file
index 9ab9e66777e5d49e8dd1cab22e1752b0cda00ab4..8051edbc63c9709294fbce8c5a2fc2ba8049c1ac 100644 (file)
@@ -9,7 +9,7 @@
 
 
 #.PDU
-
+Component
 
 #.NO_EMIT
 
@@ -69,6 +69,29 @@ CancelArg
 RequestCurrentStatusReportResultArg
 ReceivedInformationArg
 
+#.FN_BODY InvokeParameter
+       offset = dissect_invokeData(tree, tvb, offset, actx);
+
+#.FN_BODY ReturnResultParameter
+       offset = dissect_returnResultData(tree, tvb, offset, actx);
+
+#.FN_BODY ReturnErrorParameter
+       offset = dissect_returnErrorData(tree, tvb, offset, actx);
+
+#.FN_BODY INAPLocalErrorcode VAL_PTR = &errorCode
+  offset = dissect_ber_integer(FALSE, actx->pinfo, tree, tvb, offset, hf_index, &errorCode);
+
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_set_str(actx->pinfo->cinfo, COL_INFO, val_to_str(errorCode, inap_error_code_strings, "Unknown Inap (%u)"));
+  }
+
+#.FN_BODY INAPOperationLocalvalue
+  offset = dissect_ber_integer(FALSE, actx->pinfo, tree, tvb, offset, hf_index, &opcode);
+
+  if (check_col(actx->pinfo->cinfo, COL_INFO)){
+    col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str(opcode, inap_opr_code_strings, "Unknown Inap (%u)"));
+  }
+
 #.FN_PARS CalledPartyNumber
 VAL_PTR = &parameter_tvb
 
index 88fa2766c82cfe3a26dbee69731201d36a7a7815..4ecee8e813ff516795d36018933f9954443b0a9b 100644 (file)
@@ -33,6 +33,8 @@
 #include <epan/packet.h>
 #include <epan/prefs.h>
 #include <epan/conversation.h>
+#include "epan/expert.h"
+#include <epan/asn1.h>
 
 #include <stdio.h>
 #include <string.h>
 
 /* Initialize the protocol and registered fields */
 int proto_inap = -1;
-static int hf_inap_invokeCmd = -1;             /* Opcode */
-static int hf_inap_invokeid = -1;              /* INTEGER */
-static int hf_inap_linkedid = -1;              /* INTEGER */
-static int hf_inap_absent = -1;                /* NULL */
-static int hf_inap_invokeId = -1;              /* InvokeId */
-static int hf_inap_invoke = -1;                /* InvokePDU */
-static int hf_inap_ReturnError = -1;           /* InvokePDU */
-static int hf_inap_returnResult = -1;          /* InvokePDU */
-static int hf_inap_returnResult_result = -1;
-static int hf_inap_getPassword = -1;  
-static int hf_inap_currentPassword = -1;  
-static int hf_inap_genproblem = -1;
+
 #include "packet-inap-hf.c"
 
 #define MAX_SSN 254
@@ -70,22 +61,15 @@ static range_t *ssn_range;
 
 static dissector_handle_t      inap_handle;
 
+/* Global variables */
+static guint32 opcode=0;
+static guint32 errorCode;
+
 /* Initialize the subtree pointers */
 static gint ett_inap = -1;
-static gint ett_inap_InvokeId = -1;
-static gint ett_inap_InvokePDU = -1;
-static gint ett_inap_ReturnErrorPDU = -1;
-static gint ett_inap_ReturnResultPDU = -1;
-static gint ett_inap_ReturnResult_result = -1;
-static gint ett_inap_INAPPDU = -1;
 static gint ett_inapisup_parameter = -1;
 #include "packet-inap-ett.c"
 
-static int  dissect_invokeCmd(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
-
-#include "packet-inap-fn.c"
-
-
 const value_string inap_opr_code_strings[] = {
 
        {0,"InitialDP"},
@@ -173,34 +157,12 @@ const value_string inap_general_problem_strings[] = {
 {0, NULL}
 };
 
+/* Forvard declarations */
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
+static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
+static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx);
 
-
-static guint32 opcode=0;
-
-static int
-dissect_inap_Opcode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-  offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_index, &opcode);
-
-  if (check_col(pinfo->cinfo, COL_INFO)){
-    col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(opcode, inap_opr_code_strings, "Unknown Inap (%u)"));
-  }
-
-  return offset;
-}
-
-
-
-static int
-dissect_inap_errorCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-  offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_index, &opcode);
-
-  if (check_col(pinfo->cinfo, COL_INFO)){
-    col_set_str(pinfo->cinfo, COL_INFO, val_to_str(opcode, inap_error_code_strings, "Unknown Inap (%u)"));
-  }
-
-  return offset;
-}
-
+#include "packet-inap-fn.c"
 /*
 TC-Invokable OPERATION ::=
   {activateServiceFiltering | activityTest | analysedInformation |
@@ -221,156 +183,156 @@ TC-Invokable OPERATION ::=
    promptAndCollectUserInformation}
 */
 
-static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
+static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
   switch(opcode){
   case 0: /*InitialDP*/
-    offset=dissect_inap_InitialDP(FALSE, tvb, offset, pinfo, tree, hf_inap_InitialDP_PDU);
+    offset=dissect_inap_InitialDP(FALSE, tvb, offset, actx, tree, hf_inap_InitialDP_PDU);
     break;
   case 1: /*1 OriginationAttemptAuthorized */
-    offset=dissect_inap_OriginationAttemptAuthorizedArg(FALSE, tvb, offset, pinfo, tree, hf_inap_OriginationAttemptAuthorizedArg_PDU);
+    offset=dissect_inap_OriginationAttemptAuthorizedArg(FALSE, tvb, offset, actx, tree, hf_inap_OriginationAttemptAuthorizedArg_PDU);
     break;
   case 2: /*2 CollectedInformation */
-    offset=dissect_inap_CollectedInformationArg(FALSE, tvb, offset, pinfo, tree, hf_inap_CollectedInformationArg_PDU);
+    offset=dissect_inap_CollectedInformationArg(FALSE, tvb, offset, actx, tree, hf_inap_CollectedInformationArg_PDU);
     break;
   case 3: /*3 AnalysedInformation */
-    offset=dissect_inap_AnalysedInformationArg(FALSE, tvb, offset, pinfo, tree, hf_inap_AnalysedInformationArg_PDU);
+    offset=dissect_inap_AnalysedInformationArg(FALSE, tvb, offset, actx, tree, hf_inap_AnalysedInformationArg_PDU);
     break;
   case 4: /*4 RouteSelectFailure */
-    offset=dissect_inap_RouteSelectFailureArg(FALSE, tvb, offset, pinfo, tree, hf_inap_RouteSelectFailureArg_PDU);
+    offset=dissect_inap_RouteSelectFailureArg(FALSE, tvb, offset, actx, tree, hf_inap_RouteSelectFailureArg_PDU);
     break;
   case 5: /*5 oCalledPartyBusy */
-    offset=dissect_inap_OCalledPartyBusyArg(FALSE, tvb, offset, pinfo, tree, hf_inap_OCalledPartyBusyArg_PDU);
+    offset=dissect_inap_OCalledPartyBusyArg(FALSE, tvb, offset, actx, tree, hf_inap_OCalledPartyBusyArg_PDU);
     break;      
   case 6: /*6 oNoAnswer */
-    offset=dissect_inap_ONoAnswer(FALSE, tvb, offset, pinfo, tree, hf_inap_ONoAnswer_PDU);
+    offset=dissect_inap_ONoAnswer(FALSE, tvb, offset, actx, tree, hf_inap_ONoAnswer_PDU);
     break;
   case 7: /*7 oAnswer */
-    offset=dissect_inap_OAnswerArg(FALSE, tvb, offset, pinfo, tree, hf_inap_OAnswerArg_PDU);
+    offset=dissect_inap_OAnswerArg(FALSE, tvb, offset, actx, tree, hf_inap_OAnswerArg_PDU);
     break;
   case 8: /*8 oDisconnect */
-    offset=dissect_inap_ODisconnectArg(FALSE, tvb, offset, pinfo, tree, hf_inap_ODisconnectArg_PDU);
+    offset=dissect_inap_ODisconnectArg(FALSE, tvb, offset, actx, tree, hf_inap_ODisconnectArg_PDU);
     break;
   case 9: /*9 TermAttemptAuthorized */
-    offset=dissect_inap_TermAttemptAuthorizedArg(FALSE, tvb, offset, pinfo, tree, hf_inap_TermAttemptAuthorizedArg_PDU);
+    offset=dissect_inap_TermAttemptAuthorizedArg(FALSE, tvb, offset, actx, tree, hf_inap_TermAttemptAuthorizedArg_PDU);
     break;
   case 10: /*10 tBusy */
-    offset=dissect_inap_TBusyArg(FALSE, tvb, offset, pinfo, tree, hf_inap_TBusyArg_PDU);
+    offset=dissect_inap_TBusyArg(FALSE, tvb, offset, actx, tree, hf_inap_TBusyArg_PDU);
     break;
   case 11: /*11 tNoAnswer */
-    offset=dissect_inap_TNoAnswerArg(FALSE, tvb, offset, pinfo, tree, hf_inap_TNoAnswerArg_PDU);
+    offset=dissect_inap_TNoAnswerArg(FALSE, tvb, offset, actx, tree, hf_inap_TNoAnswerArg_PDU);
     break;
   case 12: /*12 tAnswer */
-    offset=dissect_inap_TAnswerArg(FALSE, tvb, offset, pinfo, tree, hf_inap_TAnswerArg_PDU);
+    offset=dissect_inap_TAnswerArg(FALSE, tvb, offset, actx, tree, hf_inap_TAnswerArg_PDU);
     break;
   case 13: /*13 tDisconnect */
-    offset=dissect_inap_TDisconnectArg(FALSE, tvb, offset, pinfo, tree, hf_inap_TDisconnectArg_PDU);
+    offset=dissect_inap_TDisconnectArg(FALSE, tvb, offset, actx, tree, hf_inap_TDisconnectArg_PDU);
     break;
   case 14: /*14 oMidCall */
-    offset=dissect_inap_MidCallArg(FALSE, tvb, offset, pinfo, tree, hf_inap_MidCallArg_PDU);
+    offset=dissect_inap_MidCallArg(FALSE, tvb, offset, actx, tree, hf_inap_MidCallArg_PDU);
     break;
   case 15: /*15 tMidCall */
-    offset=dissect_inap_MidCallArg(FALSE, tvb, offset, pinfo, tree, hf_inap_MidCallArg_PDU);
+    offset=dissect_inap_MidCallArg(FALSE, tvb, offset, actx, tree, hf_inap_MidCallArg_PDU);
     break;
   case  16: /*AssistRequestInstructions*/
-    offset=dissect_inap_AssistRequestInstructionsArg(FALSE, tvb, offset, pinfo, tree, hf_inap_AssistRequestInstructionsArg_PDU);
+    offset=dissect_inap_AssistRequestInstructionsArg(FALSE, tvb, offset, actx, tree, hf_inap_AssistRequestInstructionsArg_PDU);
     break;
   case  17: /*EstablishTemporaryConnection*/
-    offset=dissect_inap_EstablishTemporaryConnectionArg(FALSE, tvb, offset, pinfo, tree, hf_inap_EstablishTemporaryConnectionArg_PDU);
+    offset=dissect_inap_EstablishTemporaryConnectionArg(FALSE, tvb, offset, actx, tree, hf_inap_EstablishTemporaryConnectionArg_PDU);
     break;
   case  18: /*DisconnectForwardConnections*/
     proto_tree_add_text(tree, tvb, offset, -1, "Disconnect Forward Connection");
     break;
   case  19: /*ConnectToResource*/
-    offset=dissect_inap_ConnectToResourceArg(FALSE, tvb, offset, pinfo, tree, hf_inap_ConnectToResourceArg_PDU);
+    offset=dissect_inap_ConnectToResourceArg(FALSE, tvb, offset, actx, tree, hf_inap_ConnectToResourceArg_PDU);
     break;
   case  20: /*Connect*/
-    offset=dissect_inap_ConnectArg(FALSE, tvb, offset, pinfo, tree,hf_inap_ConnectArg_PDU);
+    offset=dissect_inap_ConnectArg(FALSE, tvb, offset, actx, tree,hf_inap_ConnectArg_PDU);
     break;     
   case  21: /* 21 HoldCallInNetwork */
-    offset=dissect_inap_HoldCallInNetworkArg(FALSE, tvb, offset, pinfo, tree,hf_inap_HoldCallInNetworkArg_PDU);
+    offset=dissect_inap_HoldCallInNetworkArg(FALSE, tvb, offset, actx, tree,hf_inap_HoldCallInNetworkArg_PDU);
     break;
 
    case 22: /*ReleaseCall*/
-    offset=dissect_inap_ReleaseCallArg(FALSE, tvb, offset, pinfo, tree,hf_inap_ReleaseCallArg_PDU);
+    offset=dissect_inap_ReleaseCallArg(FALSE, tvb, offset, actx, tree,hf_inap_ReleaseCallArg_PDU);
     break;
     case 23: /*InitialDP*/
-    offset=dissect_inap_RequestReportBCSMEventArg(FALSE, tvb, offset, pinfo, tree, hf_inap_RequestReportBCSMEventArg_PDU);
+    offset=dissect_inap_RequestReportBCSMEventArg(FALSE, tvb, offset, actx, tree, hf_inap_RequestReportBCSMEventArg_PDU);
     break;
   case  24: /*EventReportBCSM*/
-    offset=dissect_inap_EventReportBCSMArg(FALSE, tvb, offset, pinfo, tree, hf_inap_EventReportBCSMArg_PDU);
+    offset=dissect_inap_EventReportBCSMArg(FALSE, tvb, offset, actx, tree, hf_inap_EventReportBCSMArg_PDU);
     break;
   case  25: /*25, "RequestNotificationChargingEvent */
-    offset=dissect_inap_RequestNotificationChargingEvent(FALSE, tvb, offset, pinfo, tree, hf_inap_RequestNotificationChargingEvent_PDU);
+    offset=dissect_inap_RequestNotificationChargingEvent(FALSE, tvb, offset, actx, tree, hf_inap_RequestNotificationChargingEvent_PDU);
     break;
   case  26: /*26, "EventNotificationCharging */
-    offset=dissect_inap_EventNotificationChargingArg(FALSE, tvb, offset, pinfo, tree, hf_inap_EventNotificationChargingArg_PDU);
+    offset=dissect_inap_EventNotificationChargingArg(FALSE, tvb, offset, actx, tree, hf_inap_EventNotificationChargingArg_PDU);
     break;
   case  27: /*27, "CollectInformation */
-    offset=dissect_inap_CollectInformationArg(FALSE, tvb, offset, pinfo, tree, hf_inap_CollectInformationArg_PDU);
+    offset=dissect_inap_CollectInformationArg(FALSE, tvb, offset, actx, tree, hf_inap_CollectInformationArg_PDU);
     break;
   case  28: /*28, "AnalyseInformation */
-    offset=dissect_inap_AnalyseInformationArg(FALSE, tvb, offset, pinfo, tree, hf_inap_AnalyseInformationArg_PDU);
+    offset=dissect_inap_AnalyseInformationArg(FALSE, tvb, offset, actx, tree, hf_inap_AnalyseInformationArg_PDU);
     break;
   case  29: /*29, "SelectRoute */
-    offset=dissect_inap_SelectRouteArg(FALSE, tvb, offset, pinfo, tree, hf_inap_SelectRouteArg_PDU);
+    offset=dissect_inap_SelectRouteArg(FALSE, tvb, offset, actx, tree, hf_inap_SelectRouteArg_PDU);
     break;
   case  30: /*30, "SelectFacility */
-    offset=dissect_inap_SelectFacilityArg(FALSE, tvb, offset, pinfo, tree, hf_inap_SelectFacilityArg_PDU);
+    offset=dissect_inap_SelectFacilityArg(FALSE, tvb, offset, actx, tree, hf_inap_SelectFacilityArg_PDU);
     break;
        /*31, "Continue */
   case  32: /*32, InitiateCallAttempt*/
-    offset=dissect_inap_InitiateCallAttemptArg(FALSE, tvb, offset, pinfo, tree, hf_inap_InitiateCallAttemptArg_PDU);
+    offset=dissect_inap_InitiateCallAttemptArg(FALSE, tvb, offset, actx, tree, hf_inap_InitiateCallAttemptArg_PDU);
     break;
   case 33: /*ResetTimer*/
-    offset=dissect_inap_ResetTimerArg(FALSE, tvb, offset, pinfo, tree, hf_inap_ResetTimerArg_PDU);
+    offset=dissect_inap_ResetTimerArg(FALSE, tvb, offset, actx, tree, hf_inap_ResetTimerArg_PDU);
     break;
   case 34: /*FurnishChargingInformation*/
-    offset=dissect_inap_FurnishChargingInformationArg(FALSE, tvb, offset, pinfo, tree, hf_inap_FurnishChargingInformationArg_PDU);
+    offset=dissect_inap_FurnishChargingInformationArg(FALSE, tvb, offset, actx, tree, hf_inap_FurnishChargingInformationArg_PDU);
     break;
   case 35: /*35, ApplyCharging */
-    offset=dissect_inap_ApplyChargingArg(FALSE, tvb, offset, pinfo, tree, hf_inap_ApplyChargingArg_PDU);
+    offset=dissect_inap_ApplyChargingArg(FALSE, tvb, offset, actx, tree, hf_inap_ApplyChargingArg_PDU);
     break;     
   case 36: /*36, "ApplyChargingReport */
-    offset=dissect_inap_ApplyChargingReportArg(FALSE, tvb, offset, pinfo, tree, hf_inap_ApplyChargingReportArg_PDU);
+    offset=dissect_inap_ApplyChargingReportArg(FALSE, tvb, offset, actx, tree, hf_inap_ApplyChargingReportArg_PDU);
     break;
   case 37: /*37, "RequestCurrentStatusReport */
-    offset=dissect_inap_RequestCurrentStatusReportArg(FALSE, tvb, offset, pinfo, tree, hf_inap_RequestCurrentStatusReportArg_PDU);
+    offset=dissect_inap_RequestCurrentStatusReportArg(FALSE, tvb, offset, actx, tree, hf_inap_RequestCurrentStatusReportArg_PDU);
     break;
   case 38:/*38, "RequestEveryStatusChangeReport */
-    offset=dissect_inap_RequestEveryStatusChangeReportArg(FALSE, tvb, offset, pinfo, tree, hf_inap_RequestEveryStatusChangeReportArg_PDU);
+    offset=dissect_inap_RequestEveryStatusChangeReportArg(FALSE, tvb, offset, actx, tree, hf_inap_RequestEveryStatusChangeReportArg_PDU);
     break;
   case 39:/*39, "RequestFirstStatusMatchReport */
-    offset=dissect_inap_RequestFirstStatusMatchReportArg(FALSE, tvb, offset, pinfo, tree, hf_inap_RequestFirstStatusMatchReportArg_PDU);
+    offset=dissect_inap_RequestFirstStatusMatchReportArg(FALSE, tvb, offset, actx, tree, hf_inap_RequestFirstStatusMatchReportArg_PDU);
     break;
   case 40:/*40, "StatusReport */
-    offset=dissect_inap_StatusReportArg(FALSE, tvb, offset, pinfo, tree, hf_inap_StatusReportArg_PDU);
+    offset=dissect_inap_StatusReportArg(FALSE, tvb, offset, actx, tree, hf_inap_StatusReportArg_PDU);
     break;
   case 41:/*41, "CallGap */
-    offset=dissect_inap_CallGapArg(FALSE, tvb, offset, pinfo, tree, hf_inap_CallGapArg_PDU);
+    offset=dissect_inap_CallGapArg(FALSE, tvb, offset, actx, tree, hf_inap_CallGapArg_PDU);
     break;
   case 42:/*42, "ActivateServiceFiltering */
-    offset=dissect_inap_ActivateServiceFilteringArg(FALSE, tvb, offset, pinfo, tree, hf_inap_ActivateServiceFilteringArg_PDU);
+    offset=dissect_inap_ActivateServiceFilteringArg(FALSE, tvb, offset, actx, tree, hf_inap_ActivateServiceFilteringArg_PDU);
     break;
   case 43:/*43, "ServiceFilteringResponse */
-    offset=dissect_inap_ServiceFilteringResponseArg(FALSE, tvb, offset, pinfo, tree, hf_inap_ServiceFilteringResponseArg_PDU);
+    offset=dissect_inap_ServiceFilteringResponseArg(FALSE, tvb, offset, actx, tree, hf_inap_ServiceFilteringResponseArg_PDU);
     break;    
   case  44: /*CallInformationReport*/
-    offset=dissect_inap_CallInformationReportArg(FALSE, tvb, offset, pinfo, tree, hf_inap_CallInformationReportArg_PDU);
+    offset=dissect_inap_CallInformationReportArg(FALSE, tvb, offset, actx, tree, hf_inap_CallInformationReportArg_PDU);
     break;
   case  45: /*CallInformationRequest*/
-    offset=dissect_inap_CallInformationRequestArg(FALSE, tvb, offset, pinfo, tree, hf_inap_CallInformationRequestArg_PDU);
+    offset=dissect_inap_CallInformationRequestArg(FALSE, tvb, offset, actx, tree, hf_inap_CallInformationRequestArg_PDU);
     break;
   case 47: /*PlayAnnouncement*/
-    offset=dissect_inap_PlayAnnouncementArg(FALSE, tvb, offset, pinfo, tree, hf_inap_PlayAnnouncementArg_PDU);
+    offset=dissect_inap_PlayAnnouncementArg(FALSE, tvb, offset, actx, tree, hf_inap_PlayAnnouncementArg_PDU);
     break;
   case 48: /*PromptAndCollectUserInformation*/
-    offset=dissect_inap_PromptAndCollectUserInformationArg(FALSE, tvb, offset, pinfo, tree, hf_inap_PromptAndCollectUserInformationArg_PDU);
+    offset=dissect_inap_PromptAndCollectUserInformationArg(FALSE, tvb, offset, actx, tree, hf_inap_PromptAndCollectUserInformationArg_PDU);
     break;
   case 49: /* 49 SpecializedResourceReport */
-    offset=dissect_inap_SpecializedResourceReportArg(FALSE, tvb, offset, pinfo, tree, hf_inap_SpecializedResourceReportArg_PDU);
+    offset=dissect_inap_SpecializedResourceReportArg(FALSE, tvb, offset, actx, tree, hf_inap_SpecializedResourceReportArg_PDU);
     break;
   case  53: /*Cancel*/
-    offset=dissect_inap_CancelArg(FALSE, tvb, offset, pinfo, tree, hf_inap_CancelArg_PDU);
+    offset=dissect_inap_CancelArg(FALSE, tvb, offset, actx, tree, hf_inap_CancelArg_PDU);
     break;
        /*55 ActivityTest*/
    default:
@@ -394,188 +356,43 @@ TC-Returnable OPERATION ::=
    promptAndCollectUserInformation     - RESULT         ReceivedInformationArg
        
 */
-static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
+static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
   switch(opcode){
    case 37: /*requestCurrentStatusReport*/
-    offset=dissect_inap_RequestCurrentStatusReportResultArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_inap_RequestCurrentStatusReportResultArg(FALSE, tvb, offset, actx, tree, -1);
     break;
    case 48: /*PromptAndCollectUserInformation*/
-    offset=dissect_inap_ReceivedInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
+    offset=dissect_inap_ReceivedInformationArg(FALSE, tvb, offset, actx, tree, -1);
     break;
   default:
     proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
   }
   return offset;
 }
-
-static int 
-dissect_invokeCmd(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
-  return dissect_inap_Opcode(FALSE, tvb, offset, pinfo, tree, hf_inap_invokeCmd);
-}
-
-
-static int 
-dissect_errorCode(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
-  return dissect_inap_errorCode(FALSE, tvb, offset, pinfo, tree, hf_inap_ReturnError);
-}
-
-static int dissect_invokeid(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
-  return dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_inap_invokeid, NULL);
-}
-
-
-static const value_string InvokeId_vals[] = {
-  {   0, "invokeid" },
-  {   1, "absent" },
-  { 0, NULL }
-};
-
-static int dissect_absent(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) {
-  return dissect_inap_NULL(FALSE, tvb, offset, pinfo, tree, hf_inap_absent);
-}
-
-
-static const ber_choice_t InvokeId_choice[] = {