diff options
34 files changed, 8114 insertions, 0 deletions
diff --git a/asn1/Makefile.nmake b/asn1/Makefile.nmake index 9abe339caf..6df43fc5dd 100644 --- a/asn1/Makefile.nmake +++ b/asn1/Makefile.nmake @@ -41,6 +41,8 @@ ber: \ pkixqualified \ pkixtsp \ pres \ + q932 \ + qsig \ ros \ rtse \ s4406 \ @@ -191,6 +193,12 @@ clean: cd pres $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd .. + cd q932 + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean + cd .. + cd qsig + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean + cd .. cd ranap $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd .. @@ -458,6 +466,16 @@ pres:: $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files cd .. +q932:: + cd q932 + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files + cd .. + +qsig:: + cd qsig + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files + cd .. + ranap:: cd ranap $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files diff --git a/asn1/q932/Addressing-Data-Elements.asn b/asn1/q932/Addressing-Data-Elements.asn new file mode 100644 index 0000000000..5254e37742 --- /dev/null +++ b/asn1/q932/Addressing-Data-Elements.asn @@ -0,0 +1,159 @@ +-- Addressing-Data-Elements.asn +-- +-- Taken from ITU ASN.1 database +-- http://www.itu.int/ITU-T/asn1/database/itu-t/q/q932/1998-Amd1/Addressing-Data-Elements.asn +-- +-- $Id$ +-- + +-- Module Addressing-Data-Elements (Q.932:05/1998) +Addressing-Data-Elements {itu-t recommendation q 932 + addressing-data-elements(7)} DEFINITIONS EXPLICIT TAGS ::= +BEGIN + +EXPORTS + PresentedAddressScreened, PresentedAddressUnscreened, + PresentedNumberScreened, PresentedNumberUnscreened, Address, PartyNumber, + PartySubaddress, ScreeningIndicator, PresentationAllowedIndicator; + +PresentedAddressScreened ::= CHOICE { + presentationAlIowedAddress [0] IMPLICIT AddressScreened, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueTolnterworking [2] IMPLICIT NULL, + presentationRestrictedAddress [3] IMPLICIT AddressScreened +} + +PresentedAddressUnscreened ::= CHOICE { + presentationAllowedAddress [0] IMPLICIT Address, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueTolnterworking [2] IMPLICIT NULL, + presentationRestrictedAddress [3] IMPLICIT Address +} + +PresentedNumberScreened ::= CHOICE { + presentationAllowedNumber [0] IMPLICIT NumberScreened, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueToInterworking [2] IMPLICIT NULL, + presentationRestrictedNumber [3] IMPLICIT NumberScreened +} + +PresentedNumberUnscreened ::= CHOICE { + presentationAllowedNumber [0] PartyNumber, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueToInterworking [2] IMPLICIT NULL, + presentationRestrictedNumber [3] PartyNumber +} + +AddressScreened ::= SEQUENCE { + partyNumber PartyNumber, + screeninglndicator ScreeningIndicator, + partySubaddress PartySubaddress OPTIONAL +} + +NumberScreened ::= SEQUENCE { + partyNumber PartyNumber, + screeningIndicator ScreeningIndicator +} + +Address ::= SEQUENCE { + partyNumber PartyNumber, + partySubaddress PartySubaddress OPTIONAL +} + +PartyNumber ::= CHOICE { + unknownPartyNumber [0] IMPLICIT NumberDigits, + -- the numbering plan is the default numbering plan + -- of the network. It is recommended that this value + -- is used. + publicPartyNumber [1] IMPLICIT PublicPartyNumber, + -- the numbering plan is according to ITU-T + -- Recommendation E.164. + nsapEncodedNumber [2] IMPLICIT NsapEncodedNumber, + -- ATM endsystem address encoded as an NSAP address. + dataPartyNumber [3] IMPLICIT NumberDigits, + -- not used, value reserved. + telexPartyNumber [4] IMPLICIT NumberDigits, + -- not used, value reserved. + privatePartyNumber [5] IMPLICIT PrivatePartyNumber, + nationalStandardPartyNumber [8] IMPLICIT NumberDigits +} + +-- not used, value reserved. +NsapEncodedNumber ::= OCTET STRING(SIZE (20)) + +PublicPartyNumber ::= SEQUENCE { + publicTypeOfNumber PublicTypeOfNumber, + publicNumberDigits NumberDigits +} + +PrivatePartyNumber ::= SEQUENCE { + privateTypeOfNumber PrivateTypeOfNumber, + privateNumberDigits NumberDigits +} + +NumberDigits ::= NumericString(SIZE (1..20)) + +PublicTypeOfNumber ::= ENUMERATED { + unknown(0), + -- if used number digits carry prefix indicating type + -- of number according to national + -- recommendations + internationalNumber(1), nationalNumber(2), + networkSpecificNumber(3), + -- not used, value reserved + subscriberNumber(4), abbreviatedNumber(6)} + +-- valid only for called party number at the +-- outgoing access, network substitutes +-- appropriate number +PrivateTypeOfNumber ::= ENUMERATED { + unknown(0), level2RegionalNumber(1), level1RegionalNumber(2), + pTNSpecificNumber(3), localNumber(4), abbreviatedNumber(6)} + +PartySubaddress ::= CHOICE { + userSpecifiedSubaddress UserSpecifiedSubaddress, + -- not recommended + nSAPSubaddress NSAPSubaddress +} + +-- according to ITU-T Recommendation X.213 +UserSpecifiedSubaddress ::= SEQUENCE { + subaddressInformation SubaddressInformation, + oddCountIndicator BOOLEAN OPTIONAL +} + +-- used when the coding of subaddress is BCD +NSAPSubaddress ::= OCTET STRING(SIZE (1..20)) + +-- specified according to ITU-T Recommendation X.213. Some networks +-- may limit the subaddress value to some other +-- length, e.g. 4 octets +SubaddressInformation ::= OCTET STRING(SIZE (1..20)) + +-- coded according to user requirements. Some +-- networks may limit the subaddress value to some +-- other length, e.g. 4 octets +ScreeningIndicator ::= ENUMERATED { + userProvidedNotScreened(0), + -- number was provided by a remote user terminal + -- equipment, and has been screened by a + -- network that is not the local public or local + -- private network. + userProvidedVerifiedAndPassed(1), + -- number was provided by a remote user terminal + -- equipment (or by a remote private network), and + -- has been screened by the local public or local + -- private network. + userProvidedVerifiedAndFailed(2), + -- not used, value reserved + networkProvided(3)} + +-- number was provided by local +-- public or local +-- private network +PresentationAllowedIndicator ::= BOOLEAN + +END -- of addressing data elements + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/asn1/q932/Interpretation-component.asn b/asn1/q932/Interpretation-component.asn new file mode 100644 index 0000000000..62d3b38ae0 --- /dev/null +++ b/asn1/q932/Interpretation-component.asn @@ -0,0 +1,26 @@ +-- Interpretation-component.asn +-- +-- Taken from ITU ASN.1 database +-- http://www.itu.int/ITU-T/asn1/database/itu-t/q/q932/1998-Amd1/Interpretation-component.asn +-- +-- $Id$ +-- + +-- Module Interpretation-component (Q.932:05/1998) +Interpretation-component {iso(1) standard(0) pss1-generic-procedures(11582) + interpretation-component(3)} DEFINITIONS ::= +BEGIN + +EXPORTS InterpretationComponent; + +InterpretationComponent ::= [11] IMPLICIT ENUMERATED { + discardAnyUnrecognisedInvokePdu(0), clearCallIfAnyInvokePduNotRecognised(1), + rejectAnyUnrecognisedInvokePdu(2) + -- this coding is implied by the absence of an + -- Interpretation Component. + } + +END -- component + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/asn1/q932/Makefile b/asn1/q932/Makefile new file mode 100644 index 0000000000..2b9b40c7be --- /dev/null +++ b/asn1/q932/Makefile @@ -0,0 +1,19 @@ +# $Id$ + +DISSECTOR_FILES=packet-q932.c packet-q932.h packet-q932-ros.c packet-q932-ros.h + +all: generate_dissector + +generate_dissector: $(DISSECTOR_FILES) + +packet-q932.c packet-q932.h: ../../tools/asn2wrs.py packet-q932-template.c packet-q932-template.h q932.cnf + python ../../tools/asn2wrs.py -b -T -e -p q932 -c q932.cnf -s packet-q932-template Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn + +packet-q932-ros.c packet-q932-ros.h: ../../tools/asn2wrs.py packet-q932-template-ros.c packet-q932-template-ros.h q932-ros.cnf + python ../../tools/asn2wrs.py -b -T -e -p q932.ros -c q932-ros.cnf -s packet-q932-ros-template q932-ros.asn + +clean: + rm -f parsetab.py $(DISSECTOR_FILES) + +copy_files: generate_dissector + cp $(DISSECTOR_FILES) ../../epan/dissectors diff --git a/asn1/q932/Makefile.nmake b/asn1/q932/Makefile.nmake new file mode 100644 index 0000000000..146374b713 --- /dev/null +++ b/asn1/q932/Makefile.nmake @@ -0,0 +1,62 @@ +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id$ + +include ../../config.nmake + +UNIX2DOS=$(PERL) ../../tools/unix2dos.pl + +PROTOCOL_NAME=q932 +Q932_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h +Q932_ROS_FILES=packet-$(PROTOCOL_NAME)-ros.c packet-$(PROTOCOL_NAME)-ros.h +DISSECTOR_FILES=$(Q932_FILES) $(Q932_ROS_FILES) +Q932_ASN=Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn + +all: generate_dissector + +generate_dissector: $(DISSECTOR_FILES) + +$(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf +!IFDEF PYTHON + $(PYTHON) "../../tools/asn2wrs.py" -b -T -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(Q932_ASN) +!ELSE + @echo Error: You need Python to use asn2wrs.py + @exit 1 +!ENDIF + +$(Q932_ROS_FILES): ../../tools/asn2wrs.py q932-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf +!IFDEF PYTHON + $(PYTHON) "../../tools/asn2wrs.py" -b -T -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template q932-ros.asn +!ELSE + @echo Error: You need Python to use asn2wrs.py + @exit 1 +!ENDIF + +clean: + rm -f parsetab.py parsetab.pyc $(DISSECTOR_FILES) + +distclean: clean + +maintainer-clean: distclean + +# Fix EOL in generated dissectors. Cygwin's python generates files with +# mixed EOL styles, which can't be commited to the SVN repository. +# Stuff included from template and "cnf" files has "\r\n" on windows, while +# the generated stuff has "\n". + +fix_eol: generate_dissector + move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp + move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp + move packet-$(PROTOCOL_NAME)-ros.c packet-$(PROTOCOL_NAME)-ros.c.tmp + move packet-$(PROTOCOL_NAME)-ros.h packet-$(PROTOCOL_NAME)-ros.h.tmp + $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c + $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h + $(UNIX2DOS) < packet-$(PROTOCOL_NAME)-ros.c.tmp > packet-$(PROTOCOL_NAME)-ros.c + $(UNIX2DOS) < packet-$(PROTOCOL_NAME)-ros.h.tmp > packet-$(PROTOCOL_NAME)-ros.h + del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp packet-$(PROTOCOL_NAME)-ros.c.tmp packet-$(PROTOCOL_NAME)-ros.h.tmp + +copy_files: generate_dissector fix_eol + xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y + xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y + xcopy packet-$(PROTOCOL_NAME)-ros.c ..\..\epan\dissectors /d /y + xcopy packet-$(PROTOCOL_NAME)-ros.h ..\..\epan\dissectors /d /y diff --git a/asn1/q932/Network-Facility-Extension.asn b/asn1/q932/Network-Facility-Extension.asn new file mode 100644 index 0000000000..ef951a0624 --- /dev/null +++ b/asn1/q932/Network-Facility-Extension.asn @@ -0,0 +1,35 @@ +-- Network-Facility-Extension.asn +-- +-- Taken from ITU ASN.1 database +-- http://www.itu.int/ITU-T/asn1/database/itu-t/q/q932/1998-Amd1/Network-Facility-Extension.asn +-- +-- $Id$ +-- + +-- Module Network-Facility-Extension (Q.932:05/1998) +Network-Facility-Extension {iso(1) standard(0) pss1-generic-procedures(11582) + network-facility-extension(2)} DEFINITIONS ::= +BEGIN + +EXPORTS NetworkFacilityExtension; + +IMPORTS + PartyNumber + FROM Addressing-Data-Elements {itu-t recommendation q 932 + addressing-data-elements(7)}; + +NetworkFacilityExtension ::= [10] IMPLICIT SEQUENCE { + sourceEntity [0] IMPLICIT EntityType, + sourceEntityAddress [1] AddressInformation OPTIONAL, + destinationEntity [2] IMPLICIT EntityType, + destinationEntityAddress [3] AddressInformation OPTIONAL +} + +EntityType ::= ENUMERATED {endPINX(0), anyTypeOfPINX(1)} + +AddressInformation ::= PartyNumber + +END -- of Network Facility Extension + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/asn1/q932/Network-Protocol-Profile-component.asn b/asn1/q932/Network-Protocol-Profile-component.asn new file mode 100644 index 0000000000..f30cc43849 --- /dev/null +++ b/asn1/q932/Network-Protocol-Profile-component.asn @@ -0,0 +1,22 @@ +-- Network-Protocol-Profile-component.asn +-- +-- Taken from ITU ASN.1 database +-- http://www.itu.int/ITU-T/asn1/database/itu-t/q/q932/1998-Amd1/Network-Protocol-Profile-component.asn +-- +-- $Id$ +-- + +-- Module Network-Protocol-Profile-component (Q.932:05/1998) +Network-Protocol-Profile-component {iso(1) standard(0) + pss1-generic-procedures(11582) network-protocol-profile-component(8)} +DEFINITIONS ::= +BEGIN + +EXPORTS NetworkProtocolProfile; + +NetworkProtocolProfile ::= [18] IMPLICIT INTEGER {acse(19), dse(32)}(0..254) + +END -- of Network-Protocol-Profile-component + +-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D + diff --git a/asn1/q932/packet-q932-ros-template.c b/asn1/q932/packet-q932-ros-template.c new file mode 100644 index 0000000000..35aa700ef0 --- /dev/null +++ b/asn1/q932/packet-q932-ros-template.c @@ -0,0 +1,102 @@ +/* packet-q932-ros.c + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <epan/packet.h> +#include <epan/prefs.h> +#include <epan/strutil.h> +#include <epan/emem.h> + +#include "packet-ber.h" +#include "packet-q932-ros.h" + +#define PNAME "Q.932 Operations Service Element" +#define PSNAME "Q932.ROS" +#define PFNAME "q932.ros" + +/* Initialize the protocol and registered fields */ +int proto_rose = -1; +#include "packet-q932-ros-hf.c" + +/* Initialize the subtree pointers */ +#include "packet-q932-ros-ett.c" + +/* Preferences */ + +/* Subdissectors */ +static dissector_handle_t data_handle = NULL; + +/* Gloabl variables */ +static rose_context *rose_ctx; + +static gint32 code_choice; +static guint32 code_local; +static const gchar *code_global; +static guint32 problem_val; +static gchar problem_str[64]; +static tvbuff_t *arg_next_tvb, *res_next_tvb, *err_next_tvb; + + +#include "packet-q932-ros-fn.c" + +/*--- dissect_rose_apdu -----------------------------------------------------*/ +int dissect_rose_apdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, rose_context *rctx) { + if (rctx) + rose_ctx = rctx; + return dissect_RoseAPDU_PDU(tvb, pinfo, tree); +} + +/*--- proto_register_rose ---------------------------------------------------*/ +void proto_register_rose(void) { + + /* List of fields */ + static hf_register_info hf[] = { +#include "packet-q932-ros-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { +#include "packet-q932-ros-ettarr.c" + }; + + /* Register protocol and dissector */ + proto_rose = proto_register_protocol(PNAME, PSNAME, PFNAME); + proto_set_cant_toggle(proto_rose); + + /* Register fields and subtrees */ + proto_register_field_array(proto_rose, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + +/*--- proto_reg_handoff_rose ------------------------------------------------*/ +void proto_reg_handoff_rose(void) { + data_handle = find_dissector("data"); +} + +/*---------------------------------------------------------------------------*/
\ No newline at end of file diff --git a/asn1/q932/packet-q932-ros-template.h b/asn1/q932/packet-q932-ros-template.h new file mode 100644 index 0000000000..9ed5713e05 --- /dev/null +++ b/asn1/q932/packet-q932-ros-template.h @@ -0,0 +1,42 @@ +/* packet-q932-ros.h + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef PACKET_ROSE_H +#define PACKET_ROSE_H + +#include "epan/packet.h" + +typedef struct _rose_context { + int apdu_depth; + dissector_table_t arg_global_dissector_table; + dissector_table_t arg_local_dissector_table; + dissector_table_t res_global_dissector_table; + dissector_table_t res_local_dissector_table; +} rose_context; + +int dissect_rose_apdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, rose_context *rctx); + +#endif /* PACKET_ROSE_H */ + diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c new file mode 100644 index 0000000000..89899dfd5d --- /dev/null +++ b/asn1/q932/packet-q932-template.c @@ -0,0 +1,333 @@ +/* packet-q932.c + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <epan/packet.h> +#include <epan/prefs.h> +#include <epan/strutil.h> +#include <epan/emem.h> + +#include "packet-ber.h" +#include "packet-q932-ros.h" +#include "packet-q932.h" + +#define PNAME "Q.932" +#define PSNAME "Q932" +#define PFNAME "q932" + +/* Initialize the protocol and registered fields */ +int proto_q932 = -1; +static int hf_q932_ie_type = -1; +static int hf_q932_ie_len = -1; +static int hf_q932_ie_data = -1; +static int hf_q932_pp = -1; +static int hf_q932_nd = -1; +#include "packet-q932-hf.c" + +/* Initialize the subtree pointers */ +static gint ett_q932 = -1; +static gint ett_q932_ie = -1; +#include "packet-q932-ett.c" + +/* Preferences */ + +/* ROSE context */ +static rose_context q932_rose_ctx; + +/* Subdissectors */ +static dissector_handle_t data_handle = NULL; + +/* Gloabl variables */ + + +#define Q932_IE_EXTENDED_FACILITY 0x0D +#define Q932_IE_FACILITY 0x1C +#define Q932_IE_NOTIFICATION_INDICATOR 0x27 +#define Q932_IE_INFORMATION_REQUEST 0x32 +#define Q932_IE_FEATURE_ACTIVATION 0x38 +#define Q932_IE_FEATURE_INDICATION 0x39 +#define Q932_IE_SERVICE_PROFILE_ID 0x3A +#define Q932_IE_ENDPOINT_IDENTIFIER 0x3B +static const value_string q932_str_ie_type[] = { + { Q932_IE_EXTENDED_FACILITY , "Extended facility" }, + { Q932_IE_FACILITY , "Facility" }, + { Q932_IE_NOTIFICATION_INDICATOR, "Notification indicator" }, + { Q932_IE_INFORMATION_REQUEST, "Information request" }, + { Q932_IE_FEATURE_ACTIVATION , "Feature activation" }, + { Q932_IE_FEATURE_INDICATION , "Feature indication" }, + { Q932_IE_SERVICE_PROFILE_ID , "Service profile identification" }, + { Q932_IE_ENDPOINT_IDENTIFIER, "Endpoint identifier" }, + { 0, NULL} +}; + +static const value_string str_pp[] = { + { 0x11 , "Remote Operations Protocol" }, + { 0x12 , "CMIP Protocol" }, + { 0x13 , "ACSE Protocol" }, + { 0x1F , "Networking extensions" }, + { 0, NULL} +}; + +static const value_string str_nd[] = { + { 0x00 , "User suspended" }, + { 0x01 , "User resume" }, + { 0x02 , "Bearer service change" }, + { 0x04 , "Call completion delay" }, + { 0x03 , "Discriminator for extension to ASN.1 encoded component" }, + { 0x40 , "Discriminator for extension to ASN.1 encoded component for ISO" }, + { 0x42 , "Conference established" }, + { 0x43 , "Conference disconnected" }, + { 0x44 , "Other party added" }, + { 0x45 , "Isolated" }, + { 0x46 , "Reattached" }, + { 0x47 , "Other party isolated" }, + { 0x48 , "Other party reattached" }, + { 0x49 , "Other party split" }, + { 0x4A , "Other party disconnected" }, + { 0x4B , "Conference floating" }, + { 0x4C , "Conference disconnected, pre-emption" }, + { 0x4F , "Conference floating, served user pre-empted" }, + { 0x60 , "Call is a waiting call" }, + { 0x68 , "Diversion activated" }, + { 0x69 , "call transferred, alerting" }, + { 0x6A , "call transferred, answered" }, + { 0x6E , "reverse charging (whole call)" }, + { 0x6F , "reverse charging (for the rest of the call)" }, + { 0x74 , "service profile update" }, + { 0x79 , "Remote hold" }, + { 0x7A , "Remote retrieval" }, + { 0x7B , "Call is diverting" }, + { 0, NULL} +}; + +#include "packet-q932-fn.c" + +/*--- dissect_q932_facility_ie -------------------------------------------------------*/ +/*static*/ void +dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + guint8 class; + gboolean pc; + guint32 tag; + guint32 len; + int hoffset, eoffset; + int ie_end; + tvbuff_t *next_tvb; + + ie_end = offset + length; + proto_tree_add_item(tree, hf_q932_pp, tvb, offset, 1, FALSE); + offset++; + while (offset < ie_end) { + hoffset = offset; + offset = get_ber_identifier(tvb, offset, &class, &pc, &tag); + offset = get_ber_length(tree, tvb, offset, &len, NULL); + eoffset = offset + len; + next_tvb = tvb_new_subset(tvb, hoffset, eoffset - hoffset, eoffset - hoffset); + switch (class) { + case BER_CLASS_CON: + switch (tag) { + case 10 : /* Network Facility Extension */ + dissect_NetworkFacilityExtension_PDU(next_tvb, pinfo, tree); + break; + case 18 : /* Network Protocol Profile */ + dissect_NetworkProtocolProfile_PDU(next_tvb, pinfo, tree); + break; + case 11 : /* Interpretation Component */ + dissect_InterpretationComponent_PDU(next_tvb, pinfo, tree); + break; + /* ROSE APDU */ + case 1 : /* invoke */ + case 2 : /* returnResult */ + case 3 : /* returnError */ + case 4 : /* reject */ + q932_rose_ctx.apdu_depth = 1; + dissect_rose_apdu(next_tvb, hoffset, pinfo, tree, &q932_rose_ctx); + break; + /* DSE APDU */ + case 12 : /* begin */ + case 14 : /* end */ + case 15 : /* continue */ + case 17 : /* abort */ + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "DSE APDU (not supported)"); + break; + default: + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "Unknown Component"); + } + break; + case BER_CLASS_APP: + switch (tag) { + /* ACSE APDU */ + case 0 : /* aarq */ + case 1 : /* aare */ + case 2 : /* rlrq */ + case 3 : /* rlre */ + case 4 : /* abrt */ + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "ACSE APDU (not supported)"); + break; + default: + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "Unknown Component"); + } + break; + default: + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "Unknown Component"); + } + offset = eoffset; + } +} + +/*--- dissect_q932_ni_ie -------------------------------------------------------*/ +static void +dissect_q932_ni_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + int remain = length; + guint8 octet = 0; + guint32 value = 0; + + while ((remain > 0) && !(octet & 0x80)) { + octet = tvb_get_guint8(tvb, offset++); + remain--; + value <<= 7; + value |= octet & 0x7F; + } + proto_tree_add_uint(tree, hf_q932_nd, tvb, offset - (length - remain), length - remain, value); + + if (remain > 0) { + proto_tree_add_text(tree, tvb, offset - remain, remain, "ASN.1 Encoded Data Structure(NOT IMPLEMENTED): %s", tvb_bytes_to_str(tvb, offset - remain, remain)); + } +} + +/*--- dissect_q932_ie -------------------------------------------------------*/ +static void +dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + gint offset; + proto_item *ti, *ti_ie; + proto_tree *ie_tree; + guint8 ie_type, ie_len; + + offset = 0; + + ti = proto_tree_add_item_hidden(tree, proto_q932, tvb, offset, -1, FALSE); + + ie_type = tvb_get_guint8(tvb, offset); + ie_len = tvb_get_guint8(tvb, offset + 1); + + ti_ie = proto_tree_add_text(tree, tvb, offset, -1, "%s", + val_to_str(ie_type, VALS(q932_str_ie_type), "unknown (0x%02X)")); + ie_tree = proto_item_add_subtree(ti_ie, ett_q932_ie); + proto_tree_add_item(ie_tree, hf_q932_ie_type, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_q932_ie_len, tvb, offset + 1, 1, FALSE); + offset += 2; + if (tvb_length_remaining(tvb, offset) <= 0) + return; + switch (ie_type) { + case Q932_IE_FACILITY : + dissect_q932_facility_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + case Q932_IE_NOTIFICATION_INDICATOR : + dissect_q932_ni_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + default: + if (ie_len > 0) { + if (tree) proto_tree_add_item(ie_tree, hf_q932_ie_data, tvb, offset, ie_len, FALSE); + } + } +} + +/*--- dissect_q932_apdu -----------------------------------------------------*/ +static void +dissect_q932_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + dissect_rose_apdu(tvb, 0, pinfo, tree, pinfo->private_data); +} + +/*--- proto_register_q932 ---------------------------------------------------*/ +void proto_register_q932(void) { + + /* List of fields */ + static hf_register_info hf[] = { + { &hf_q932_ie_type, { "Type", "q932.ie.type", + FT_UINT8, BASE_HEX, VALS(q932_str_ie_type), 0x0, + "Information Element Type", HFILL }}, + { &hf_q932_ie_len, { "Length", "q932.ie.len", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Information Element Length", HFILL }}, + { &hf_q932_ie_data, { "Data", "q932.ie.data", + FT_BYTES, BASE_HEX, NULL, 0x0, + "Data", HFILL }}, + { &hf_q932_pp, { "Protocol profile", "q932.pp", + FT_UINT8, BASE_HEX, VALS(str_pp), 0x1F, + "Protocol profile", HFILL }}, + { &hf_q932_nd, { "Notification description", "q932.nd", + FT_UINT8, BASE_HEX, VALS(str_nd), 0x0, + "Notification description", HFILL }}, +#include "packet-q932-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_q932, + &ett_q932_ie, +#include "packet-q932-ettarr.c" + }; + + /* Register protocol and dissector */ + proto_q932 = proto_register_protocol(PNAME, PSNAME, PFNAME); + register_dissector("q932.apdu", dissect_q932_apdu, proto_q932); + + /* Register fields and subtrees */ + proto_register_field_array(proto_q932, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + + /* Register dissector tables */ + q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE); + q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE); + q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX); + q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX); +} + +/*--- proto_reg_handoff_q932 ------------------------------------------------*/ +void proto_reg_handoff_q932(void) { + dissector_handle_t q932_ie_handle; + + q932_ie_handle = create_dissector_handle(dissect_q932_ie, proto_q932); + /* Facility */ + dissector_add("q931.ie", (0x00 << 8) | Q932_IE_FACILITY, q932_ie_handle); + /* Notification indicator */ + dissector_add("q931.ie", (0x00 << 8) | Q932_IE_NOTIFICATION_INDICATOR, q932_ie_handle); + + data_handle = find_dissector("data"); +} + +/*---------------------------------------------------------------------------*/
\ No newline at end of file diff --git a/asn1/q932/packet-q932-template.h b/asn1/q932/packet-q932-template.h new file mode 100644 index 0000000000..ebfeaaf716 --- /dev/null +++ b/asn1/q932/packet-q932-template.h @@ -0,0 +1,32 @@ +/* packet-q932.h + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef PACKET_Q932_H +#define PACKET_Q932_H + +#include "packet-q932-exp.h" + +#endif /* PACKET_Q932_H */ + diff --git a/asn1/q932/q932-exp.cnf b/asn1/q932/q932-exp.cnf new file mode 100644 index 0000000000..94f1b1ec59 --- /dev/null +++ b/asn1/q932/q932-exp.cnf @@ -0,0 +1,36 @@ +# Do not modify this file. +# It is created automatically by the ASN.1 to Wireshark dissector compiler +# .\q932-exp.cnf +# ../../tools/asn2wrs.py -b -T -e -p q932 -c q932.cnf -s packet-q932-template Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn + +#.MODULE +Addressing-Data-Elements q932 +Network-Facility-Extension q932 +Network-Protocol-Profile-component q932 +Interpretation-component q932 +#.END + +#.IMPORT_TAG +PresentedAddressScreened BER_CLASS_ANY/*choice*/ -1/*choice*/ +PresentedAddressUnscreened BER_CLASS_ANY/*choice*/ -1/*choice*/ +PresentedNumberScreened BER_CLASS_ANY/*choice*/ -1/*choice*/ +PresentedNumberUnscreened BER_CLASS_ANY/*choice*/ -1/*choice*/ +Address BER_CLASS_UNI BER_UNI_TAG_SEQUENCE +PartyNumber BER_CLASS_ANY/*choice*/ -1/*choice*/ +PartySubaddress BER_CLASS_ANY/*choice*/ -1/*choice*/ +ScreeningIndicator BER_CLASS_UNI BER_UNI_TAG_ENUMERATED +PresentationAllowedIndicator BER_CLASS_UNI BER_UNI_TAG_BOOLEAN +#.END + +#.TYPE_ATTR +PresentedAddressScreened TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q932_PresentedAddressScreened_vals) BITMASK = 0 +PresentedAddressUnscreened TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q932_PresentedAddressUnscreened_vals) BITMASK = 0 +PresentedNumberScreened TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q932_PresentedNumberScreened_vals) BITMASK = 0 +PresentedNumberUnscreened TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q932_PresentedNumberUnscreened_vals) BITMASK = 0 +Address TYPE = FT_NONE DISPLAY = BASE_NONE STRINGS = NULL BITMASK = 0 +PartyNumber TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q932_PartyNumber_vals) BITMASK = 0 +PartySubaddress TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q932_PartySubaddress_vals) BITMASK = 0 +ScreeningIndicator TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(q932_ScreeningIndicator_vals) BITMASK = 0 +PresentationAllowedIndicator TYPE = FT_BOOLEAN DISPLAY = 8 STRINGS = NULL BITMASK = 0 +#.END + diff --git a/asn1/q932/q932-ros.asn b/asn1/q932/q932-ros.asn new file mode 100644 index 0000000000..1f2d6e177b --- /dev/null +++ b/asn1/q932/q932-ros.asn @@ -0,0 +1,112 @@ +-- Module Facility-Information-Element-Components (Q.932:05/1998) +Facility-Information-Element-Components {itu-t recommendation q 932 + facility-information-element-component(3)} DEFINITIONS IMPLICIT TAGS ::= +BEGIN + +Code ::= CHOICE { + local INTEGER, + global OBJECT IDENTIFIER +} + +RoseAPDU ::= CHOICE { + invoke [1] Invoke, + returnResult [2] ReturnResult, + returnError [3] ReturnError, + reject [4] Reject +} + +Invoke ::= SEQUENCE { + invokeId InvokeId, + linkedId CHOICE { + present [0] IMPLICIT InvokeId, + absent [1] IMPLICIT NULL + } OPTIONAL, + opcode Code, + argument ANY OPTIONAL +} + +ReturnResult ::= SEQUENCE { + invokeId InvokeId, + result SEQUENCE { + opcode Code, + result ANY OPTIONAL + } +} + +ReturnError ::= SEQUENCE { + invokeId InvokeId, + errcode Code, + parameter ANY OPTIONAL +} + +Reject ::= SEQUENCE { + invokeId InvokeId, + problem CHOICE { + general [0] GeneralProblem, + invoke [1] InvokeProblem, + returnResult [2] ReturnResultProblem, + returnError [3] ReturnErrorProblem + } +} + +GeneralProblem ::= INTEGER { + unrecognizedComponent(0), + mistypedComponent(1), + badlyStructuredComponent(2) +} + +InvokeProblem ::= INTEGER { + duplicateInvocation(0), + unrecognizedOperation(1), + mistypedArgument(2), + resourceLimitation(3), + releaseInProgress(4), + unrecognizedLinkedId(5), + linkedResponseUnexpected(6), + unexpectedLinkedOperation(7) +} + +ReturnResultProblem ::= INTEGER { + unrecognizedInvocation(0), + resultResponseUnexpected(1), + mistypedResult(2) +} + +ReturnErrorProblem ::= INTEGER { + unrecognizedInvocation(0), + errorResponseUnexpected(1), + unrecognizedError(2), + unexpectedError(3), + mistypedParameter(4) +} + +RejectProblem ::= INTEGER { + general-unrecognizedPDU(0), + general-mistypedPDU(1), + general-badlyStructuredPDU(2), + invoke-duplicateInvocation(10), + invoke-unrecognizedOperation(11), + invoke-mistypedArgument(12), + invoke-resourceLimitation(13), + invoke-releaseInProgress(14), + invoke-unrecognizedLinkedId(15), + invoke-linkedResponseUnexpected(16), + invoke-unexpectedLinkedOperation(17), + returnResult-unrecognizedInvocation(20), + returnResult-resultResponseUnexpected(21), + returnResult-mistypedResult(22), + returnError-unrecognizedInvocation(30), + returnError-errorResponseUnexpected(31), + returnError-unrecognizedError(32), + returnError-unexpectedError(33), + returnError-mistypedParameter(34) +} + +InvokeId ::= CHOICE { + present INTEGER, + absent NULL +} + +END -- end of generic ROS PDU definitions + + diff --git a/asn1/q932/q932-ros.cnf b/asn1/q932/q932-ros.cnf new file mode 100644 index 0000000000..e2d69f5abd --- /dev/null +++ b/asn1/q932/q932-ros.cnf @@ -0,0 +1,187 @@ + +#.PDU_NEW + +RoseAPDU + +#.TYPE_RENAME + +Invoke/argument InvokeArgument +ReturnResult/result/result ResultArgument + +#.FIELD_RENAME + +Invoke/linkedId/present linkedIdPresent + +Reject/problem/invoke invokeProblem +Reject/problem/returnError returnErrorProblem +Reject/problem/returnResult returnResultProblem + +ReturnResult/result/result resultArgument + +#--- Code --- + +#.FN_HDR Code + code_choice = -1; + code_local = -1; + code_global = ""; +#.FN_PARS +Code/local VAL_PTR = &code_local +Code/global FN_VARIANT = _str VAL_PTR = &code_global +#.FN_FTR Code/local + code_choice = 0; +#.FN_FTR Code/global + code_choice = 1; +#.END + +#--- Problem --- + +#.FN_PARS +GeneralProblem VAL_PTR = &problem_val +InvokeProblem VAL_PTR = &problem_val +ReturnResultProblem VAL_PTR = &problem_val +ReturnErrorProblem VAL_PTR = &problem_val +#.FN_FTR GeneralProblem + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_GeneralProblem_vals), "")); +#.FN_FTR InvokeProblem + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_InvokeProblem_vals), "")); +#.FN_FTR ReturnResultProblem + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_ReturnResultProblem_vals), "")); +#.FN_FTR ReturnErrorProblem + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_ReturnErrorProblem_vals), "")); +#.END + +#--- INVOKE --- + +#.FIELD_ATTR +Invoke/argument TYPE = FT_BYTES DISPLAY = BASE_HEX + +#.FN_BODY Invoke/argument + gint len; + + len = tvb_length_remaining(tvb, offset); + if (len) + proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE); + arg_next_tvb = tvb_new_subset(tvb, offset, len, len); + + offset += tvb_length_remaining(tvb, offset); + +#.FN_HDR Invoke + dissector_handle_t arg_handle = NULL; + + arg_next_tvb = NULL; +#.FN_FTR Invoke + if (code_choice == 0) { + arg_handle = dissector_get_port_handle(rose_ctx->arg_local_dissector_table, code_local); + } else if (code_choice == 1) { + arg_handle = dissector_get_string_handle(rose_ctx->arg_global_dissector_table, code_global); + } else { + arg_handle = NULL; + } + + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " INV:"); + if (!arg_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) { + if (code_choice == 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %d", code_local); + else if (code_choice == 1) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %s", code_global); + } + if (arg_next_tvb) { + pinfo->private_data = rose_ctx; + call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, pinfo, tree); + } +#.END + + +#--- RETURN RESULT --- + +#.FIELD_ATTR +ReturnResult/result/result TYPE = FT_BYTES DISPLAY = BASE_HEX + +#.FN_BODY ReturnResult/result/result + gint len; + + len = tvb_length_remaining(tvb, offset); + if (len) + proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE); + res_next_tvb = tvb_new_subset(tvb, offset, len, len); + + offset += tvb_length_remaining(tvb, offset); + +#.FN_HDR ReturnResult + dissector_handle_t res_handle = NULL; + + res_next_tvb = NULL; +#.FN_FTR ReturnResult + if (code_choice == 0) { + res_handle = dissector_get_port_handle(rose_ctx->res_local_dissector_table, code_local); + } else if (code_choice == 1) { + res_handle = dissector_get_string_handle(rose_ctx->res_global_dissector_table, code_global); + } else { + res_handle = NULL; + } + + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " RES:"); + if (!res_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) { + if (code_choice == 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %d", code_local); + else if (code_choice == 1) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %s", code_global); + } + if (res_next_tvb) { + pinfo->private_data = rose_ctx; + call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, pinfo, tree); + } +#.END + +#--- RETURN ERROR --- + +#.FIELD_ATTR +ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_HEX + +#.FN_BODY ReturnError/parameter + + gint len; + + len = tvb_length_remaining(tvb, offset); + if (len) + proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE); + res_next_tvb = tvb_new_subset(tvb, offset, len, len); + + offset += tvb_length_remaining(tvb, offset); + +#.FN_HDR ReturnError + dissector_handle_t err_handle = NULL; + + err_next_tvb = NULL; +#.FN_FTR ReturnError + if (code_choice == 0) { + /*err_handle = dissector_get_port_handle(rose_ctx->err_local_dissector_table, code_local);*/ + } else if (code_choice == 1) { + /*err_handle = dissector_get_string_handle(rose_ctx->err_global_dissector_table, code_global);*/ + } else { + err_handle = NULL; + } + + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " ERR:"); + if (!err_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) { + if (code_choice == 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %d", code_local); + else if (code_choice == 1) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %s", code_global); + } + if (err_next_tvb) { + pinfo->private_data = rose_ctx; + call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, pinfo, tree); + } +#.END + +#--- REJECT --- + +#.FN_HDR Reject + problem_str[0] = '\0'; +#.FN_FTR Reject + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " REJ: %s", problem_str); +#.END diff --git a/asn1/q932/q932.cnf b/asn1/q932/q932.cnf new file mode 100644 index 0000000000..2b1c37a0d2 --- /dev/null +++ b/asn1/q932/q932.cnf @@ -0,0 +1,34 @@ +# q932.cnf +# Q.932 conformation file +# 2007 Tomas Kukosa + +# $Id$ + +#.PDU + +InterpretationComponent +NetworkFacilityExtension +NetworkProtocolProfile + +#.EXPORTS EXTERN VALS_WITH_TABLE + +# Addressing-Data-Elements +PresentedAddressScreened +PresentedAddressUnscreened +PresentedNumberScreened +PresentedNumberUnscreened +Address +PartyNumber +PartySubaddress +ScreeningIndicator +PresentationAllowedIndicator + +#.FIELD_RENAME + +# Addressing-Data-Elements +PresentedNumberScreened/presentationAllowedNumber presentationAllowedNumberScreened +PresentedAddressScreened/presentationRestrictedAddress presentationRestrictedAddressScreened +PresentedNumberScreened/presentationRestrictedNumber presentationRestrictedNumberScreened + +#.END + diff --git a/asn1/qsig/Makefile b/asn1/qsig/Makefile new file mode 100644 index 0000000000..5ba3f49036 --- /dev/null +++ b/asn1/qsig/Makefile @@ -0,0 +1,16 @@ +# $Id$ + +DISSECTOR_FILES=packet-qsig.c packet-qsig.h + +all: generate_dissector + +generate_dissector: $(DISSECTOR_FILES) + +$(DISSECTOR_FILES): ../../tools/asn2wrs.py packet-qsig-template.c packet-qsig-template.h qsig.cnf + python ../../tools/asn2wrs.py -b -T -e -p qsig -c qsig.cnf -s packet-qsig-template qsig-gf-ext.asn qsig-gf-gp.asn qsig-gf-ade.asn qsig-na.asn qsig-cf.asn + +clean: + rm -f parsetab.py $(DISSECTOR_FILES) + +copy_files: generate_dissector + cp $(DISSECTOR_FILES) ../../epan/dissectors diff --git a/asn1/qsig/Makefile.nmake b/asn1/qsig/Makefile.nmake new file mode 100644 index 0000000000..b32499cee7 --- /dev/null +++ b/asn1/qsig/Makefile.nmake @@ -0,0 +1,47 @@ +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id$ + +include ../../config.nmake + +UNIX2DOS=$(PERL) ../../tools/unix2dos.pl + +PROTOCOL_NAME=qsig +DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h +QSIG_ASN=qsig-gf-ext.asn qsig-gf-gp.asn qsig-gf-ade.asn qsig-na.asn qsig-cf.asn + +all: generate_dissector + +generate_dissector: $(DISSECTOR_FILES) + +$(DISSECTOR_FILES): ../../tools/asn2wrs.py $(QSIG_ASN) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf +!IFDEF PYTHON + $(PYTHON) "../../tools/asn2wrs.py" -b -T -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(QSIG_ASN) +!ELSE + @echo Error: You need Python to use asn2wrs.py + @exit 1 +!ENDIF + +clean: + rm -f parsetab.py parsetab.pyc $(DISSECTOR_FILES) + +distclean: clean + +maintainer-clean: distclean + +# Fix EOL in generated dissectors. Cygwin's python generates files with +# mixed EOL styles, which can't be commited to the SVN repository. +# Stuff included from template and "cnf" files has "\r\n" on windows, while +# the generated stuff has "\n". + +fix_eol: generate_dissector + move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp + move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp + $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c + $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h + del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp + +copy_files: generate_dissector fix_eol + xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y + xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y + diff --git a/asn1/qsig/packet-qsig-template.c b/asn1/qsig/packet-qsig-template.c new file mode 100644 index 0000000000..7cbbd98b34 --- /dev/null +++ b/asn1/qsig/packet-qsig-template.c @@ -0,0 +1,815 @@ +/* packet-qsig.c + * Routines for QSIG packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <epan/packet.h> +#include <epan/prefs.h> +#include <epan/strutil.h> +#include <epan/emem.h> + +#include "packet-ber.h" +#include "packet-qsig.h" + +#define PNAME "QSIG" +#define PSNAME "QSIG" +#define PFNAME "qsig" + +/* Shifted codeset values */ +#define CS0 0x000 +#define CS1 0x100 +#define CS2 0x200 +#define CS3 0x300 +#define CS4 0x400 +#define CS5 0x500 +#define CS6 0x600 +#define CS7 0x700 + +#define QSIG_IE_TRANSIT_COUNTER 0x31 +#define QSIG_IE_PARTY_CATEGORY 0x32 + +static const value_string qsig_str_ie_type_cs4[] = { + { QSIG_IE_TRANSIT_COUNTER , "Transit counter" }, + { 0, NULL} +}; +static const value_string qsig_str_ie_type_cs5[] = { + { QSIG_IE_PARTY_CATEGORY , "Party category" }, + { 0, NULL} +}; +/* Codeset array */ +static const value_string *qsig_str_ie_type[] = { + NULL, + NULL, + NULL, + NULL, + qsig_str_ie_type_cs4, + qsig_str_ie_type_cs5, + NULL, + NULL, +}; + + +static const value_string qsig_str_pc[] = { + { 0x00 , "unknown" }, + { 0x01 , "extension" }, + { 0x02 , "operator" }, + { 0x03 , "emergency extension" }, + { 0, NULL} +}; + +const value_string qsig_str_service[] = { + { 13868, "QSIG-NA" }, + { 13873, "QSIG-CF" }, + { 13874, "QSIG-PR" }, + { 13869, "QSIG-CT" }, + { 13870, "QSIG-CC" }, + { 14843, "QSIG-CO" }, + { 14844, "QSIG-DND(O)" }, + { 14846, "QSIG-CI" }, + { 15050, "QSIG-AOC" }, + { 15052, "QSIG-RE" }, + { 15054, "QSIG-CINT" }, + { 15506, "QSIG-MWI" }, + { 15507, "SYNC-SIG" }, + { 15772, "QSIG-CMN" }, + { 15992, "QSIG-CPI(P)" }, + { 17876, "QSIG-PUMR" }, + { 17878, "QSIG-PUMCH" }, + { 19460, "QSIG-SSCT" }, + { 15429, "QSIG-WTMLR" }, + { 15431, "QSIG-WTMCH" }, + { 15433, "QSIG-WTMAU" }, + { 21407, "QSIG-SD" }, + { 21889, "QSIG-CIDL" }, + { 325, "QSIG-SMS" }, + { 344, "QSIG-MCR" }, + { 3471, "QSIG-MCM" }, + { 3472, "QSIG-MID" }, + { 0, NULL} +}; + +const value_string qsig_str_service_name[] = { + { 13868, "Name-Operations" }, + { 13873, "Call-Diversion-Operations" }, + { 13874, "Path-Replacement-Operations" }, + { 13869, "Call-Transfer-Operations" }, + { 13870, "SS-CC-Operations" }, + { 14843, "Call-Offer-Operations" }, + { 14844, "Do-Not-Disturb-Operations" }, + { 14846, "Call-Intrusion-Operations" }, + { 15050, "SS-AOC-Operation" }, + { 15052, "Recall-Operation" }, + { 15054, "Call-Interception-Operations" }, + { 15506, "SS-MWI-Operations" }, + { 15507, "Synchronization-Operations" }, + { 15772, "Common-Information-Operations" }, + { 15992, "Call-Interruption-Operation" }, + { 17876, "PUM-Registration-Operation" }, + { 17878, "Private-User-Mobility-Call-Handling-Operations" }, + { 19460, "Single-Step-Call-Transfer-Operations" }, + { 15429, "WTM-Location-Registration-Operations" }, + { 15431, "Wireless-Terminal-Call-Handling-Operations" }, + { 15433, "WTM-Authentication-Operations" }, + { 21407, "SS-SD-Operations" }, + { 21889, "Call-Identification-and-Call-Linkage-Operations" }, + { 325, "Short-Message-Service-Operations" }, + { 344, "SS-MCR-Operations" }, + { 3471, "SS-MCM-Operations" }, + { 3472, "SS-MID-Operations" }, + { 0, NULL} +}; + +const value_string qsig_str_operation[] = { + { 0, "callingName" }, + { 1, "calledName" }, + { 2, "connectedName" }, + { 3, "busyName" }, + { 4, "pathReplacePropose" }, + { 5, "pathReplaceSetup" }, + { 6, "pathReplaceRetain" }, + { 7, "callTransferIdentify" }, + { 8, "callTransferAbandon" }, + { 9, "callTransferInitiate" }, + { 10, "callTransferSetup" }, + { 11, "callTransferActive" }, + { 12, "callTransferComplete" }, + { 13, "callTransferUpdate" }, + { 14, "subaddressTransfer" }, + { 15, "activateDiversionQ" }, + { 16, "deactivateDiversionQ" }, + { 17, "interrogateDiversionQ" }, + { 18, "checkRestriction" }, + { 19, "callRerouteing" }, + { 20, "divertingLegInformation1" }, + { 21, "divertingLegInformation2" }, + { 22, "divertingLegInformation3" }, + { 23, "cfnrDivertedLegFailed" }, +/* 24 Reserved (corresponding integer value used by ISO for MLPP) */ +/* 25 Reserved (corresponding integer value used by ISO for MLPP) */ +/* 26 Reserved (corresponding integer value used by ISO for MLPP) */ + { 27, "ccnrRequest" }, + { 28, "ccCancel" }, + { 29, "ccExecPossible" }, + { 30, "ccPathReserve" }, + { 31, "ccRingout" }, + { 32, "ccSuspend" }, + { 33, "ccResume" }, + { 34, "callOfferRequest" }, + { 35, "doNotDisturbActivateQ" }, + { 36, "doNotDisturbDeactivateQ" }, + { 37, "doNotDisturbInterrogateQ" }, + { 38, "doNotDisturbOverrideQ" }, + { 39, "doNotDisturbOvrExecuteQ" }, + { 40, "ccbsRequest" }, + { 41, "pathRetain" }, /* common for QSIG-CO, QSIG-DND(O), QSIG-CI */ + { 42, "serviceAvailable" }, /* common for QSIG-CO, QSIG-DND(O), QSIG-CI */ + { 43, "callIntrusionRequest" }, + { 44, "callIntrusionGetCIPL" }, + { 45, "callIntrusionIsolate" }, + { 46, "callIntrusionForcedRelease" }, + { 47, "callIntrusionWOBRequest" }, + { 48, "callIntrusionCompleted" }, + { 49, "cfbOverride" }, /* common for QSIG-CO, QSIG-CI */ + { 50, "locUpdate" }, + { 51, "locDelete" }, + { 52, "locDeReg" }, + { 53, "pisnEnquiry" }, + { 54, "wtmiEnquiry" }, + { 55, "wtmiDivert" }, + { 56, "wtmiInform" }, + { 57, "recallAlerting" }, + { 58, "recallAnswered" }, + { 59, "chargeRequest" }, + { 60, "getFinalCharge" }, + { 61, "aocFinal" }, + { 62, "aocInterim" }, + { 63, "aocRate" }, + { 64, "aocComplete" }, + { 65, "aocDivChargeReq" }, + { 66, "cintLegInformation1" }, + { 67, "cintLegInformation2" }, + { 68, "cintCondition" }, + { 69, "cintDisable" }, + { 70, "cintEnable" }, + { 71, "wtmoCall" }, + { 72, "authWtmUser" }, + { 73, "getWtatParam" }, + { 74, "wtatParamEnq" }, + { 75, "getWtanParam" }, + { 76, "wtanParamEnq" }, + { 77, "transferAuthParam" }, + { 78, "synchronizationRequest" }, + { 79, "synchronizationInfo" }, + { 80, "mwiActivate/mCMNewMsg" }, /* common for QSIG-MWI, QSIG-MCM */ + { 81, "mwiDeactivate/mCMNoNewMsg" }, /* common for QSIG-MWI, QSIG-MCM */ + { 82, "mwiInterrogate/mCMUpdateReq" }, /* common for QSIG-MWI, QSIG-MCM */ +/* 83 Reserved (corresponding integer value used by ISO for RRC) ISO/IEC 13241 */ + { 84, "cmnRequest" }, + { 85, "cmnInform" }, + { 86, "pathReplaceInvite" }, + { 87, "callInterruptionRequest" }, + { 88, "callProtectionRequest" }, + { 89, "pumRegistr" }, + { 90, "pumDelReg" }, + { 91, "pumDe-reg" }, + { 92, "pumInterrog" }, + { 93, "pumiEnquiry" }, + { 94, "pumiDivert" }, + { 95, "pumiInform" }, + { 96, "pumoCall" }, + { 97, "getRRCInf" }, + { 98, "locInfoCheck" }, + { 99, "ssctInitiate" }, + { 100, "ssctSetup" }, + { 101, "ssctPostDial" }, + { 102, "ssctDigitInfo" }, + { 103, "display" }, + { 104, "keypad" }, + { 105, "callIdentificationAssign" }, + { 106, "callIdentificationUpdate" }, + { 107, "smsSubmit" }, + { 108, "smsDeliver" }, + { 109, "smsStatusReport" }, + { 110, "smsCommand" }, + { 111, "scAlert" }, + { 112, "mCRequest" }, + { 113, "mCAlerting" }, + { 114, "mCInform" }, + { 115, "mCMUpdate" }, + { 116, "mCMService" }, + { 117, "mCMInterrogate" }, + { 118, "mCMailboxFull" }, + { 119, "mIDMailboxAuth" }, + { 120, "mIDMailboxID" }, + { 0, NULL} +}; + + +void dissect_qsig_arg(tvbuff_t*, packet_info*, proto_tree*, guint32); +#define FNABODY(x) static void dissect_qsig_arg##x(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) \ + { dissect_qsig_arg(tvb, pinfo, tree, (x)); } + +void dissect_qsig_res(tvbuff_t*, packet_info*, proto_tree*, guint32); +#define FNRBODY(x) static void dissect_qsig_res##x(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) \ + { dissect_qsig_res(tvb, pinfo, tree, (x)); } + +/* QSIG-NA */ +FNABODY(0) FNRBODY(0) +FNABODY(1) FNRBODY(1) +FNABODY(2) FNRBODY(2) +FNABODY(3) FNRBODY(3) +/* QSIG-CF */ +FNABODY(15) FNRBODY(15) +FNABODY(16) FNRBODY(16) +FNABODY(17) FNRBODY(17) +FNABODY(18) FNRBODY(18) +FNABODY(19) FNRBODY(19) +FNABODY(20) FNRBODY(20) +FNABODY(21) FNRBODY(21) +FNABODY(22) FNRBODY(22) +FNABODY(23) FNRBODY(23) +/* QSIG-PR */ +FNABODY(4) FNRBODY(4) +FNABODY(5) FNRBODY(5) +FNABODY(6) FNRBODY(6) +FNABODY(86) FNRBODY(86) +/* QSIG-CT */ +FNABODY(7) FNRBODY(7) +FNABODY(8) FNRBODY(8) +FNABODY(9) FNRBODY(9) +FNABODY(10) FNRBODY(10) +FNABODY(11) FNRBODY(11) +FNABODY(12) FNRBODY(12) +FNABODY(13) FNRBODY(13) +FNABODY(14) FNRBODY(14) +/* QSIG-CC */ +FNABODY(40) FNRBODY(40) +FNABODY(27) FNRBODY(27) +FNABODY(28) FNRBODY(28) +FNABODY(29) FNRBODY(29) +FNABODY(30) FNRBODY(30) +FNABODY(31) FNRBODY(31) +FNABODY(32) FNRBODY(32) +FNABODY(33) FNRBODY(33) +/* QSIG-CO */ +FNABODY(34) FNRBODY(34) +/* see common for QSIG-CO, QSIG-DND(O), QSIG-CI */ +/* QSIG-DND(O) */ +FNABODY(35) FNRBODY(35) +FNABODY(36) FNRBODY(36) +FNABODY(37) FNRBODY(37) +FNABODY(38) FNRBODY(38) +FNABODY(39) FNRBODY(39) +/* see common for QSIG-CO, QSIG-DND(O), QSIG-CI */ +/* QSIG-CI */ +FNABODY(43) FNRBODY(43) +FNABODY(44) FNRBODY(44) +FNABODY(45) FNRBODY(45) +FNABODY(46) FNRBODY(46) +FNABODY(47) FNRBODY(47) +FNABODY(48) FNRBODY(48) +/* QSIG-AOC */ +FNABODY(59) FNRBODY(59) +FNABODY(60) FNRBODY(60) +FNABODY(61) FNRBODY(61) +FNABODY(62) FNRBODY(62) +FNABODY(63) FNRBODY(63) +FNABODY(64) FNRBODY(64) +FNABODY(65) FNRBODY(65) +/* QSIG-RE */ +FNABODY(57) FNRBODY(57) +FNABODY(58) FNRBODY(58) +/* QSIG-CINT */ +FNABODY(66) FNRBODY(66) +FNABODY(67) FNRBODY(67) +FNABODY(68) FNRBODY(68) +FNABODY(69) FNRBODY(69) +FNABODY(70) FNRBODY(70) +/* QSIG-MWI */ +/* see common for QSIG-MWI, QSIG-MCM */ +/* SYNC-SIG */ +FNABODY(78) FNRBODY(78) +FNABODY(79) FNRBODY(79) +/* QSIG-CMN */ +FNABODY(84) FNRBODY(84) +FNABODY(85) FNRBODY(85) +/* QSIG-CPI(P) */ +FNABODY(87) FNRBODY(87) +FNABODY(88) FNRBODY(88) +/* QSIG-PUMR */ +FNABODY(89) FNRBODY(89) +FNABODY(90) FNRBODY(90) +FNABODY(91) FNRBODY(91) +FNABODY(92) FNRBODY(92) +/* QSIG-PUMCH */ +FNABODY(93) FNRBODY(93) +FNABODY(94) FNRBODY(94) +FNABODY(95) FNRBODY(95) +FNABODY(96) FNRBODY(96) +/* QSIG-SSCT */ +FNABODY(99) FNRBODY(99) +FNABODY(100) FNRBODY(100) +FNABODY(101) FNRBODY(101) +FNABODY(102) FNRBODY(102) +/* QSIG-WTMLR */ +FNABODY(50) FNRBODY(50) +FNABODY(51) FNRBODY(51) +FNABODY(52) FNRBODY(52) +FNABODY(53) FNRBODY(53) +FNABODY(97) FNRBODY(97) +FNABODY(98) FNRBODY(98) +/* QSIG-WTMCH */ +FNABODY(54) FNRBODY(54) +FNABODY(55) FNRBODY(55) +FNABODY(56) FNRBODY(56) +FNABODY(71) FNRBODY(71) +/* QSIG-WTMAU */ +FNABODY(72) FNRBODY(72) +FNABODY(73) FNRBODY(73) +FNABODY(74) FNRBODY(74) +FNABODY(75) FNRBODY(75) +FNABODY(76) FNRBODY(76) +FNABODY(77) FNRBODY(77) +/* QSIG-SD */ +FNABODY(103) FNRBODY(103) +FNABODY(104) FNRBODY(104) +/* QSIG-CIDL */ +FNABODY(105) FNRBODY(105) +FNABODY(106) FNRBODY(106) +/* QSIG-SMS */ +FNABODY(107) FNRBODY(107) +FNABODY(108) FNRBODY(108) +FNABODY(109) FNRBODY(109) +FNABODY(110) FNRBODY(110) +FNABODY(111) FNRBODY(111) +/* QSIG-MCR */ +FNABODY(112) FNRBODY(112) +FNABODY(113) FNRBODY(113) +FNABODY(114) FNRBODY(114) +/* QSIG-MCM */ +FNABODY(115) FNRBODY(115) +FNABODY(116) FNRBODY(116) +FNABODY(117) FNRBODY(117) +FNABODY(118) FNRBODY(118) +/* QSIG-MID */ +FNABODY(119) FNRBODY(119) +FNABODY(120) FNRBODY(120) +/* common for QSIG-CO, QSIG-DND(O), QSIG-CI */ +FNABODY(41) FNRBODY(41) +FNABODY(42) FNRBODY(42) +FNABODY(49) FNRBODY(49) +/* common for QSIG-MWI, QSIG-MCM */ +FNABODY(80) FNRBODY(80) +FNABODY(81) FNRBODY(81) +FNABODY(82) FNRBODY(82) + + +typedef guint32 (*pdu_fn)(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset); + +typedef struct _qsig_op { + guint32 service; + dissector_t arg_dissector; + dissector_t res_dissector; + dissector_t arg_pdu; + dissector_t res_pdu; +} qsig_op; +#define FNA(x) dissect_qsig_arg##x +#define FNR(x) dissect_qsig_res##x + +/* Initialize the protocol and registered fields */ +int proto_qsig = -1; +static int hf_qsig_operation = -1; +static int hf_qsig_service = -1; +static int hf_qsig_ie_type = -1; +static int hf_qsig_ie_type_cs4 = -1; +static int hf_qsig_ie_type_cs5 = -1; +static int hf_qsig_ie_len = -1; +static int hf_qsig_ie_data = -1; +static int hf_qsig_tc = -1; +static int hf_qsig_pc = -1; +#include "packet-qsig-hf.c" + +static int *hf_qsig_ie_type_arr[] = { + NULL, + NULL, + NULL, + NULL, + &hf_qsig_ie_type_cs4, + &hf_qsig_ie_type_cs5, + NULL, + NULL, +}; + +/* Initialize the subtree pointers */ +static gint ett_qsig = -1; +static gint ett_qsig_ie = -1; +#include "packet-qsig-ett.c" + +/* Preferences */ + +/* Subdissectors */ +static dissector_handle_t data_handle = NULL; + +/* Gloabl variables */ + + +#include "packet-qsig-fn.c" + + +static qsig_op qsig_tab[] = { + /* 0 */ { 13868, FNA( 0), FNR( 0), dissect_NameArg_PDU, NULL }, + /* 1 */ { 13868, FNA( 1), FNR( 1), dissect_NameArg_PDU, NULL }, + /* 2 */ { 13868, FNA( 2), FNR( 2), dissect_NameArg_PDU, NULL }, + /* 3 */ { 13868, FNA( 3), FNR( 3), dissect_NameArg_PDU, NULL }, + /* 4 */ { 13874, FNA( 4), FNR( 4), NULL, NULL }, + /* 5 */ { 13874, FNA( 5), FNR( 5), NULL, NULL }, + /* 6 */ { 13874, FNA( 6), FNR( 6), NULL, NULL }, + /* 7 */ { 13869, FNA( 7), FNR( 7), NULL, NULL }, + /* 8 */ { 13869, FNA( 8), FNR( 8), NULL, NULL }, + /* 9 */ { 13869, FNA( 9), FNR( 9), NULL, NULL }, + /* 10 */ { 13869, FNA( 10), FNR( 10), NULL, NULL }, + /* 11 */ { 13869, FNA( 11), FNR( 11), NULL, NULL }, + /* 12 */ { 13869, FNA( 12), FNR( 12), NULL, NULL }, + /* 13 */ { 13869, FNA( 13), FNR( 13), NULL, NULL }, + /* 14 */ { 13869, FNA( 14), FNR( 14), NULL, NULL }, + /* 15 */ { 13873, FNA( 15), FNR( 15), dissect_ActivateDivArg_PDU, dissect_ActivateDivRes_PDU }, + /* 16 */ { 13873, FNA( 16), FNR( 16), dissect_DeactivateDivArg_PDU, dissect_DeactivateDivRes_PDU }, + /* 17 */ { 13873, FNA( 17), FNR( 17), dissect_InterrDivArg_PDU, dissect_IntResultList_PDU }, + /* 18 */ { 13873, FNA( 18), FNR( 18), dissect_ChkResArg_PDU, dissect_ChkResRes_PDU }, + /* 19 */ { 13873, FNA( 19), FNR( 19), dissect_CallRrArg_PDU, dissect_CallRrArg_PDU }, + /* 20 */ { 13873, FNA( 20), FNR( 20), dissect_DivLegInf1Arg_PDU, NULL }, + /* 21 */ { 13873, FNA( 21), FNR( 21), dissect_DivLegInf2Arg_PDU, NULL }, + /* 22 */ { 13873, FNA( 22), FNR( 22), dissect_DivLegInf3Arg_PDU, NULL }, + /* 23 */ { 13873, FNA( 23), FNR( 23), dissect_DivLegFailArg_PDU, NULL }, + /* 24 */ { -1, NULL, NULL, NULL, NULL }, + /* 25 */ { -1, NULL, NULL, NULL, NULL }, + /* 26 */ { -1, NULL, NULL, NULL, NULL }, + /* 27 */ { 13870, FNA( 27), FNR( 27), NULL, NULL }, + /* 28 */ { 13870, FNA( 28), FNR( 28), NULL, NULL }, + /* 29 */ { 13870, FNA( 29), FNR( 29), NULL, NULL }, + /* 30 */ { 13870, FNA( 30), FNR( 30), NULL, NULL }, + /* 31 */ { 13870, FNA( 31), FNR( 31), NULL, NULL }, + /* 32 */ { 13870, FNA( 32), FNR( 32), NULL, NULL }, + /* 33 */ { 13870, FNA( 33), FNR( 33), NULL, NULL }, + /* 34 */ { 14843, FNA( 34), FNR( 34), NULL, NULL }, + /* 35 */ { 14844, FNA( 35), FNR( 35), NULL, NULL }, + /* 36 */ { 14844, FNA( 36), FNR( 36), NULL, NULL }, + /* 37 */ { 14844, FNA( 37), FNR( 37), NULL, NULL }, + /* 38 */ { 14844, FNA( 38), FNR( 38), NULL, NULL }, + /* 39 */ { 14844, FNA( 39), FNR( 39), NULL, NULL }, + /* 40 */ { 13870, FNA( 40), FNR( 40), NULL, NULL }, + /* 41 */ { 90001, FNA( 41), FNR( 41), NULL, NULL }, + /* 42 */ { 90001, FNA( 42), FNR( 42), NULL, NULL }, + /* 43 */ { 14846, FNA( 43), FNR( 43), NULL, NULL }, + /* 44 */ { 14846, FNA( 44), FNR( 44), NULL, NULL }, + /* 45 */ { 14846, FNA( 45), FNR( 45), NULL, NULL }, + /* 46 */ { 14846, FNA( 46), FNR( 46), NULL, NULL }, + /* 47 */ { 14846, FNA( 47), FNR( 47), NULL, NULL }, + /* 48 */ { 14846, FNA( 48), FNR( 48), NULL, NULL }, + /* 49 */ { 90001, FNA( 49), FNR( 49), NULL, NULL }, + /* 50 */ { 15429, FNA( 50), FNR( 50), NULL, NULL }, + /* 51 */ { 15429, FNA( 51), FNR( 51), NULL, NULL }, + /* 52 */ { 15429, FNA( 52), FNR( 52), NULL, NULL }, + /* 53 */ { 15429, FNA( 53), FNR( 53), NULL, NULL }, + /* 54 */ { 15431, FNA( 54), FNR( 54), NULL, NULL }, + /* 55 */ { 15431, FNA( 55), FNR( 55), NULL, NULL }, + /* 56 */ { 15431, FNA( 56), FNR( 56), NULL, NULL }, + /* 57 */ { 15052, FNA( 57), FNR( 57), NULL, NULL }, + /* 58 */ { 15052, FNA( 58), FNR( 58), NULL, NULL }, + /* 59 */ { 15050, FNA( 59), FNR( 59), NULL, NULL }, + /* 60 */ { 15050, FNA( 60), FNR( 60), NULL, NULL }, + /* 61 */ { 15050, FNA( 61), FNR( 61), NULL, NULL }, + /* 62 */ { 15050, FNA( 62), FNR( 62), NULL, NULL }, + /* 63 */ { 15050, FNA( 63), FNR( 63), NULL, NULL }, + /* 64 */ { 15050, FNA( 64), FNR( 64), NULL, NULL }, + /* 65 */ { 15050, FNA( 65), FNR( 65), NULL, NULL }, + /* 66 */ { 15054, FNA( 66), FNR( 66), NULL, NULL }, + /* 67 */ { 15054, FNA( 67), FNR( 67), NULL, NULL }, + /* 68 */ { 15054, FNA( 68), FNR( 68), NULL, NULL }, + /* 69 */ { 15054, FNA( 69), FNR( 69), NULL, NULL }, + /* 70 */ { 15054, FNA( 70), FNR( 70), NULL, NULL }, + /* 71 */ { 15431, FNA( 71), FNR( 71), NULL, NULL }, + /* 72 */ { 15433, FNA( 72), FNR( 72), NULL, NULL }, + /* 73 */ { 15433, FNA( 73), FNR( 73), NULL, NULL }, + /* 74 */ { 15433, FNA( 74), FNR( 74), NULL, NULL }, + /* 75 */ { 15433, FNA( 75), FNR( 75), NULL, NULL }, + /* 76 */ { 15433, FNA( 76), FNR( 76), NULL, NULL }, + /* 77 */ { 15433, FNA( 77), FNR( 77), NULL, NULL }, + /* 78 */ { 15507, FNA( 78), FNR( 78), NULL, NULL }, + /* 79 */ { 15507, FNA( 79), FNR( 79), NULL, NULL }, + /* 80 */ { 90002, FNA( 80), FNR( 80), NULL, NULL }, + /* 81 */ { 90002, FNA( 81), FNR( 81), NULL, NULL }, + /* 82 */ { 90002, FNA( 82), FNR( 82), NULL, NULL }, + /* 83 */ { -1, NULL, NULL, NULL, NULL }, + /* 84 */ { 15772, FNA( 84), FNR( 84), NULL, NULL }, + /* 85 */ { 15772, FNA( 85), FNR( 85), NULL, NULL }, + /* 86 */ { 13874, FNA( 86), FNR( 86), NULL, NULL }, + /* 87 */ { 15992, FNA( 87), FNR( 87), NULL, NULL }, + /* 88 */ { 15992, FNA( 88), FNR( 88), NULL, NULL }, + /* 89 */ { 17876, FNA( 89), FNR( 89), NULL, NULL }, + /* 90 */ { 17876, FNA( 90), FNR( 90), NULL, NULL }, + /* 91 */ { 17876, FNA( 91), FNR( 91), NULL, NULL }, + /* 92 */ { 17876, FNA( 92), FNR( 92), NULL, NULL }, + /* 93 */ { 17878, FNA( 93), FNR( 93), NULL, NULL }, + /* 94 */ { 17878, FNA( 94), FNR( 94), NULL, NULL }, + /* 95 */ { 17878, FNA( 95), FNR( 95), NULL, NULL }, + /* 96 */ { 17878, FNA( 96), FNR( 96), NULL, NULL }, + /* 97 */ { 15429, FNA( 97), FNR( 97), NULL, NULL }, + /* 98 */ { 15429, FNA( 98), FNR( 98), NULL, NULL }, + /* 99 */ { 19460, FNA( 99), FNR( 99), NULL, NULL }, + /* 100 */ { 19460, FNA(100), FNR(100), NULL, NULL }, + /* 101 */ { 19460, FNA(101), FNR(101), NULL, NULL }, + /* 102 */ { 19460, FNA(102), FNR(102), NULL, NULL }, + /* 103 */ { 21407, FNA(103), FNR(103), NULL, NULL }, + /* 104 */ { 21407, FNA(104), FNR(104), NULL, NULL }, + /* 105 */ { 21889, FNA(105), FNR(105), NULL, NULL }, + /* 106 */ { 21889, FNA(106), FNR(106), NULL, NULL }, + /* 107 */ { 325, FNA(107), FNR(107), NULL, NULL }, + /* 108 */ { 325, FNA(108), FNR(108), NULL, NULL }, + /* 109 */ { 325, FNA(109), FNR(109), NULL, NULL }, + /* 110 */ { 325, FNA(110), FNR(110), NULL, NULL }, + /* 111 */ { 325, FNA(111), FNR(111), NULL, NULL }, + /* 112 */ { 344, FNA(112), FNR(112), NULL, NULL }, + /* 113 */ { 344, FNA(113), FNR(113), NULL, NULL }, + /* 114 */ { 344, FNA(114), FNR(114), NULL, NULL }, + /* 115 */ { 3471, FNA(115), FNR(115), NULL, NULL }, + /* 116 */ { 3471, FNA(116), FNR(116), NULL, NULL }, + /* 117 */ { 3471, FNA(117), FNR(117), NULL, NULL }, + /* 118 */ { 3471, FNA(118), FNR(118), NULL, NULL }, + /* 119 */ { 3472, FNA(119), FNR(119), NULL, NULL }, + /* 120 */ { 3472, FNA(120), FNR(120), NULL, NULL }, +}; + +/*--- dissect_qsig_arg ------------------------------------------------------*/ +/*static*/ void +dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 operation) { + gint offset; + const gchar *p; + proto_item *ti, *ti_tmp; + proto_tree *qsig_tree; + + offset = 0; + ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_length(tvb), FALSE); + qsig_tree = proto_item_add_subtree(ti, ett_qsig); + + proto_tree_add_uint(qsig_tree, hf_qsig_operation, tvb, 0, 0, operation); + p = match_strval(operation, VALS(qsig_str_operation)); + if (p) { + proto_item_append_text(ti, ": %s", p); + proto_item_append_text(proto_item_get_parent(proto_tree_get_parent(tree)), " %s", p); + } + if (operation >= array_length(qsig_tab)) return; + if (qsig_tab[operation].service != -1) { + ti_tmp = proto_tree_add_uint(qsig_tree, hf_qsig_service, tvb, 0, 0, qsig_tab[operation].service); + p = match_strval(qsig_tab[operation].service, VALS(qsig_str_service_name)); + if (p) proto_item_append_text(ti_tmp, " - %s", p); + } + if (qsig_tab[operation].arg_pdu) + qsig_tab[operation].arg_pdu(tvb, pinfo, qsig_tree); + else + if (tvb_length_remaining(tvb, offset) > 0) + proto_tree_add_text(qsig_tree, tvb, offset, tvb_length_remaining(tvb, offset), "UNSUPPORTED ARGUMENT TYPE (QSIG)"); +} + +/*--- dissect_qsig_res -------------------------------------------------------*/ +/*static*/ void +dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 operation) { + gint offset; + const gchar *p; + proto_item *ti, *ti_tmp; + proto_tree *qsig_tree; + + offset = 0; + ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_length(tvb), FALSE); + qsig_tree = proto_item_add_subtree(ti, ett_qsig); + + proto_tree_add_uint(qsig_tree, hf_qsig_operation, tvb, 0, 0, operation); + p = match_strval(operation, VALS(qsig_str_operation)); + if (p) { + proto_item_append_text(ti, ": %s", p); + proto_item_append_text(proto_item_get_parent(proto_tree_get_parent(tree)), " %s", p); + } + if (operation >= array_length(qsig_tab)) return; + if (qsig_tab[operation].service != -1) { + ti_tmp = proto_tree_add_uint(qsig_tree, hf_qsig_service, tvb, 0, 0, qsig_tab[operation].service); + p = match_strval(qsig_tab[operation].service, VALS(qsig_str_service_name)); + if (p) proto_item_append_text(ti_tmp, " - %s", p); + } + if (qsig_tab[operation].res_pdu) + qsig_tab[operation].res_pdu(tvb, pinfo, qsig_tree); + else + if (tvb_length_remaining(tvb, offset) > 0) + proto_tree_add_text(qsig_tree, tvb, offset, tvb_length_remaining(tvb, offset), "UNSUPPORTED RESULT TYPE (QSIG)"); +} + +/*--- dissect_qsig_transit_counter_ie ---------------------------------------*/ +static int +dissect_qsig_transit_counter_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + proto_tree_add_item(tree, hf_qsig_tc, tvb, offset, 1, FALSE); + offset++; + return offset; +} +/*--- dissect_qsig_party_category_ie ----------------------------------------*/ +static int +dissect_qsig_party_category_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + proto_tree_add_item(tree, hf_qsig_pc, tvb, offset, 1, FALSE); + offset++; + return offset; +} + +/*--- dissect_qsig_ie -------------------------------------------------------*/ +static void +dissect_qsig_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int codeset) { + gint offset; + proto_item *ti, *ti_ie; + proto_tree *ie_tree; + guint8 ie_type, ie_len; + + offset = 0; + + ti = proto_tree_add_item_hidden(tree, proto_qsig, tvb, offset, -1, FALSE); + + ie_type = tvb_get_guint8(tvb, offset); + ie_len = tvb_get_guint8(tvb, offset + 1); + + ti_ie = proto_tree_add_text(tree, tvb, offset, -1, "%s", + val_to_str(ie_type, VALS(qsig_str_ie_type[codeset]), "unknown (0x%02X)")); + ie_tree = proto_item_add_subtree(ti_ie, ett_qsig_ie); + proto_tree_add_item(ie_tree, *hf_qsig_ie_type_arr[codeset], tvb, offset, 1, FALSE); + proto_tree_add_item_hidden(ie_tree, hf_qsig_ie_type, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_qsig_ie_len, tvb, offset + 1, 1, FALSE); + offset += 2; + if (tvb_length_remaining(tvb, offset) <= 0) + return; + switch ((codeset << 8) | ie_type) { + case CS4 | QSIG_IE_TRANSIT_COUNTER : + dissect_qsig_transit_counter_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + case CS5 | QSIG_IE_PARTY_CATEGORY : + dissect_qsig_party_category_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + default: + if (ie_len > 0) { + if (tree) proto_tree_add_item(ie_tree, hf_qsig_ie_data, tvb, offset, ie_len, FALSE); + } + } +} +/*--- dissect_qsig_ie_cs4 ---------------------------------------------------*/ +static void +dissect_qsig_ie_cs4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + dissect_qsig_ie(tvb, pinfo, tree, 4); +} +/*--- dissect_qsig_ie_cs5 ---------------------------------------------------*/ +static void +dissect_qsig_ie_cs5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + dissect_qsig_ie(tvb, pinfo, tree, 5); +} + +/*--- proto_register_qsig ---------------------------------------------------*/ +void proto_register_qsig(void) { + + /* List of fields */ + static hf_register_info hf[] = { + { &hf_qsig_operation, { "Operation", "qsig.operation", + FT_UINT8, BASE_DEC, VALS(qsig_str_operation), 0x0, + "Operation", HFILL }}, + { &hf_qsig_service, { "Service", "qsig.service", + FT_UINT8, BASE_DEC, VALS(qsig_str_service), 0x0, + "Supplementary Service", HFILL }}, + { &hf_qsig_ie_type, { "Type", "qsig.ie.type", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Information Element Type", HFILL }}, + { &hf_qsig_ie_type_cs4, { "Type", "qsig.ie.type.cs4", + FT_UINT8, BASE_HEX, VALS(qsig_str_ie_type_cs4), 0x0, + "Information Element Type (Codeset 4)", HFILL }}, + { &hf_qsig_ie_type_cs5, { "Type", "qsig.ie.type.cs5", + FT_UINT8, BASE_HEX, VALS(qsig_str_ie_type_cs5), 0x0, + "Information Element Type (Codeset 5)", HFILL }}, + { &hf_qsig_ie_len, { "Length", "qsig.ie.len", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Information Element Length", HFILL }}, + { &hf_qsig_ie_data, { "Data", "qsig.ie.data", + FT_BYTES, BASE_HEX, NULL, 0x0, + "Data", HFILL }}, + { &hf_qsig_tc, { "Transit count", "qsig.tc", + FT_UINT8, BASE_DEC, NULL, 0x1F, + "Transit count", HFILL }}, + { &hf_qsig_pc, { "Party category", "qsig.pc", + FT_UINT8, BASE_HEX, VALS(qsig_str_pc), 0x07, + "Party category", HFILL }}, +#include "packet-qsig-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_qsig, + &ett_qsig_ie, +#include "packet-qsig-ettarr.c" + }; + + /* Register protocol and dissector */ + proto_qsig = proto_register_protocol(PNAME, PSNAME, PFNAME); + + /* Register fields and subtrees */ + proto_register_field_array(proto_qsig, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + + +/*--- proto_reg_handoff_qsig ------------------------------------------------*/ +void proto_reg_handoff_qsig(void) { + guint32 op; + dissector_handle_t qsig_op_handle; + dissector_handle_t qsig_ie_handle; + + data_handle = find_dissector("data"); + + if (find_dissector_table("q932.ros.local.arg")) { + for (op=0; op<array_length(qsig_tab); op++) { + if (qsig_tab[op].arg_dissector) { + qsig_op_handle = create_dissector_handle(qsig_tab[op].arg_dissector, proto_qsig); + dissector_add("q932.ros.local.arg", op, qsig_op_handle); + } + if (qsig_tab[op].res_dissector) { + qsig_op_handle = create_dissector_handle(qsig_tab[op].res_dissector, proto_qsig); + dissector_add("q932.ros.local.res", op, qsig_op_handle); + } + } + } + + qsig_ie_handle = create_dissector_handle(dissect_qsig_ie_cs4, proto_qsig); + /* QSIG-TC - Transit counter */ + dissector_add("q931.ie", CS4 | QSIG_IE_TRANSIT_COUNTER, qsig_ie_handle); + + qsig_ie_handle = create_dissector_handle(dissect_qsig_ie_cs5, proto_qsig); + /* SSIG-BC - Party category */ + dissector_add("q931.ie", CS5 | QSIG_IE_PARTY_CATEGORY, qsig_ie_handle); + +} + +/*---------------------------------------------------------------------------*/
\ No newline at end of file diff --git a/asn1/qsig/packet-qsig-template.h b/asn1/qsig/packet-qsig-template.h new file mode 100644 index 0000000000..ecff8fb7bd --- /dev/null +++ b/asn1/qsig/packet-qsig-template.h @@ -0,0 +1,32 @@ +/* packet-qsig.h + * Routines for QSIG packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef PACKET_QSIG_H +#define PACKET_QSIG_H + +#include "packet-qsig-exp.h" + +#endif /* PACKET_QSIG_H */ + diff --git a/asn1/qsig/qsig-cf.asn b/asn1/qsig/qsig-cf.asn new file mode 100644 index 0000000000..80a42da689 --- /dev/null +++ b/asn1/qsig/qsig-cf.asn @@ -0,0 +1,440 @@ +-- QSIG-CF.asn +-- +-- Taken from Ecma International +-- http://www.ecma-international.org/publications/standards/Ecma-174.htm +-- +-- $Id$ +-- + +Call-Diversion-Operations-asn1-97 {iso(1) standard(0) + pss1-call-diversion(13873) call-diversion-operations-asn1-97(1)} DEFINITIONS +EXPLICIT TAGS ::= +BEGIN + +IMPORTS + OPERATION, ERROR + FROM Remote-Operations-Information-Objects {joint-iso-itu-t + remote-operations(4) informationObjects(5) version1(0)} + EXTENSION, Extension{} + FROM Manufacturer-specific-service-extension-class-asn1-97 {iso(1) + standard(0) pss1-generic-procedures(11582) msi-class-asn1-97(11)} + PSS1InformationElement + FROM PSS1-generic-parameters-definition-asn1-97 {iso(1) standard(0) + pss1-generic-procedures(11582) pss1-generic-parameters-asn1-97(17)} + Address, PartyNumber, PartySubaddress, PresentedNumberScreened, + PresentedNumberUnscreened, PresentationAllowedIndicator + FROM Addressing-Data-Elements-asn1-97 {iso(1) standard(0) + pss1-generic-procedures(11582) addressing-data-elements-asn1-97(20)} + Name + FROM Name-Operations-asn1-97 {iso(1) standard(0) pss1-name(13868) + name-operations-asn1-97(1)} + userNotSubscribed, notAvailable, invalidServedUserNr, + basicServiceNotProvided, resourceUnavailable, + supplementaryServiceInteractionNotAllowed + FROM General-Error-List {ccitt recommendation q 950 general-error-list(1)}; + +--Call-Diversion-Operations OPERATION ::= +-- {activateDiversionQ | deactivateDiversionQ | interrogateDiversionQ | +-- checkRestriction | callRerouteing | divertingLegInformation1 | +-- divertingLegInformation2 | divertingLegInformation3 | cfnrDivertedLegFailed} + +--activateDiversionQ OPERATION ::= { + -- Sent from the Activating PINX to the Served User PINX +-- ARGUMENT +-- SEQUENCE {procedure Procedure, +-- basicService BasicService, +-- divertedToAddress Address, +-- servedUserNr PartyNumber, +-- activatingUserNr PartyNumber, +-- extension +-- CHOICE {single +-- [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} +-- RESULT +-- CHOICE {null NULL, +-- single [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF Extension{{DiversionExtensionSet}}} +-- ERRORS +-- {userNotSubscribed | notAvailable | invalidServedUserNr | +-- basicServiceNotProvided | resourceUnavailable | invalidDivertedToNr | +-- specialServiceNr | diversionToServedUserNr | temporarilyUnavailable | +-- notAuthorized | unspecified} +-- CODE local:15} + +ActivateDivArg ::= + SEQUENCE {procedure Procedure, + basicService BasicService, + divertedToAddress Address, + servedUserNr PartyNumber, + activatingUserNr PartyNumber, + extension + CHOICE {single + [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +ActivateDivRes ::= + CHOICE {null NULL, + single [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF Extension --{{DiversionExtensionSet}}--} + + +--deactivateDiversionQ OPERATION ::= { + -- Sent from the Deactivating PINX to the Served User PINX +-- ARGUMENT +-- SEQUENCE {procedure Procedure, +-- basicService BasicService, +-- servedUserNr PartyNumber, +-- deactivatingUserNr PartyNumber, +-- extension +-- CHOICE {single +-- [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} +-- RESULT +-- CHOICE {null NULL, +-- single [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF Extension{{DiversionExtensionSet}}} +-- ERRORS +-- {userNotSubscribed | notAvailable | invalidServedUserNr | +-- temporarilyUnavailable | notAuthorized | unspecified} +-- CODE local:16} + +DeactivateDivArg ::= + SEQUENCE {procedure Procedure, + basicService BasicService, + servedUserNr PartyNumber, + deactivatingUserNr PartyNumber, + extension + CHOICE {single + [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +DeactivateDivRes ::= + CHOICE {null NULL, + single [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF Extension --{{DiversionExtensionSet}}--} + + +--interrogateDiversionQ OPERATION ::= { + -- Sent from the Interrogating PINX to the Served User PINX +-- ARGUMENT +-- SEQUENCE {procedure Procedure, +-- basicService BasicService DEFAULT allServices, +-- servedUserNr PartyNumber, +-- interrogatingUserNr PartyNumber, +-- extension +-- CHOICE {single +-- [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} +-- RESULT IntResultList +-- ERRORS +-- {userNotSubscribed | notAvailable | invalidServedUserNr | +-- temporarilyUnavailable | notAuthorized | unspecified} +-- CODE local:17} + +InterrDivArg ::= + SEQUENCE {procedure Procedure, + basicService BasicService DEFAULT allServices, + servedUserNr PartyNumber, + interrogatingUserNr PartyNumber, + extension + CHOICE {single + [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +--checkRestriction OPERATION ::= { + -- Sent from the Served User PINX to the Diverted-to PINX +-- ARGUMENT +-- SEQUENCE {servedUserNr PartyNumber, +-- basicService BasicService, +-- divertedToNr PartyNumber, +-- extension +-- CHOICE {single +-- [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} +-- RESULT +-- CHOICE {null NULL, +-- single [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF Extension{{DiversionExtensionSet}}} +-- ERRORS +-- {notAvailable | invalidServedUserNr | invalidDivertedToNr | +-- specialServiceNr | unspecified} +-- CODE local:18} + +ChkResArg ::= + SEQUENCE {servedUserNr PartyNumber, + basicService BasicService, + divertedToNr PartyNumber, + extension + CHOICE {single + [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +ChkResRes ::= + CHOICE {null NULL, + single [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF Extension --{{DiversionExtensionSet}}--} + + +--callRerouteing OPERATION ::= { + -- Sent from the Served User PINX to the Rerouteing PINX +-- ARGUMENT +-- SEQUENCE {rerouteingReason DiversionReason, +-- originalRerouteingReason [0] IMPLICIT DiversionReason OPTIONAL, +-- calledAddress Address, +-- diversionCounter INTEGER(1..15), +-- pSS1InfoElement PSS1InformationElement, + -- The basic call information elements Bearer capability, High layer compatibility, Low + -- layer compatibity and Progress indicator can be embedded in the + -- pSS1InfoElement in accordance with 6.5.3.1.5. +-- lastRerouteingNr [1] PresentedNumberUnscreened, +-- subscriptionOption [2] IMPLICIT SubscriptionOption, +-- callingPartySubaddress [3] PartySubaddress OPTIONAL, +-- callingNumber [4] PresentedNumberScreened, +-- callingName [5] Name OPTIONAL, +-- originalCalledNr [6] PresentedNumberUnscreened OPTIONAL, +-- redirectingName [7] Name OPTIONAL, +-- originalCalledName [8] Name OPTIONAL, +-- extension +-- CHOICE {single +-- [9] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [10] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} +-- RESULT +-- CHOICE {null NULL, +-- single [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF Extension{{DiversionExtensionSet}}} +-- ERRORS +-- {userNotSubscribed | notAvailable | resourceUnavailable | +-- invalidDivertedToNr | specialServiceNr | diversionToServedUserNr | +-- numberOfDiversionsExceeded | supplementaryServiceInteractionNotAllowed | +-- unspecified} + -- The error value numberOfDiversionsExceeded applies only in case of partial rerouteing. +-- CODE local:19} + +CallRrArg ::= + SEQUENCE {rerouteingReason DiversionReason, + originalRerouteingReason [0] IMPLICIT DiversionReason OPTIONAL, + calledAddress Address, + diversionCounter INTEGER(1..15), + pSS1InfoElement PSS1InformationElement, + -- The basic call information elements Bearer capability, High layer compatibility, Low + -- layer compatibity and Progress indicator can be embedded in the + -- pSS1InfoElement in accordance with 6.5.3.1.5. + lastRerouteingNr [1] PresentedNumberUnscreened, + subscriptionOption [2] IMPLICIT SubscriptionOption, + callingPartySubaddress [3] PartySubaddress OPTIONAL, + callingNumber [4] PresentedNumberScreened, + callingName [5] Name OPTIONAL, + originalCalledNr [6] PresentedNumberUnscreened OPTIONAL, + redirectingName [7] Name OPTIONAL, + originalCalledName [8] Name OPTIONAL, + extension + CHOICE {single + [9] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [10] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +CallRrRes ::= + CHOICE {null NULL, + single [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF Extension --{{DiversionExtensionSet}}--} + + +--divertingLegInformation1 OPERATION ::= { + -- Sent from the Rerouteing PINX to the Originating PINX +-- ARGUMENT +-- SEQUENCE {diversionReason DiversionReason, +-- subscriptionOption SubscriptionOption, +-- nominatedNr PartyNumber, +-- extension +-- CHOICE {single +-- [9] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [10] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:20} + +DivLegInf1Arg ::= + SEQUENCE {diversionReason DiversionReason, + subscriptionOption SubscriptionOption, + nominatedNr PartyNumber, + extension + CHOICE {single + [9] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [10] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + + +--divertingLegInformation2 OPERATION ::= { + -- Sent from the Rerouteing PINX to the Diverted-to PINX +-- ARGUMENT +-- SEQUENCE {diversionCounter INTEGER(1..15), +-- diversionReason DiversionReason, +-- originalDiversionReason [0] IMPLICIT DiversionReason OPTIONAL, +-- divertingNr [1] PresentedNumberUnscreened OPTIONAL, +-- originalCalledNr [2] PresentedNumberUnscreened OPTIONAL, +-- redirectingName [3] Name OPTIONAL, +-- originalCalledName [4] Name OPTIONAL, +-- extension +-- CHOICE {single +-- [5] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [6] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} + -- The divertingNr element is mandatory except in the case of interworking. +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:21} + +DivLegInf2Arg ::= + SEQUENCE {diversionCounter INTEGER(1..15), + diversionReason DiversionReason, + originalDiversionReason [0] IMPLICIT DiversionReason OPTIONAL, + divertingNr [1] PresentedNumberUnscreened OPTIONAL, + originalCalledNr [2] PresentedNumberUnscreened OPTIONAL, + redirectingName [3] Name OPTIONAL, + originalCalledName [4] Name OPTIONAL, + extension + CHOICE {single + [5] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [6] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +--divertingLegInformation3 OPERATION ::= { + -- Sent from the Diverted-to PINX to the Originating PINX +-- ARGUMENT +-- SEQUENCE {presentationAllowedIndicator PresentationAllowedIndicator, +-- redirectionName [0] Name OPTIONAL, +-- extension +-- CHOICE {single +-- [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF +-- Extension{{DiversionExtensionSet}}} +-- OPTIONAL} +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:22} + +DivLegInf3Arg ::= + SEQUENCE {presentationAllowedIndicator PresentationAllowedIndicator, + redirectionName [0] Name OPTIONAL, + extension + CHOICE {single + [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF + Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +--cfnrDivertedLegFailed OPERATION ::= { + -- Sent from the Rerouteing PINX to the Served User PINX + -- This indicates that the diverted-to leg has been cleared during SS-CFNR execution. +-- ARGUMENT +-- CHOICE {null NULL, +-- single [1] IMPLICIT Extension{{DiversionExtensionSet}}, +-- multiple +-- [2] IMPLICIT SEQUENCE OF Extension{{DiversionExtensionSet}}} +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:23} + +DivLegFailArg ::= + CHOICE {null NULL, + single [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF Extension --{{DiversionExtensionSet}}--} + + +-- Definitions of general used data types: +DiversionReason ::= ENUMERATED {unknown(0), cfu(1), cfb(2), cfnr(3)} + +-- The value unknown is only used if received from another network when interworking. +IntResultList ::= SET SIZE (0..29) OF IntResult + +IntResult ::= SEQUENCE { + servedUserNr PartyNumber, + basicService BasicService, + procedure Procedure, + divertedToAddress Address, + remoteEnabled BOOLEAN DEFAULT FALSE, + extension + CHOICE {single [1] IMPLICIT Extension --{{DiversionExtensionSet}}--, + multiple + [2] IMPLICIT SEQUENCE OF Extension --{{DiversionExtensionSet}}--} + OPTIONAL} + +Procedure ::= ENUMERATED {cfu(0), cfb(1), cfnr(2)} + +SubscriptionOption ::= ENUMERATED { + noNotification(0), notificationWithoutDivertedToNr(1), + notificationWithDivertedToNr(2)} + +BasicService ::= ENUMERATED { + allServices(0), speech(1), unrestrictedDigitalInformation(2), audio3100Hz(3), + telephony(32), teletex(33), telefaxGroup4Class1(34), videotexSyntaxBased(35), + videotelephony(36)} + +--DiversionExtensionSet EXTENSION ::= {...} + +--invalidDivertedToNr ERROR ::= {CODE local:12} + +--specialServiceNr ERROR ::= {CODE local:14} + +--diversionToServedUserNr ERROR ::= {CODE local:15} + +--numberOfDiversionsExceeded ERROR ::= {CODE local:24} + +--temporarilyUnavailable ERROR ::= {CODE local:1000} + +--notAuthorized ERROR ::= {CODE local:1007} + +--unspecified ERROR ::= { +-- PARAMETER Extension {{DiversionExtensionSet}} +-- CODE local:1008} + +END -- of Call-Diversion-Operations-asn1-97
\ No newline at end of file diff --git a/asn1/qsig/qsig-exp.cnf b/asn1/qsig/qsig-exp.cnf new file mode 100644 index 0000000000..180d21c136 --- /dev/null +++ b/asn1/qsig/qsig-exp.cnf @@ -0,0 +1,21 @@ +# Do not modify this file. +# It is created automatically by the ASN.1 to Wireshark dissector compiler +# .\qsig-exp.cnf +# ../../tools/asn2wrs.py -b -T -e -p qsig -c qsig.cnf -s packet-qsig-template qsig-gf-ext.asn qsig-gf-gp.asn qsig-gf-ade.asn qsig-na.asn qsig-cf.asn + +#.MODULE +Manufacturer-specific-service-extension-class-asn1-97 qsig +PSS1-generic-parameters-definition-asn1-97 qsig +Addressing-Data-Elements-asn1-97 qsig +Name-Operations-asn1-97 qsig +Call-Diversion-Operations-asn1-97 qsig +#.END + +#.IMPORT_TAG +Name BER_CLASS_ANY/*choice*/ -1/*choice*/ +#.END + +#.TYPE_ATTR +Name TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(qsig_Name_vals) BITMASK = 0 +#.END + diff --git a/asn1/qsig/qsig-gf-ade.asn b/asn1/qsig/qsig-gf-ade.asn new file mode 100644 index 0000000000..96c1090c1c --- /dev/null +++ b/asn1/qsig/qsig-gf-ade.asn @@ -0,0 +1,132 @@ +-- QSIG-GF-EXT.asn +-- +-- Taken from Ecma International +-- http://www.ecma-international.org/publications/standards/Ecma-165.htm +-- +-- $Id$ +-- + +Addressing-Data-Elements-asn1-97 {iso(1) standard(0) + pss1-generic-procedures(11582) addressing-data-elements-asn1-97(20)} +DEFINITIONS EXPLICIT TAGS ::= +BEGIN + +PresentedAddressScreened ::= CHOICE { + presentationAllowedAddressS [0] IMPLICIT AddressScreened, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueToInterworking [2] IMPLICIT NULL, + presentationRestrictedAddressS [3] IMPLICIT AddressScreened} + +PresentedAddressUnscreened ::= CHOICE { + presentationAllowedAddressU [0] IMPLICIT Address, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueToInterworking [2] IMPLICIT NULL, + presentationRestrictedAddressU [3] IMPLICIT Address} + +PresentedNumberScreened ::= CHOICE { + presentationAllowedAddressNS [0] IMPLICIT NumberScreened, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueToInterworking [2] IMPLICIT NULL, + presentationRestrictedAddressNS [3] IMPLICIT NumberScreened} + +PresentedNumberUnscreened ::= CHOICE { + presentationAllowedAddressNU [0] PartyNumber, + presentationRestricted [1] IMPLICIT NULL, + numberNotAvailableDueToInterworking [2] IMPLICIT NULL, + presentationRestrictedAddressNU [3] PartyNumber} + +AddressScreened ::= SEQUENCE { + partyNumber PartyNumber, + screeningIndicator ScreeningIndicator, + partySubaddress PartySubaddress OPTIONAL} + +NumberScreened ::= SEQUENCE { + partyNumber PartyNumber, + screeningIndicator ScreeningIndicator} + +Address ::= SEQUENCE { + partyNumber PartyNumber, + partySubaddress PartySubaddress OPTIONAL} + +PartyNumber ::= CHOICE { + unknownPartyNumber [0] IMPLICIT NumberDigits, + -- the numbering plan is the default numbering + -- plan of the network. It is recommanded that + -- this value is used. + publicPartyNumber [1] IMPLICIT PublicPartyNumber, + -- the numbering plan is according to + -- Recommendation E.163 and E.164. + dataPartyNumber [3] IMPLICIT NumberDigits, + -- not used, value reserved. + telexPartyNumber [4] IMPLICIT NumberDigits, + -- not used, value reserved. + privatePartyNumber [5] IMPLICIT PrivatePartyNumber, + nationalStandardPartyNumber [8] IMPLICIT NumberDigits} + +-- not used, value reserved. +PublicPartyNumber ::= SEQUENCE { + publicTypeOfNumber PublicTypeOfNumber, + publicNumberDigits NumberDigits} + +PrivatePartyNumber ::= SEQUENCE { + privateTypeOfNumber PrivateTypeOfNumber, + privateNumberDigits NumberDigits} + +NumberDigits ::= NumericString(SIZE (1..20)) + +PublicTypeOfNumber ::= ENUMERATED { + unknown(0), + -- if used number digits carry prefix indicating type + -- of number according to national recommendations. + internationalNumber(1), nationalNumber(2), + networkSpecificNumber(3), + -- not used, value reserved + subscriberNumber(4), abbreviatedNumber(6)} + +-- valid only for called party number at the outgoing +-- access, network substitutes appropriate number. +PrivateTypeOfNumber ::= ENUMERATED { + unknown(0), level2RegionalNumber(1), level1RegionalNumber(2), + pISNSpecificNumber(3), localNumber(4), abbreviatedNumber(6)} + +PartySubaddress ::= CHOICE { + userSpecifiedSubaddress UserSpecifiedSubaddress, + -- not recommended. + nSAPSubaddress NSAPSubaddress} + +-- according to Recommendation X.213. +UserSpecifiedSubaddress ::= SEQUENCE { + subaddressInformation SubaddressInformation, + oddCountIndicator BOOLEAN OPTIONAL} + +-- used when the coding of subaddress is BCD +NSAPSubaddress ::= OCTET STRING(SIZE (1..20)) + +-- specified according to X.213. Some networks may +-- limit the subaddress value to some other length +-- e.g. 4 octets +SubaddressInformation ::= OCTET STRING(SIZE (1..20)) + +-- coded according to user requirements. Some networks +-- may limit the subaddress value to some other length +-- e.g. 4 octets +ScreeningIndicator ::= ENUMERATED { + userProvidedNotScreened(0), + -- number was provided by a remote user terminal + -- equipment, and has been screened by a network that + -- is not the local public or the local private + -- network. + userProvidedVerifiedAndPassed(1), + -- number was provided by a remote user terminal + -- equipment (or by a remote private network), and has + -- been screened by the local public or the local + -- private network. + userProvidedVerifiedAndFailed(2), + -- not used, value reserved. + networkProvided(3)} + +-- number was provided by local public or local +-- private network. +PresentationAllowedIndicator ::= BOOLEAN + +END -- of Addressing-Data-Elements
\ No newline at end of file diff --git a/asn1/qsig/qsig-gf-ext.asn b/asn1/qsig/qsig-gf-ext.asn new file mode 100644 index 0000000000..1c32f643df --- /dev/null +++ b/asn1/qsig/qsig-gf-ext.asn @@ -0,0 +1,36 @@ +-- QSIG-GF-EXT.asn +-- +-- Taken from Ecma International +-- http://www.ecma-international.org/publications/standards/Ecma-165.htm +-- +-- $Id$ +-- + +Manufacturer-specific-service-extension-class-asn1-97 {iso(1) standard(0) + pss1-generic-procedures(11582) msi-class-asn1-97(11)} DEFINITIONS ::= +BEGIN + +--EXTENSION ::= CLASS { +-- &ArgumentType , +-- &extensionId OBJECT IDENTIFIER +--} WITH SYNTAX { +-- ARGUMENT &ArgumentType +-- IDENTIFIER &extensionId +--} + +--Extension{EXTENSION:ExtensionSet} ::= SEQUENCE { +-- extensionId EXTENSION.&extensionId({Extensionset}), +-- extensionArgument EXTENSION.&ArgumentType({ExtensionSet}{@extensionId}) +--} +Extension ::= SEQUENCE { + extensionId OBJECT IDENTIFIER, + extensionArgument ANY +} + +--Extensionset EXTENSION ::= {...} + +-- ExtensionSet is a set of objects of class EXTENSION. Element extensionId is constrained to be +-- the identifier of an object from that set, and element extensionArgument is constrained to be the +-- argument type for that particular object. + +END -- of Manufacturer-specific-service-extension-class-asn1-97
\ No newline at end of file diff --git a/asn1/qsig/qsig-gf-gp.asn b/asn1/qsig/qsig-gf-gp.asn new file mode 100644 index 0000000000..12f881a2de --- /dev/null +++ b/asn1/qsig/qsig-gf-gp.asn @@ -0,0 +1,15 @@ +-- QSIG-GF-EXT.asn +-- +-- Taken from Ecma International +-- http://www.ecma-international.org/publications/standards/Ecma-165.htm +-- +-- $Id$ +-- + +PSS1-generic-parameters-definition-asn1-97 { iso( 1) standard( 0) + pss1-generic-procedures( 11582) pss1-generic-parameters-asn1-97( 17)} DEFINITIONS ::= +BEGIN + +PSS1InformationElement ::= [APPLICATION 0] IMPLICIT OCTET STRING + +END -- of PSS1 Generic parameters definition-asn1-97
\ No newline at end of file diff --git a/asn1/qsig/qsig-na.asn b/asn1/qsig/qsig-na.asn new file mode 100644 index 0000000000..1b597491dd --- /dev/null +++ b/asn1/qsig/qsig-na.asn @@ -0,0 +1,137 @@ +-- QSIG-NA.asn +-- +-- Taken from Ecma International +-- http://www.ecma-international.org/publications/standards/Ecma-164.htm +-- +-- $Id$ +-- + +Name-Operations-asn1-97 {iso(1) standard(0) pss1-name(13868) + name-operations-asn1-97(1)} DEFINITIONS ::= +BEGIN + +IMPORTS + OPERATION + FROM Remote-Operations-Information-Objects {joint-iso-itu-t + remote-operations(4) informationObjects(5) version1(0)} + EXTENSION, Extension{} + FROM Manufacturer-specific-service-extension-class-asn1-97 {iso standard + pss1-generic-procedures(11582) msi-class-asn1-97(11)} + ; + +--Name-Operations OPERATION ::= {callingName | calledName | connectedName | busyName} + +--callingName OPERATION ::= { +-- ARGUMENT NameArg +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:0 +--} + +--calledName OPERATION ::= { +-- ARGUMENT NameArg +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:1 +--} + +--connectedName OPERATION ::= { +-- ARGUMENT NameArg +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:2 +--} + +--busyName OPERATION ::= { +-- ARGUMENT NameArg +-- RETURN RESULT FALSE +-- ALWAYS RESPONDS FALSE +-- CODE local:3 +--} + +NameArg ::= CHOICE { + name Name, + nameSequence SEQUENCE { + name Name, + extension NameExtension OPTIONAL + } +} + +NameExtension ::= CHOICE { + single [5] IMPLICIT Extension --{{NameExtensionSet}}--, + multiple [6] IMPLICIT SEQUENCE OF Extension --{{NameExtensionSet}}-- +} + +--NameExtensionSet EXTENSION ::= {...} + +Name ::= CHOICE { + namePresentationAllowed NamePresentationAllowed, + namePresentationRestricted NamePresentationRestricted, + nameNotAvailable NameNotAvailable +} + +NamePresentationAllowed ::= CHOICE { + namePresentationAllowedSimple [0] IMPLICIT NameData, + namePresentationAllowedExtended [1] IMPLICIT NameSet +} +-- iso8859-1 is implied in namePresentationAllowedSimple. + +NamePresentationRestricted ::= CHOICE { + namePresentationRestrictedSimple [2] IMPLICIT NameData, + namePresentationRestrictedExtended [3] IMPLICIT NameSet, + namePresentationRestrictedNull [7] IMPLICIT NULL +} +-- iso8859-1 is implied in namePresentationRestrictedSimple. +-- namePresentationRestrictedNull shall only be used in the +-- case of interworking where the other network provides an +-- indication that the name is restricted without the name itself. + +NameNotAvailable ::= [4] IMPLICIT NULL + +NameData ::= OCTET STRING(SIZE (1..50)) +-- The maximum allowed size of the name field is 50 octets. +-- The minimum required size of the name field is 1 octet. + +NameSet ::= SEQUENCE { + nameData NameData, + characterSet CharacterSet OPTIONAL +} +-- If characterSet is not included, iso8859-1 is implied. + +CharacterSet ::= INTEGER { + unknown(0), + iso8859-1(1), + -- The character set "iso8859-1" is specified in International + -- Standard ISO 8859-1 + -- The value 2 was assigned for CCITT Rec. T.61 + -- which has been withdrawn by ITU-T. + iso8859-2(3), + -- The character set “iso8859-2” is specified in International + -- Standard ISO 8859-2 + iso8859-3(4), + --The character set “iso8859-3” is specified in International + -- Standard ISO 8859-3 + iso8859-4(5), + --The character set “iso8859-4” is specified in International + -- Standard ISO 8859-4 + iso8859-5(6), + --The character set “iso8859-5” is specified in International + -- Standard ISO 8859-5 + iso8859-7(7), + --The character set “iso8859-7” is specified in International + -- Standard ISO 8859-7 + iso10646-BmpString(8), + -- The character set “iso10646-BmpString” is specified in International + -- Standard ISO 10646-1 and in ITU-T Rec. X.680 + -- with this character set, each character occupies 2 octets in NameData + iso10646-utf-8String(9) + -- The character set “iso10646-utf-8String” is specified in International + -- Standard ISO 10646-1 + -- UTF-8-String is defined in Annex R of ISO 10646-1 + -- with this character set, each character occupies a variable + -- number of octets (1…6) in NameData +} (0..255) +-- Other character sets might be added in further editions of +-- this Standard + +END -- of Name-Operations-asn1-97 diff --git a/asn1/qsig/qsig.cnf b/asn1/qsig/qsig.cnf new file mode 100644 index 0000000000..43e061f77d --- /dev/null +++ b/asn1/qsig/qsig.cnf @@ -0,0 +1,66 @@ +# qsig.cnf +# QSIG conformation file +# 2007 Tomas Kukosa + +# $Id$ + +#.EXPORTS EXTERN VALS_WITH_TABLE + +Name + +#.PDU + +#--- ECMA-164 QSIG-NA -------------------------------- +NameArg + +#--- ECMA-174 QSIG-CF -------------------------------- +ActivateDivArg +ActivateDivRes +DeactivateDivArg +DeactivateDivRes +InterrDivArg +ChkResArg +ChkResRes +CallRrArg +CallRrRes +DivLegInf1Arg +DivLegInf2Arg +DivLegInf3Arg +DivLegFailArg +IntResultList + +#.END + +#.TYPE_RENAME +ActivateDivArg/extension ADExtension +DeactivateDivArg/extension DDExtension +InterrDivArg/extension IDExtension +ChkResArg/extension CHRExtension +CallRrArg/extension CRRExtension +DivLegInf1Arg/extension DLI1Extension +DivLegInf2Arg/extension DLI2Extension +DivLegInf3Arg/extension DLI3Extension +IntResult/extension IRExtension +#.END + +#.FIELD_RENAME +NameArg/nameSequence/extension extensionNA +ActivateDivArg/extension extensionAD +DeactivateDivArg/extension extensionDD +InterrDivArg/extension extensionID +ChkResArg/extension extensionCHR +CallRrArg/extension extensionCRR +DivLegInf1Arg/extension extensionDLI1 +DivLegInf2Arg/extension extensionDLI2 +DivLegInf3Arg/extension extensionDLI3 +IntResult/extension extensionIR +#.END + + +#.TYPE_ATTR +NameData TYPE = FT_STRING DISPLAY = BASE_NONE +#.END + +#.FN_BODY Extension/extensionArgument + +#.END diff --git a/epan/dissectors/Makefile.common b/epan/dissectors/Makefile.common index 596939ab82..8b66fac76f 100644 --- a/epan/dissectors/Makefile.common +++ b/epan/dissectors/Makefile.common @@ -122,6 +122,9 @@ ASN_DISSECTOR_SRC = \ packet-pkixqualified.c \ packet-pkixtsp.c \ packet-pres.c \ + packet-q932.c \ + packet-q932-ros.c \ + packet-qsig.c \ packet-ranap.c \ packet-rnsap.c \ packet-ros.c \ @@ -944,6 +947,9 @@ DISSECTOR_INCLUDES = \ packet-pres.h \ packet-prism.h \ packet-q931.h \ + packet-q932.h \ + packet-q932-ros.h \ + packet-qsig.h \ packet-radiotap.h \ packet-radius.h \ packet-ranap.h \ diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c new file mode 100644 index 0000000000..c0b70256da --- /dev/null +++ b/epan/dissectors/packet-q932-ros.c @@ -0,0 +1,858 @@ +/* Do not modify this file. */ +/* It is created automatically by the ASN.1 to Wireshark dissector compiler */ +/* .\packet-q932-ros.c */ +/* ../../tools/asn2wrs.py -b -T -p q932.ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template q932-ros.asn */ + +/* Input file: packet-q932-ros-template.c */ + +#line 1 "packet-q932-ros-template.c" +/* packet-q932-ros.c + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <epan/packet.h> +#include <epan/prefs.h> +#include <epan/strutil.h> +#include <epan/emem.h> + +#include "packet-ber.h" +#include "packet-q932-ros.h" + +#define PNAME "Q.932 Operations Service Element" +#define PSNAME "Q932.ROS" +#define PFNAME "q932.ros" + +/* Initialize the protocol and registered fields */ +int proto_rose = -1; + +/*--- Included file: packet-q932-ros-hf.c ---*/ +#line 1 "packet-q932-ros-hf.c" +static int hf_q932_ros_RoseAPDU_PDU = -1; /* RoseAPDU */ +static int hf_q932_ros_local = -1; /* T_local */ +static int hf_q932_ros_global = -1; /* T_global */ +static int hf_q932_ros_invoke = -1; /* Invoke */ +static int hf_q932_ros_returnResult = -1; /* ReturnResult */ +static int hf_q932_ros_returnError = -1; /* ReturnError */ +static int hf_q932_ros_reject = -1; /* Reject */ +static int hf_q932_ros_invokeId = -1; /* InvokeId */ +static int hf_q932_ros_linkedId = -1; /* T_linkedId */ +static int hf_q932_ros_linkedIdPresent = -1; /* InvokeId */ +static int hf_q932_ros_absent = -1; /* NULL */ +static int hf_q932_ros_opcode = -1; /* Code */ +static int hf_q932_ros_argument = -1; /* InvokeArgument */ +static int hf_q932_ros_result = -1; /* T_result */ +static int hf_q932_ros_resultArgument = -1; /* ResultArgument */ +static int hf_q932_ros_errcode = -1; /* Code */ +static int hf_q932_ros_parameter = -1; /* T_parameter */ +static int hf_q932_ros_problem = -1; /* T_problem */ +static int hf_q932_ros_general = -1; /* GeneralProblem */ +static int hf_q932_ros_invokeProblem = -1; /* InvokeProblem */ +static int hf_q932_ros_returnResultProblem = -1; /* ReturnResultProblem */ +static int hf_q932_ros_returnErrorProblem = -1; /* ReturnErrorProblem */ +static int hf_q932_ros_present = -1; /* INTEGER */ + +/*--- End of included file: packet-q932-ros-hf.c ---*/ +#line 45 "packet-q932-ros-template.c" + +/* Initialize the subtree pointers */ + +/*--- Included file: packet-q932-ros-ett.c ---*/ +#line 1 "packet-q932-ros-ett.c" +static gint ett_q932_ros_Code = -1; +static gint ett_q932_ros_RoseAPDU = -1; +static gint ett_q932_ros_Invoke = -1; +static gint ett_q932_ros_T_linkedId = -1; +static gint ett_q932_ros_ReturnResult = -1; +static gint ett_q932_ros_T_result = -1; +static gint ett_q932_ros_ReturnError = -1; +static gint ett_q932_ros_Reject = -1; +static gint ett_q932_ros_T_problem = -1; +static gint ett_q932_ros_InvokeId = -1; + +/*--- End of included file: packet-q932-ros-ett.c ---*/ +#line 48 "packet-q932-ros-template.c" + +/* Preferences */ + +/* Subdissectors */ +static dissector_handle_t data_handle = NULL; + +/* Gloabl variables */ +static rose_context *rose_ctx; + +static gint32 code_choice; +static guint32 code_local; +static const gchar *code_global; +static guint32 problem_val; +static gchar problem_str[64]; +static tvbuff_t *arg_next_tvb, *res_next_tvb, *err_next_tvb; + + + +/*--- Included file: packet-q932-ros-fn.c ---*/ +#line 1 "packet-q932-ros-fn.c" +/*--- Fields for imported types ---*/ + + + + +static int +dissect_q932_ros_T_local(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + &code_local); + +#line 31 "q932-ros.cnf" + code_choice = 0; + + return offset; +} +static int dissect_local(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_T_local(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_local); +} + + + +static int +dissect_q932_ros_T_global(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &code_global); + +#line 33 "q932-ros.cnf" + code_choice = 1; + + return offset; +} +static int dissect_global(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_T_global(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_global); +} + + +static const value_string q932_ros_Code_vals[] = { + { 0, "local" }, + { 1, "global" }, + { 0, NULL } +}; + +static const ber_choice_t Code_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_local }, + { 1, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_global }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_Code(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 24 "q932-ros.cnf" + code_choice = -1; + code_local = -1; + code_global = ""; + + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + Code_choice, hf_index, ett_q932_ros_Code, + NULL); + + return offset; +} +static int dissect_opcode(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_Code(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_opcode); +} +static int dissect_errcode(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_Code(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_errcode); +} + + + +static int +dissect_q932_ros_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_present(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_INTEGER(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_present); +} + + + +static int +dissect_q932_ros_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index); + + return offset; +} +static int dissect_absent(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_NULL(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_absent); +} +static int dissect_absent_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_NULL(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_absent); +} + + +static const value_string q932_ros_InvokeId_vals[] = { + { 0, "present" }, + { 1, "absent" }, + { 0, NULL } +}; + +static const ber_choice_t InvokeId_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_present }, + { 1, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_absent }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_InvokeId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + InvokeId_choice, hf_index, ett_q932_ros_InvokeId, + NULL); + + return offset; +} +static int dissect_invokeId(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_InvokeId(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_invokeId); +} +static int dissect_linkedIdPresent_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_InvokeId(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_linkedIdPresent); +} + + +static const value_string q932_ros_T_linkedId_vals[] = { + { 0, "present" }, + { 1, "absent" }, + { 0, NULL } +}; + +static const ber_choice_t T_linkedId_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_linkedIdPresent_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_absent_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_T_linkedId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + T_linkedId_choice, hf_index, ett_q932_ros_T_linkedId, + NULL); + + return offset; +} +static int dissect_linkedId(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_T_linkedId(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_linkedId); +} + + + +static int +dissect_q932_ros_InvokeArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 59 "q932-ros.cnf" + gint len; + + len = tvb_length_remaining(tvb, offset); + if (len) + proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE); + arg_next_tvb = tvb_new_subset(tvb, offset, len, len); + + offset += tvb_length_remaining(tvb, offset); + + + + return offset; +} +static int dissect_argument(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_InvokeArgument(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_argument); +} + + +static const ber_sequence_t Invoke_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_invokeId }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_linkedId }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_opcode }, + { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_argument }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 69 "q932-ros.cnf" + dissector_handle_t arg_handle = NULL; + + arg_next_tvb = NULL; + + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + Invoke_sequence, hf_index, ett_q932_ros_Invoke); + +#line 73 "q932-ros.cnf" + if (code_choice == 0) { + arg_handle = dissector_get_port_handle(rose_ctx->arg_local_dissector_table, code_local); + } else if (code_choice == 1) { + arg_handle = dissector_get_string_handle(rose_ctx->arg_global_dissector_table, code_global); + } else { + arg_handle = NULL; + } + + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " INV:"); + if (!arg_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(arg_handle)))) { + if (code_choice == 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %d", code_local); + else if (code_choice == 1) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %s", code_global); + } + if (arg_next_tvb) { + pinfo->private_data = rose_ctx; + call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, pinfo, tree); + } + + return offset; +} +static int dissect_invoke_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_Invoke(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_invoke); +} + + + +static int +dissect_q932_ros_ResultArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 102 "q932-ros.cnf" + gint len; + + len = tvb_length_remaining(tvb, offset); + if (len) + proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE); + res_next_tvb = tvb_new_subset(tvb, offset, len, len); + + offset += tvb_length_remaining(tvb, offset); + + + + return offset; +} +static int dissect_resultArgument(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_ResultArgument(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_resultArgument); +} + + +static const ber_sequence_t T_result_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_opcode }, + { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_resultArgument }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_T_result(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + T_result_sequence, hf_index, ett_q932_ros_T_result); + + return offset; +} +static int dissect_result(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_T_result(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_result); +} + + +static const ber_sequence_t ReturnResult_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_invokeId }, + { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_result }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 112 "q932-ros.cnf" + dissector_handle_t res_handle = NULL; + + res_next_tvb = NULL; + + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + ReturnResult_sequence, hf_index, ett_q932_ros_ReturnResult); + +#line 116 "q932-ros.cnf" + if (code_choice == 0) { + res_handle = dissector_get_port_handle(rose_ctx->res_local_dissector_table, code_local); + } else if (code_choice == 1) { + res_handle = dissector_get_string_handle(rose_ctx->res_global_dissector_table, code_global); + } else { + res_handle = NULL; + } + + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " RES:"); + if (!res_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(res_handle)))) { + if (code_choice == 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %d", code_local); + else if (code_choice == 1) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %s", code_global); + } + if (res_next_tvb) { + pinfo->private_data = rose_ctx; + call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, pinfo, tree); + } + + return offset; +} +static int dissect_returnResult_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_ReturnResult(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_returnResult); +} + + + +static int +dissect_q932_ros_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 144 "q932-ros.cnf" + + gint len; + + len = tvb_length_remaining(tvb, offset); + if (len) + proto_tree_add_item(tree, hf_index, tvb, offset, len, FALSE); + res_next_tvb = tvb_new_subset(tvb, offset, len, len); + + offset += tvb_length_remaining(tvb, offset); + + + + return offset; +} +static int dissect_parameter(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_T_parameter(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_parameter); +} + + +static const ber_sequence_t ReturnError_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_invokeId }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_errcode }, + { BER_CLASS_ANY, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_parameter }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 155 "q932-ros.cnf" + dissector_handle_t err_handle = NULL; + + err_next_tvb = NULL; + + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + ReturnError_sequence, hf_index, ett_q932_ros_ReturnError); + +#line 159 "q932-ros.cnf" + if (code_choice == 0) { + /*err_handle = dissector_get_port_handle(rose_ctx->err_local_dissector_table, code_local);*/ + } else if (code_choice == 1) { + /*err_handle = dissector_get_string_handle(rose_ctx->err_global_dissector_table, code_global);*/ + } else { + err_handle = NULL; + } + + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " ERR:"); + if (!err_handle || + !proto_is_protocol_enabled(find_protocol_by_id(dissector_handle_get_protocol_index(err_handle)))) { + if (code_choice == 0) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %d", code_local); + else if (code_choice == 1) + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " %s", code_global); + } + if (err_next_tvb) { + pinfo->private_data = rose_ctx; + call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, pinfo, tree); + } + + return offset; +} +static int dissect_returnError_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_ReturnError(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_returnError); +} + + +static const value_string q932_ros_GeneralProblem_vals[] = { + { 0, "unrecognizedComponent" }, + { 1, "mistypedComponent" }, + { 2, "badlyStructuredComponent" }, + { 0, NULL } +}; + + +static int +dissect_q932_ros_GeneralProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + &problem_val); + +#line 44 "q932-ros.cnf" + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_GeneralProblem_vals), "")); + + return offset; +} +static int dissect_general_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_GeneralProblem(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_general); +} + + +static const value_string q932_ros_InvokeProblem_vals[] = { + { 0, "duplicateInvocation" }, + { 1, "unrecognizedOperation" }, + { 2, "mistypedArgument" }, + { 3, "resourceLimitation" }, + { 4, "releaseInProgress" }, + { 5, "unrecognizedLinkedId" }, + { 6, "linkedResponseUnexpected" }, + { 7, "unexpectedLinkedOperation" }, + { 0, NULL } +}; + + +static int +dissect_q932_ros_InvokeProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + &problem_val); + +#line 46 "q932-ros.cnf" + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_InvokeProblem_vals), "")); + + return offset; +} +static int dissect_invokeProblem_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_InvokeProblem(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_invokeProblem); +} + + +static const value_string q932_ros_ReturnResultProblem_vals[] = { + { 0, "unrecognizedInvocation" }, + { 1, "resultResponseUnexpected" }, + { 2, "mistypedResult" }, + { 0, NULL } +}; + + +static int +dissect_q932_ros_ReturnResultProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + &problem_val); + +#line 48 "q932-ros.cnf" + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_ReturnResultProblem_vals), "")); + + return offset; +} +static int dissect_returnResultProblem_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_ReturnResultProblem(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_returnResultProblem); +} + + +static const value_string q932_ros_ReturnErrorProblem_vals[] = { + { 0, "unrecognizedInvocation" }, + { 1, "errorResponseUnexpected" }, + { 2, "unrecognizedError" }, + { 3, "unexpectedError" }, + { 4, "mistypedParameter" }, + { 0, NULL } +}; + + +static int +dissect_q932_ros_ReturnErrorProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + &problem_val); + +#line 50 "q932-ros.cnf" + strcpy(problem_str, val_to_str(problem_val, VALS(q932_ros_ReturnErrorProblem_vals), "")); + + return offset; +} +static int dissect_returnErrorProblem_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_ReturnErrorProblem(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_returnErrorProblem); +} + + +static const value_string q932_ros_T_problem_vals[] = { + { 0, "general" }, + { 1, "invoke" }, + { 2, "returnResult" }, + { 3, "returnError" }, + { 0, NULL } +}; + +static const ber_choice_t T_problem_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_general_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_invokeProblem_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_returnResultProblem_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_returnErrorProblem_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_T_problem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + T_problem_choice, hf_index, ett_q932_ros_T_problem, + NULL); + + return offset; +} +static int dissect_problem(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_T_problem(FALSE, tvb, offset, pinfo, tree, hf_q932_ros_problem); +} + + +static const ber_sequence_t Reject_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_invokeId }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_problem }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 184 "q932-ros.cnf" + problem_str[0] = '\0'; + + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + Reject_sequence, hf_index, ett_q932_ros_Reject); + +#line 186 "q932-ros.cnf" + proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rose_ctx->apdu_depth), " REJ: %s", problem_str); + + return offset; +} +static int dissect_reject_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ros_Reject(TRUE, tvb, offset, pinfo, tree, hf_q932_ros_reject); +} + + +static const value_string q932_ros_RoseAPDU_vals[] = { + { 1, "invoke" }, + { 2, "returnResult" }, + { 3, "returnError" }, + { 4, "reject" }, + { 0, NULL } +}; + +static const ber_choice_t RoseAPDU_choice[] = { + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_invoke_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_returnResult_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_returnError_impl }, + { 4, BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_reject_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_q932_ros_RoseAPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + RoseAPDU_choice, hf_index, ett_q932_ros_RoseAPDU, + NULL); + + return offset; +} + + +static const value_string q932_ros_RejectProblem_vals[] = { + { 0, "general-unrecognizedPDU" }, + { 1, "general-mistypedPDU" }, + { 2, "general-badlyStructuredPDU" }, + { 10, "invoke-duplicateInvocation" }, + { 11, "invoke-unrecognizedOperation" }, + { 12, "invoke-mistypedArgument" }, + { 13, "invoke-resourceLimitation" }, + { 14, "invoke-releaseInProgress" }, + { 15, "invoke-unrecognizedLinkedId" }, + { 16, "invoke-linkedResponseUnexpected" }, + { 17, "invoke-unexpectedLinkedOperation" }, + { 20, "returnResult-unrecognizedInvocation" }, + { 21, "returnResult-resultResponseUnexpected" }, + { 22, "returnResult-mistypedResult" }, + { 30, "returnError-unrecognizedInvocation" }, + { 31, "returnError-errorResponseUnexpected" }, + { 32, "returnError-unrecognizedError" }, + { 33, "returnError-unexpectedError" }, + { 34, "returnError-mistypedParameter" }, + { 0, NULL } +}; + + +static int +dissect_q932_ros_RejectProblem(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + +/*--- PDUs ---*/ + +static int dissect_RoseAPDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + return dissect_q932_ros_RoseAPDU(FALSE, tvb, 0, pinfo, tree, hf_q932_ros_RoseAPDU_PDU); +} + + +/*--- End of included file: packet-q932-ros-fn.c ---*/ +#line 66 "packet-q932-ros-template.c" + +/*--- dissect_rose_apdu -----------------------------------------------------*/ +int dissect_rose_apdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, rose_context *rctx) { + if (rctx) + rose_ctx = rctx; + return dissect_RoseAPDU_PDU(tvb, pinfo, tree); +} + +/*--- proto_register_rose ---------------------------------------------------*/ +void proto_register_rose(void) { + + /* List of fields */ + static hf_register_info hf[] = { + +/*--- Included file: packet-q932-ros-hfarr.c ---*/ +#line 1 "packet-q932-ros-hfarr.c" + { &hf_q932_ros_RoseAPDU_PDU, + { "RoseAPDU", "q932.ros.RoseAPDU", + FT_UINT32, BASE_DEC, VALS(q932_ros_RoseAPDU_vals), 0, + "q932_ros.RoseAPDU", HFILL }}, + { &hf_q932_ros_local, + { "local", "q932.ros.local", + FT_INT32, BASE_DEC, NULL, 0, + "q932_ros.T_local", HFILL }}, + { &hf_q932_ros_global, + { "global", "q932.ros.global", + FT_OID, BASE_NONE, NULL, 0, + "q932_ros.T_global", HFILL }}, + { &hf_q932_ros_invoke, + { "invoke", "q932.ros.invoke", + FT_NONE, BASE_NONE, NULL, 0, + "q932_ros.Invoke", HFILL }}, + { &hf_q932_ros_returnResult, + { "returnResult", "q932.ros.returnResult", + FT_NONE, BASE_NONE, NULL, 0, + "q932_ros.ReturnResult", HFILL }}, + { &hf_q932_ros_returnError, + { "returnError", "q932.ros.returnError", + FT_NONE, BASE_NONE, NULL, 0, + "q932_ros.ReturnError", HFILL }}, + { &hf_q932_ros_reject, + { "reject", "q932.ros.reject", + FT_NONE, BASE_NONE, NULL, 0, + "q932_ros.Reject", HFILL }}, + { &hf_q932_ros_invokeId, + { "invokeId", "q932.ros.invokeId", + FT_UINT32, BASE_DEC, VALS(q932_ros_InvokeId_vals), 0, + "q932_ros.InvokeId", HFILL }}, + { &hf_q932_ros_linkedId, + { "linkedId", "q932.ros.linkedId", + FT_UINT32, BASE_DEC, VALS(q932_ros_T_linkedId_vals), 0, + "q932_ros.T_linkedId", HFILL }}, + { &hf_q932_ros_linkedIdPresent, + { "present", "q932.ros.present", + FT_UINT32, BASE_DEC, VALS(q932_ros_InvokeId_vals), 0, + "q932_ros.InvokeId", HFILL }}, + { &hf_q932_ros_absent, + { "absent", "q932.ros.absent", + FT_NONE, BASE_NONE, NULL, 0, + "q932_ros.NULL", HFILL }}, + { &hf_q932_ros_opcode, + { "opcode", "q932.ros.opcode", + FT_UINT32, BASE_DEC, VALS(q932_ros_Code_vals), 0, + "q932_ros.Code", HFILL }}, + { &hf_q932_ros_argument, + { "argument", "q932.ros.argument", + FT_BYTES, BASE_HEX, NULL, 0, + "q932_ros.InvokeArgument", HFILL }}, + { &hf_q932_ros_result, + { "result", "q932.ros.result", + FT_NONE, BASE_NONE, NULL, 0, + "q932_ros.T_result", HFILL }}, + { &hf_q932_ros_resultArgument, + { "result", "q932.ros.result", + FT_BYTES, BASE_HEX, NULL, 0, + "q932_ros.ResultArgument", HFILL }}, + { &hf_q932_ros_errcode, + { "errcode", "q932.ros.errcode", + FT_UINT32, BASE_DEC, VALS(q932_ros_Code_vals), 0, + "q932_ros.Code", HFILL }}, + { &hf_q932_ros_parameter, + { "parameter", "q932.ros.parameter", + FT_BYTES, BASE_HEX, NULL, 0, + "q932_ros.T_parameter", HFILL }}, + { &hf_q932_ros_problem, + { "problem", "q932.ros.problem", + FT_UINT32, BASE_DEC, VALS(q932_ros_T_problem_vals), 0, + "q932_ros.T_problem", HFILL }}, + { &hf_q932_ros_general, + { "general", "q932.ros.general", + FT_INT32, BASE_DEC, VALS(q932_ros_GeneralProblem_vals), 0, + "q932_ros.GeneralProblem", HFILL }}, + { &hf_q932_ros_invokeProblem, + { "invoke", "q932.ros.invoke", + FT_INT32, BASE_DEC, VALS(q932_ros_InvokeProblem_vals), 0, + "q932_ros.InvokeProblem", HFILL }}, + { &hf_q932_ros_returnResultProblem, + { "returnResult", "q932.ros.returnResult", + FT_INT32, BASE_DEC, VALS(q932_ros_ReturnResultProblem_vals), 0, + "q932_ros.ReturnResultProblem", HFILL }}, + { &hf_q932_ros_returnErrorProblem, + { "returnError", "q932.ros.returnError", + FT_INT32, BASE_DEC, VALS(q932_ros_ReturnErrorProblem_vals), 0, + "q932_ros.ReturnErrorProblem", HFILL }}, + { &hf_q932_ros_present, + { "present", "q932.ros.present", + FT_INT32, BASE_DEC, NULL, 0, + "q932_ros.INTEGER", HFILL }}, + +/*--- End of included file: packet-q932-ros-hfarr.c ---*/ +#line 80 "packet-q932-ros-template.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + +/*--- Included file: packet-q932-ros-ettarr.c ---*/ +#line 1 "packet-q932-ros-ettarr.c" + &ett_q932_ros_Code, + &ett_q932_ros_RoseAPDU, + &ett_q932_ros_Invoke, + &ett_q932_ros_T_linkedId, + &ett_q932_ros_ReturnResult, + &ett_q932_ros_T_result, + &ett_q932_ros_ReturnError, + &ett_q932_ros_Reject, + &ett_q932_ros_T_problem, + &ett_q932_ros_InvokeId, + +/*--- End of included file: packet-q932-ros-ettarr.c ---*/ +#line 85 "packet-q932-ros-template.c" + }; + + /* Register protocol and dissector */ + proto_rose = proto_register_protocol(PNAME, PSNAME, PFNAME); + proto_set_cant_toggle(proto_rose); + + /* Register fields and subtrees */ + proto_register_field_array(proto_rose, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + +/*--- proto_reg_handoff_rose ------------------------------------------------*/ +void proto_reg_handoff_rose(void) { + data_handle = find_dissector("data"); +} + +/*---------------------------------------------------------------------------*/
\ No newline at end of file diff --git a/epan/dissectors/packet-q932-ros.h b/epan/dissectors/packet-q932-ros.h new file mode 100644 index 0000000000..a5e45c93ba --- /dev/null +++ b/epan/dissectors/packet-q932-ros.h @@ -0,0 +1,50 @@ +/* Do not modify this file. */ +/* It is created automatically by the ASN.1 to Wireshark dissector compiler */ +/* .\packet-q932-ros.h */ +/* ../../tools/asn2wrs.py -b -T -p q932.ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template q932-ros.asn */ + +/* Input file: packet-q932-ros-template.h */ + +#line 1 "packet-q932-ros-template.h" +/* packet-q932-ros.h + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef PACKET_ROSE_H +#define PACKET_ROSE_H + +#include "epan/packet.h" + +typedef struct _rose_context { + int apdu_depth; + dissector_table_t arg_global_dissector_table; + dissector_table_t arg_local_dissector_table; + dissector_table_t res_global_dissector_table; + dissector_table_t res_local_dissector_table; +} rose_context; + +int dissect_rose_apdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, rose_context *rctx); + +#endif /* PACKET_ROSE_H */ + diff --git a/epan/dissectors/packet-q932.c b/epan/dissectors/packet-q932.c new file mode 100644 index 0000000000..762363714f --- /dev/null +++ b/epan/dissectors/packet-q932.c @@ -0,0 +1,1117 @@ +/* Do not modify this file. */ +/* It is created automatically by the ASN.1 to Wireshark dissector compiler */ +/* .\packet-q932.c */ +/* ../../tools/asn2wrs.py -b -T -e -p q932 -c q932.cnf -s packet-q932-template Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn */ + +/* Input file: packet-q932-template.c */ + +#line 1 "packet-q932-template.c" +/* packet-q932.c + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <epan/packet.h> +#include <epan/prefs.h> +#include <epan/strutil.h> +#include <epan/emem.h> + +#include "packet-ber.h" +#include "packet-q932-ros.h" +#include "packet-q932.h" + +#define PNAME "Q.932" +#define PSNAME "Q932" +#define PFNAME "q932" + +/* Initialize the protocol and registered fields */ +int proto_q932 = -1; +static int hf_q932_ie_type = -1; +static int hf_q932_ie_len = -1; +static int hf_q932_ie_data = -1; +static int hf_q932_pp = -1; +static int hf_q932_nd = -1; + +/*--- Included file: packet-q932-hf.c ---*/ +#line 1 "packet-q932-hf.c" +static int hf_q932_NetworkFacilityExtension_PDU = -1; /* NetworkFacilityExtension */ +static int hf_q932_NetworkProtocolProfile_PDU = -1; /* NetworkProtocolProfile */ +static int hf_q932_InterpretationComponent_PDU = -1; /* InterpretationComponent */ +static int hf_q932_presentationAlIowedAddress = -1; /* AddressScreened */ +static int hf_q932_presentationRestricted = -1; /* NULL */ +static int hf_q932_numberNotAvailableDueTolnterworking = -1; /* NULL */ +static int hf_q932_presentationRestrictedAddressScreened = -1; /* AddressScreened */ +static int hf_q932_presentationAllowedAddress = -1; /* Address */ +static int hf_q932_presentationRestrictedAddress = -1; /* Address */ +static int hf_q932_presentationAllowedNumberScreened = -1; /* NumberScreened */ +static int hf_q932_numberNotAvailableDueToInterworking = -1; /* NULL */ +static int hf_q932_presentationRestrictedNumberScreened = -1; /* NumberScreened */ +static int hf_q932_presentationAllowedNumber = -1; /* PartyNumber */ +static int hf_q932_presentationRestrictedNumber = -1; /* PartyNumber */ +static int hf_q932_partyNumber = -1; /* PartyNumber */ +static int hf_q932_screeninglndicator = -1; /* ScreeningIndicator */ +static int hf_q932_partySubaddress = -1; /* PartySubaddress */ +static int hf_q932_screeningIndicator = -1; /* ScreeningIndicator */ +static int hf_q932_unknownPartyNumber = -1; /* NumberDigits */ +static int hf_q932_publicPartyNumber = -1; /* PublicPartyNumber */ +static int hf_q932_nsapEncodedNumber = -1; /* NsapEncodedNumber */ +static int hf_q932_dataPartyNumber = -1; /* NumberDigits */ +static int hf_q932_telexPartyNumber = -1; /* NumberDigits */ +static int hf_q932_privatePartyNumber = -1; /* PrivatePartyNumber */ +static int hf_q932_nationalStandardPartyNumber = -1; /* NumberDigits */ +static int hf_q932_publicTypeOfNumber = -1; /* PublicTypeOfNumber */ +static int hf_q932_publicNumberDigits = -1; /* NumberDigits */ +static int hf_q932_privateTypeOfNumber = -1; /* PrivateTypeOfNumber */ +static int hf_q932_privateNumberDigits = -1; /* NumberDigits */ +static int hf_q932_userSpecifiedSubaddress = -1; /* UserSpecifiedSubaddress */ +static int hf_q932_nSAPSubaddress = -1; /* NSAPSubaddress */ +static int hf_q932_subaddressInformation = -1; /* SubaddressInformation */ +static int hf_q932_oddCountIndicator = -1; /* BOOLEAN */ +static int hf_q932_sourceEntity = -1; /* EntityType */ +static int hf_q932_sourceEntityAddress = -1; /* AddressInformation */ +static int hf_q932_destinationEntity = -1; /* EntityType */ +static int hf_q932_destinationEntityAddress = -1; /* AddressInformation */ + +/*--- End of included file: packet-q932-hf.c ---*/ +#line 51 "packet-q932-template.c" + +/* Initialize the subtree pointers */ +static gint ett_q932 = -1; +static gint ett_q932_ie = -1; + +/*--- Included file: packet-q932-ett.c ---*/ +#line 1 "packet-q932-ett.c" +static gint ett_q932_PresentedAddressScreened = -1; +static gint ett_q932_PresentedAddressUnscreened = -1; +static gint ett_q932_PresentedNumberScreened = -1; +static gint ett_q932_PresentedNumberUnscreened = -1; +static gint ett_q932_AddressScreened = -1; +static gint ett_q932_NumberScreened = -1; +static gint ett_q932_Address = -1; +static gint ett_q932_PartyNumber = -1; +static gint ett_q932_PublicPartyNumber = -1; +static gint ett_q932_PrivatePartyNumber = -1; +static gint ett_q932_PartySubaddress = -1; +static gint ett_q932_UserSpecifiedSubaddress = -1; +static gint ett_q932_NetworkFacilityExtension_U = -1; + +/*--- End of included file: packet-q932-ett.c ---*/ +#line 56 "packet-q932-template.c" + +/* Preferences */ + +/* ROSE context */ +static rose_context q932_rose_ctx; + +/* Subdissectors */ +static dissector_handle_t data_handle = NULL; + +/* Gloabl variables */ + + +#define Q932_IE_EXTENDED_FACILITY 0x0D +#define Q932_IE_FACILITY 0x1C +#define Q932_IE_NOTIFICATION_INDICATOR 0x27 +#define Q932_IE_INFORMATION_REQUEST 0x32 +#define Q932_IE_FEATURE_ACTIVATION 0x38 +#define Q932_IE_FEATURE_INDICATION 0x39 +#define Q932_IE_SERVICE_PROFILE_ID 0x3A +#define Q932_IE_ENDPOINT_IDENTIFIER 0x3B +static const value_string q932_str_ie_type[] = { + { Q932_IE_EXTENDED_FACILITY , "Extended facility" }, + { Q932_IE_FACILITY , "Facility" }, + { Q932_IE_NOTIFICATION_INDICATOR, "Notification indicator" }, + { Q932_IE_INFORMATION_REQUEST, "Information request" }, + { Q932_IE_FEATURE_ACTIVATION , "Feature activation" }, + { Q932_IE_FEATURE_INDICATION , "Feature indication" }, + { Q932_IE_SERVICE_PROFILE_ID , "Service profile identification" }, + { Q932_IE_ENDPOINT_IDENTIFIER, "Endpoint identifier" }, + { 0, NULL} +}; + +static const value_string str_pp[] = { + { 0x11 , "Remote Operations Protocol" }, + { 0x12 , "CMIP Protocol" }, + { 0x13 , "ACSE Protocol" }, + { 0x1F , "Networking extensions" }, + { 0, NULL} +}; + +static const value_string str_nd[] = { + { 0x00 , "User suspended" }, + { 0x01 , "User resume" }, + { 0x02 , "Bearer service change" }, + { 0x04 , "Call completion delay" }, + { 0x03 , "Discriminator for extension to ASN.1 encoded component" }, + { 0x40 , "Discriminator for extension to ASN.1 encoded component for ISO" }, + { 0x42 , "Conference established" }, + { 0x43 , "Conference disconnected" }, + { 0x44 , "Other party added" }, + { 0x45 , "Isolated" }, + { 0x46 , "Reattached" }, + { 0x47 , "Other party isolated" }, + { 0x48 , "Other party reattached" }, + { 0x49 , "Other party split" }, + { 0x4A , "Other party disconnected" }, + { 0x4B , "Conference floating" }, + { 0x4C , "Conference disconnected, pre-emption" }, + { 0x4F , "Conference floating, served user pre-empted" }, + { 0x60 , "Call is a waiting call" }, + { 0x68 , "Diversion activated" }, + { 0x69 , "call transferred, alerting" }, + { 0x6A , "call transferred, answered" }, + { 0x6E , "reverse charging (whole call)" }, + { 0x6F , "reverse charging (for the rest of the call)" }, + { 0x74 , "service profile update" }, + { 0x79 , "Remote hold" }, + { 0x7A , "Remote retrieval" }, + { 0x7B , "Call is diverting" }, + { 0, NULL} +}; + + +/*--- Included file: packet-q932-fn.c ---*/ +#line 1 "packet-q932-fn.c" +/*--- Fields for imported types ---*/ + + + + +static int +dissect_q932_NumberDigits(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString, + pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_unknownPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_q932_unknownPartyNumber); +} +static int dissect_dataPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_q932_dataPartyNumber); +} +static int dissect_telexPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_q932_telexPartyNumber); +} +static int dissect_nationalStandardPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_q932_nationalStandardPartyNumber); +} +static int dissect_publicNumberDigits(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberDigits(FALSE, tvb, offset, pinfo, tree, hf_q932_publicNumberDigits); +} +static int dissect_privateNumberDigits(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberDigits(FALSE, tvb, offset, pinfo, tree, hf_q932_privateNumberDigits); +} + + +static const value_string q932_PublicTypeOfNumber_vals[] = { + { 0, "unknown" }, + { 1, "internationalNumber" }, + { 2, "nationalNumber" }, + { 3, "networkSpecificNumber" }, + { 4, "subscriberNumber" }, + { 6, "abbreviatedNumber" }, + { 0, NULL } +}; + + +static int +dissect_q932_PublicTypeOfNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_publicTypeOfNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PublicTypeOfNumber(FALSE, tvb, offset, pinfo, tree, hf_q932_publicTypeOfNumber); +} + + +static const ber_sequence_t PublicPartyNumber_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_publicTypeOfNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_publicNumberDigits }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_PublicPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + PublicPartyNumber_sequence, hf_index, ett_q932_PublicPartyNumber); + + return offset; +} +static int dissect_publicPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PublicPartyNumber(TRUE, tvb, offset, pinfo, tree, hf_q932_publicPartyNumber); +} + + + +static int +dissect_q932_NsapEncodedNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_nsapEncodedNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NsapEncodedNumber(TRUE, tvb, offset, pinfo, tree, hf_q932_nsapEncodedNumber); +} + + +static const value_string q932_PrivateTypeOfNumber_vals[] = { + { 0, "unknown" }, + { 1, "level2RegionalNumber" }, + { 2, "level1RegionalNumber" }, + { 3, "pTNSpecificNumber" }, + { 4, "localNumber" }, + { 6, "abbreviatedNumber" }, + { 0, NULL } +}; + + +static int +dissect_q932_PrivateTypeOfNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_privateTypeOfNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PrivateTypeOfNumber(FALSE, tvb, offset, pinfo, tree, hf_q932_privateTypeOfNumber); +} + + +static const ber_sequence_t PrivatePartyNumber_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_privateTypeOfNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_privateNumberDigits }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_PrivatePartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + PrivatePartyNumber_sequence, hf_index, ett_q932_PrivatePartyNumber); + + return offset; +} +static int dissect_privatePartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PrivatePartyNumber(TRUE, tvb, offset, pinfo, tree, hf_q932_privatePartyNumber); +} + + +static const ber_choice_t PartyNumber_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_unknownPartyNumber_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_publicPartyNumber_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_nsapEncodedNumber_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_dataPartyNumber_impl }, + { 4, BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_telexPartyNumber_impl }, + { 5, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_privatePartyNumber_impl }, + { 8, BER_CLASS_CON, 8, BER_FLAGS_IMPLTAG, dissect_nationalStandardPartyNumber_impl }, + { 0, 0, 0, 0, NULL } +}; + +int +dissect_q932_PartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PartyNumber_choice, hf_index, ett_q932_PartyNumber, + NULL); + + return offset; +} +static int dissect_presentationAllowedNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_q932_presentationAllowedNumber); +} +static int dissect_presentationRestrictedNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_q932_presentationRestrictedNumber); +} +static int dissect_partyNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_q932_partyNumber); +} + + + +int +dissect_q932_ScreeningIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_screeninglndicator(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ScreeningIndicator(FALSE, tvb, offset, pinfo, tree, hf_q932_screeninglndicator); +} +static int dissect_screeningIndicator(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_ScreeningIndicator(FALSE, tvb, offset, pinfo, tree, hf_q932_screeningIndicator); +} + + + +static int +dissect_q932_SubaddressInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_subaddressInformation(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_SubaddressInformation(FALSE, tvb, offset, pinfo, tree, hf_q932_subaddressInformation); +} + + + +static int +dissect_q932_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index); + + return offset; +} +static int dissect_oddCountIndicator(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_BOOLEAN(FALSE, tvb, offset, pinfo, tree, hf_q932_oddCountIndicator); +} + + +static const ber_sequence_t UserSpecifiedSubaddress_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_subaddressInformation }, + { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_oddCountIndicator }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_UserSpecifiedSubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + UserSpecifiedSubaddress_sequence, hf_index, ett_q932_UserSpecifiedSubaddress); + + return offset; +} +static int dissect_userSpecifiedSubaddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_UserSpecifiedSubaddress(FALSE, tvb, offset, pinfo, tree, hf_q932_userSpecifiedSubaddress); +} + + + +static int +dissect_q932_NSAPSubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_nSAPSubaddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NSAPSubaddress(FALSE, tvb, offset, pinfo, tree, hf_q932_nSAPSubaddress); +} + + +static const ber_choice_t PartySubaddress_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_userSpecifiedSubaddress }, + { 1, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_nSAPSubaddress }, + { 0, 0, 0, 0, NULL } +}; + +int +dissect_q932_PartySubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PartySubaddress_choice, hf_index, ett_q932_PartySubaddress, + NULL); + + return offset; +} +static int dissect_partySubaddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_PartySubaddress(FALSE, tvb, offset, pinfo, tree, hf_q932_partySubaddress); +} + + +static const ber_sequence_t AddressScreened_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partyNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_screeninglndicator }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partySubaddress }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_AddressScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + AddressScreened_sequence, hf_index, ett_q932_AddressScreened); + + return offset; +} +static int dissect_presentationAlIowedAddress_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_AddressScreened(TRUE, tvb, offset, pinfo, tree, hf_q932_presentationAlIowedAddress); +} +static int dissect_presentationRestrictedAddressScreened_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_AddressScreened(TRUE, tvb, offset, pinfo, tree, hf_q932_presentationRestrictedAddressScreened); +} + + + +static int +dissect_q932_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index); + + return offset; +} +static int dissect_presentationRestricted_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NULL(TRUE, tvb, offset, pinfo, tree, hf_q932_presentationRestricted); +} +static int dissect_numberNotAvailableDueTolnterworking_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NULL(TRUE, tvb, offset, pinfo, tree, hf_q932_numberNotAvailableDueTolnterworking); +} +static int dissect_numberNotAvailableDueToInterworking_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NULL(TRUE, tvb, offset, pinfo, tree, hf_q932_numberNotAvailableDueToInterworking); +} + + +static const ber_choice_t PresentedAddressScreened_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_presentationAlIowedAddress_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueTolnterworking_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_presentationRestrictedAddressScreened_impl }, + { 0, 0, 0, 0, NULL } +}; + +int +dissect_q932_PresentedAddressScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedAddressScreened_choice, hf_index, ett_q932_PresentedAddressScreened, + NULL); + + return offset; +} + + +static const ber_sequence_t Address_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partyNumber }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partySubaddress }, + { 0, 0, 0, NULL } +}; + +int +dissect_q932_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + Address_sequence, hf_index, ett_q932_Address); + + return offset; +} +static int dissect_presentationAllowedAddress_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_Address(TRUE, tvb, offset, pinfo, tree, hf_q932_presentationAllowedAddress); +} +static int dissect_presentationRestrictedAddress_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_Address(TRUE, tvb, offset, pinfo, tree, hf_q932_presentationRestrictedAddress); +} + + +static const ber_choice_t PresentedAddressUnscreened_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_presentationAllowedAddress_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueTolnterworking_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_presentationRestrictedAddress_impl }, + { 0, 0, 0, 0, NULL } +}; + +int +dissect_q932_PresentedAddressUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedAddressUnscreened_choice, hf_index, ett_q932_PresentedAddressUnscreened, + NULL); + + return offset; +} + + +static const ber_sequence_t NumberScreened_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partyNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_screeningIndicator }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_NumberScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + NumberScreened_sequence, hf_index, ett_q932_NumberScreened); + + return offset; +} +static int dissect_presentationAllowedNumberScreened_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberScreened(TRUE, tvb, offset, pinfo, tree, hf_q932_presentationAllowedNumberScreened); +} +static int dissect_presentationRestrictedNumberScreened_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_NumberScreened(TRUE, tvb, offset, pinfo, tree, hf_q932_presentationRestrictedNumberScreened); +} + + +static const ber_choice_t PresentedNumberScreened_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_presentationAllowedNumberScreened_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueToInterworking_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_presentationRestrictedNumberScreened_impl }, + { 0, 0, 0, 0, NULL } +}; + +int +dissect_q932_PresentedNumberScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedNumberScreened_choice, hf_index, ett_q932_PresentedNumberScreened, + NULL); + + return offset; +} + + +static const ber_choice_t PresentedNumberUnscreened_choice[] = { + { 0, BER_CLASS_CON, 0, 0, dissect_presentationAllowedNumber }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueToInterworking_impl }, + { 3, BER_CLASS_CON, 3, 0, dissect_presentationRestrictedNumber }, + { 0, 0, 0, 0, NULL } +}; + +int +dissect_q932_PresentedNumberUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedNumberUnscreened_choice, hf_index, ett_q932_PresentedNumberUnscreened, + NULL); + + return offset; +} + + + +int +dissect_q932_PresentationAllowedIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index); + + return offset; +} + + +static const value_string q932_EntityType_vals[] = { + { 0, "endPINX" }, + { 1, "anyTypeOfPINX" }, + { 0, NULL } +}; + + +static int +dissect_q932_EntityType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_sourceEntity_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_EntityType(TRUE, tvb, offset, pinfo, tree, hf_q932_sourceEntity); +} +static int dissect_destinationEntity_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_EntityType(TRUE, tvb, offset, pinfo, tree, hf_q932_destinationEntity); +} + + + +static int +dissect_q932_AddressInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_q932_PartyNumber(implicit_tag, tvb, offset, pinfo, tree, hf_index); + + return offset; +} +static int dissect_sourceEntityAddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_AddressInformation(FALSE, tvb, offset, pinfo, tree, hf_q932_sourceEntityAddress); +} +static int dissect_destinationEntityAddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_q932_AddressInformation(FALSE, tvb, offset, pinfo, tree, hf_q932_destinationEntityAddress); +} + + +static const ber_sequence_t NetworkFacilityExtension_U_sequence[] = { + { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_sourceEntity_impl }, + { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_sourceEntityAddress }, + { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_destinationEntity_impl }, + { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_destinationEntityAddress }, + { 0, 0, 0, NULL } +}; + +static int +dissect_q932_NetworkFacilityExtension_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + NetworkFacilityExtension_U_sequence, hf_index, ett_q932_NetworkFacilityExtension_U); + + return offset; +} + + + +static int +dissect_q932_NetworkFacilityExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_tagged_type(implicit_tag, pinfo, tree, tvb, offset, + hf_index, BER_CLASS_CON, 10, TRUE, dissect_q932_NetworkFacilityExtension_U); + + return offset; +} + + +static const value_string q932_NetworkProtocolProfile_U_vals[] = { + { 19, "acse" }, + { 32, "dse" }, + { 0, NULL } +}; + + +static int +dissect_q932_NetworkProtocolProfile_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_q932_NetworkProtocolProfile(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_tagged_type(implicit_tag, pinfo, tree, tvb, offset, + hf_index, BER_CLASS_CON, 18, TRUE, dissect_q932_NetworkProtocolProfile_U); + + return offset; +} + + +static const value_string q932_InterpretationComponent_U_vals[] = { + { 0, "discardAnyUnrecognisedInvokePdu" }, + { 1, "clearCallIfAnyInvokePduNotRecognised" }, + { 2, "rejectAnyUnrecognisedInvokePdu" }, + { 0, NULL } +}; + + +static int +dissect_q932_InterpretationComponent_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_q932_InterpretationComponent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_tagged_type(implicit_tag, pinfo, tree, tvb, offset, + hf_index, BER_CLASS_CON, 11, TRUE, dissect_q932_InterpretationComponent_U); + + return offset; +} + +/*--- PDUs ---*/ + +static void dissect_NetworkFacilityExtension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_q932_NetworkFacilityExtension(FALSE, tvb, 0, pinfo, tree, hf_q932_NetworkFacilityExtension_PDU); +} +static void dissect_NetworkProtocolProfile_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_q932_NetworkProtocolProfile(FALSE, tvb, 0, pinfo, tree, hf_q932_NetworkProtocolProfile_PDU); +} +static void dissect_InterpretationComponent_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_q932_InterpretationComponent(FALSE, tvb, 0, pinfo, tree, hf_q932_InterpretationComponent_PDU); +} + + +/*--- End of included file: packet-q932-fn.c ---*/ +#line 129 "packet-q932-template.c" + +/*--- dissect_q932_facility_ie -------------------------------------------------------*/ +/*static*/ void +dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + guint8 class; + gboolean pc; + guint32 tag; + guint32 len; + int hoffset, eoffset; + int ie_end; + tvbuff_t *next_tvb; + + ie_end = offset + length; + proto_tree_add_item(tree, hf_q932_pp, tvb, offset, 1, FALSE); + offset++; + while (offset < ie_end) { + hoffset = offset; + offset = get_ber_identifier(tvb, offset, &class, &pc, &tag); + offset = get_ber_length(tree, tvb, offset, &len, NULL); + eoffset = offset + len; + next_tvb = tvb_new_subset(tvb, hoffset, eoffset - hoffset, eoffset - hoffset); + switch (class) { + case BER_CLASS_CON: + switch (tag) { + case 10 : /* Network Facility Extension */ + dissect_NetworkFacilityExtension_PDU(next_tvb, pinfo, tree); + break; + case 18 : /* Network Protocol Profile */ + dissect_NetworkProtocolProfile_PDU(next_tvb, pinfo, tree); + break; + case 11 : /* Interpretation Component */ + dissect_InterpretationComponent_PDU(next_tvb, pinfo, tree); + break; + /* ROSE APDU */ + case 1 : /* invoke */ + case 2 : /* returnResult */ + case 3 : /* returnError */ + case 4 : /* reject */ + q932_rose_ctx.apdu_depth = 1; + dissect_rose_apdu(next_tvb, hoffset, pinfo, tree, &q932_rose_ctx); + break; + /* DSE APDU */ + case 12 : /* begin */ + case 14 : /* end */ + case 15 : /* continue */ + case 17 : /* abort */ + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "DSE APDU (not supported)"); + break; + default: + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "Unknown Component"); + } + break; + case BER_CLASS_APP: + switch (tag) { + /* ACSE APDU */ + case 0 : /* aarq */ + case 1 : /* aare */ + case 2 : /* rlrq */ + case 3 : /* rlre */ + case 4 : /* abrt */ + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "ACSE APDU (not supported)"); + break; + default: + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "Unknown Component"); + } + break; + default: + offset = dissect_ber_identifier(pinfo, tree, tvb, hoffset, NULL, NULL, NULL); + offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); + proto_tree_add_text(tree, tvb, offset, len, "Unknown Component"); + } + offset = eoffset; + } +} + +/*--- dissect_q932_ni_ie -------------------------------------------------------*/ +static void +dissect_q932_ni_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + int remain = length; + guint8 octet = 0; + guint32 value = 0; + + while ((remain > 0) && !(octet & 0x80)) { + octet = tvb_get_guint8(tvb, offset++); + remain--; + value <<= 7; + value |= octet & 0x7F; + } + proto_tree_add_uint(tree, hf_q932_nd, tvb, offset - (length - remain), length - remain, value); + + if (remain > 0) { + proto_tree_add_text(tree, tvb, offset - remain, remain, "ASN.1 Encoded Data Structure(NOT IMPLEMENTED): %s", tvb_bytes_to_str(tvb, offset - remain, remain)); + } +} + +/*--- dissect_q932_ie -------------------------------------------------------*/ +static void +dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + gint offset; + proto_item *ti, *ti_ie; + proto_tree *ie_tree; + guint8 ie_type, ie_len; + + offset = 0; + + ti = proto_tree_add_item_hidden(tree, proto_q932, tvb, offset, -1, FALSE); + + ie_type = tvb_get_guint8(tvb, offset); + ie_len = tvb_get_guint8(tvb, offset + 1); + + ti_ie = proto_tree_add_text(tree, tvb, offset, -1, "%s", + val_to_str(ie_type, VALS(q932_str_ie_type), "unknown (0x%02X)")); + ie_tree = proto_item_add_subtree(ti_ie, ett_q932_ie); + proto_tree_add_item(ie_tree, hf_q932_ie_type, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_q932_ie_len, tvb, offset + 1, 1, FALSE); + offset += 2; + if (tvb_length_remaining(tvb, offset) <= 0) + return; + switch (ie_type) { + case Q932_IE_FACILITY : + dissect_q932_facility_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + case Q932_IE_NOTIFICATION_INDICATOR : + dissect_q932_ni_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + default: + if (ie_len > 0) { + if (tree) proto_tree_add_item(ie_tree, hf_q932_ie_data, tvb, offset, ie_len, FALSE); + } + } +} + +/*--- dissect_q932_apdu -----------------------------------------------------*/ +static void +dissect_q932_apdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + dissect_rose_apdu(tvb, 0, pinfo, tree, pinfo->private_data); +} + +/*--- proto_register_q932 ---------------------------------------------------*/ +void proto_register_q932(void) { + + /* List of fields */ + static hf_register_info hf[] = { + { &hf_q932_ie_type, { "Type", "q932.ie.type", + FT_UINT8, BASE_HEX, VALS(q932_str_ie_type), 0x0, + "Information Element Type", HFILL }}, + { &hf_q932_ie_len, { "Length", "q932.ie.len", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Information Element Length", HFILL }}, + { &hf_q932_ie_data, { "Data", "q932.ie.data", + FT_BYTES, BASE_HEX, NULL, 0x0, + "Data", HFILL }}, + { &hf_q932_pp, { "Protocol profile", "q932.pp", + FT_UINT8, BASE_HEX, VALS(str_pp), 0x1F, + "Protocol profile", HFILL }}, + { &hf_q932_nd, { "Notification description", "q932.nd", + FT_UINT8, BASE_HEX, VALS(str_nd), 0x0, + "Notification description", HFILL }}, + +/*--- Included file: packet-q932-hfarr.c ---*/ +#line 1 "packet-q932-hfarr.c" + { &hf_q932_NetworkFacilityExtension_PDU, + { "NetworkFacilityExtension", "q932.NetworkFacilityExtension", + FT_NONE, BASE_NONE, NULL, 0, + "q932.NetworkFacilityExtension", HFILL }}, + { &hf_q932_NetworkProtocolProfile_PDU, + { "NetworkProtocolProfile", "q932.NetworkProtocolProfile", + FT_UINT32, BASE_DEC, NULL, 0, + "q932.NetworkProtocolProfile", HFILL }}, + { &hf_q932_InterpretationComponent_PDU, + { "InterpretationComponent", "q932.InterpretationComponent", + FT_UINT32, BASE_DEC, NULL, 0, + "q932.InterpretationComponent", HFILL }}, + { &hf_q932_presentationAlIowedAddress, + { "presentationAlIowedAddress", "q932.presentationAlIowedAddress", + FT_NONE, BASE_NONE, NULL, 0, + "q932.AddressScreened", HFILL }}, + { &hf_q932_presentationRestricted, + { "presentationRestricted", "q932.presentationRestricted", + FT_NONE, BASE_NONE, NULL, 0, + "q932.NULL", HFILL }}, + { &hf_q932_numberNotAvailableDueTolnterworking, + { "numberNotAvailableDueTolnterworking", "q932.numberNotAvailableDueTolnterworking", + FT_NONE, BASE_NONE, NULL, 0, + "q932.NULL", HFILL }}, + { &hf_q932_presentationRestrictedAddressScreened, + { "presentationRestrictedAddress", "q932.presentationRestrictedAddress", + FT_NONE, BASE_NONE, NULL, 0, + "q932.AddressScreened", HFILL }}, + { &hf_q932_presentationAllowedAddress, + { "presentationAllowedAddress", "q932.presentationAllowedAddress", + FT_NONE, BASE_NONE, NULL, 0, + "q932.Address", HFILL }}, + { &hf_q932_presentationRestrictedAddress, + { "presentationRestrictedAddress", "q932.presentationRestrictedAddress", + FT_NONE, BASE_NONE, NULL, 0, + "q932.Address", HFILL }}, + { &hf_q932_presentationAllowedNumberScreened, + { "presentationAllowedNumber", "q932.presentationAllowedNumber", + FT_NONE, BASE_NONE, NULL, 0, + "q932.NumberScreened", HFILL }}, + { &hf_q932_numberNotAvailableDueToInterworking, + { "numberNotAvailableDueToInterworking", "q932.numberNotAvailableDueToInterworking", + FT_NONE, BASE_NONE, NULL, 0, + "q932.NULL", HFILL }}, + { &hf_q932_presentationRestrictedNumberScreened, + { "presentationRestrictedNumber", "q932.presentationRestrictedNumber", + FT_NONE, BASE_NONE, NULL, 0, + "q932.NumberScreened", HFILL }}, + { &hf_q932_presentationAllowedNumber, + { "presentationAllowedNumber", "q932.presentationAllowedNumber", + FT_UINT32, BASE_DEC, VALS(q932_PartyNumber_vals), 0, + "q932.PartyNumber", HFILL }}, + { &hf_q932_presentationRestrictedNumber, + { "presentationRestrictedNumber", "q932.presentationRestrictedNumber", + FT_UINT32, BASE_DEC, VALS(q932_PartyNumber_vals), 0, + "q932.PartyNumber", HFILL }}, + { &hf_q932_partyNumber, + { "partyNumber", "q932.partyNumber", + FT_UINT32, BASE_DEC, VALS(q932_PartyNumber_vals), 0, + "q932.PartyNumber", HFILL }}, + { &hf_q932_screeninglndicator, + { "screeninglndicator", "q932.screeninglndicator", + FT_UINT32, BASE_DEC, VALS(q932_ScreeningIndicator_vals), 0, + "q932.ScreeningIndicator", HFILL }}, + { &hf_q932_partySubaddress, + { "partySubaddress", "q932.partySubaddress", + FT_UINT32, BASE_DEC, VALS(q932_PartySubaddress_vals), 0, + "q932.PartySubaddress", HFILL }}, + { &hf_q932_screeningIndicator, + { "screeningIndicator", "q932.screeningIndicator", + FT_UINT32, BASE_DEC, VALS(q932_ScreeningIndicator_vals), 0, + "q932.ScreeningIndicator", HFILL }}, + { &hf_q932_unknownPartyNumber, + { "unknownPartyNumber", "q932.unknownPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "q932.NumberDigits", HFILL }}, + { &hf_q932_publicPartyNumber, + { "publicPartyNumber", "q932.publicPartyNumber", + FT_NONE, BASE_NONE, NULL, 0, + "q932.PublicPartyNumber", HFILL }}, + { &hf_q932_nsapEncodedNumber, + { "nsapEncodedNumber", "q932.nsapEncodedNumber", + FT_BYTES, BASE_HEX, NULL, 0, + "q932.NsapEncodedNumber", HFILL }}, + { &hf_q932_dataPartyNumber, + { "dataPartyNumber", "q932.dataPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "q932.NumberDigits", HFILL }}, + { &hf_q932_telexPartyNumber, + { "telexPartyNumber", "q932.telexPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "q932.NumberDigits", HFILL }}, + { &hf_q932_privatePartyNumber, + { "privatePartyNumber", "q932.privatePartyNumber", + FT_NONE, BASE_NONE, NULL, 0, + "q932.PrivatePartyNumber", HFILL }}, + { &hf_q932_nationalStandardPartyNumber, + { "nationalStandardPartyNumber", "q932.nationalStandardPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "q932.NumberDigits", HFILL }}, + { &hf_q932_publicTypeOfNumber, + { "publicTypeOfNumber", "q932.publicTypeOfNumber", + FT_UINT32, BASE_DEC, VALS(q932_PublicTypeOfNumber_vals), 0, + "q932.PublicTypeOfNumber", HFILL }}, + { &hf_q932_publicNumberDigits, + { "publicNumberDigits", "q932.publicNumberDigits", + FT_STRING, BASE_NONE, NULL, 0, + "q932.NumberDigits", HFILL }}, + { &hf_q932_privateTypeOfNumber, + { "privateTypeOfNumber", "q932.privateTypeOfNumber", + FT_UINT32, BASE_DEC, VALS(q932_PrivateTypeOfNumber_vals), 0, + "q932.PrivateTypeOfNumber", HFILL }}, + { &hf_q932_privateNumberDigits, + { "privateNumberDigits", "q932.privateNumberDigits", + FT_STRING, BASE_NONE, NULL, 0, + "q932.NumberDigits", HFILL }}, + { &hf_q932_userSpecifiedSubaddress, + { "userSpecifiedSubaddress", "q932.userSpecifiedSubaddress", + FT_NONE, BASE_NONE, NULL, 0, + "q932.UserSpecifiedSubaddress", HFILL }}, + { &hf_q932_nSAPSubaddress, + { "nSAPSubaddress", "q932.nSAPSubaddress", + FT_BYTES, BASE_HEX, NULL, 0, + "q932.NSAPSubaddress", HFILL }}, + { &hf_q932_subaddressInformation, + { "subaddressInformation", "q932.subaddressInformation", + FT_BYTES, BASE_HEX, NULL, 0, + "q932.SubaddressInformation", HFILL }}, + { &hf_q932_oddCountIndicator, + { "oddCountIndicator", "q932.oddCountIndicator", + FT_BOOLEAN, 8, NULL, 0, + "q932.BOOLEAN", HFILL }}, + { &hf_q932_sourceEntity, + { "sourceEntity", "q932.sourceEntity", + FT_UINT32, BASE_DEC, VALS(q932_EntityType_vals), 0, + "q932.EntityType", HFILL }}, + { &hf_q932_sourceEntityAddress, + { "sourceEntityAddress", "q932.sourceEntityAddress", + FT_UINT32, BASE_DEC, VALS(q932_PartyNumber_vals), 0, + "q932.AddressInformation", HFILL }}, + { &hf_q932_destinationEntity, + { "destinationEntity", "q932.destinationEntity", + FT_UINT32, BASE_DEC, VALS(q932_EntityType_vals), 0, + "q932.EntityType", HFILL }}, + { &hf_q932_destinationEntityAddress, + { "destinationEntityAddress", "q932.destinationEntityAddress", + FT_UINT32, BASE_DEC, VALS(q932_PartyNumber_vals), 0, + "q932.AddressInformation", HFILL }}, + +/*--- End of included file: packet-q932-hfarr.c ---*/ +#line 296 "packet-q932-template.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_q932, + &ett_q932_ie, + +/*--- Included file: packet-q932-ettarr.c ---*/ +#line 1 "packet-q932-ettarr.c" + &ett_q932_PresentedAddressScreened, + &ett_q932_PresentedAddressUnscreened, + &ett_q932_PresentedNumberScreened, + &ett_q932_PresentedNumberUnscreened, + &ett_q932_AddressScreened, + &ett_q932_NumberScreened, + &ett_q932_Address, + &ett_q932_PartyNumber, + &ett_q932_PublicPartyNumber, + &ett_q932_PrivatePartyNumber, + &ett_q932_PartySubaddress, + &ett_q932_UserSpecifiedSubaddress, + &ett_q932_NetworkFacilityExtension_U, + +/*--- End of included file: packet-q932-ettarr.c ---*/ +#line 303 "packet-q932-template.c" + }; + + /* Register protocol and dissector */ + proto_q932 = proto_register_protocol(PNAME, PSNAME, PFNAME); + register_dissector("q932.apdu", dissect_q932_apdu, proto_q932); + + /* Register fields and subtrees */ + proto_register_field_array(proto_q932, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + + /* Register dissector tables */ + q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE); + q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE); + q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX); + q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX); +} + +/*--- proto_reg_handoff_q932 ------------------------------------------------*/ +void proto_reg_handoff_q932(void) { + dissector_handle_t q932_ie_handle; + + q932_ie_handle = create_dissector_handle(dissect_q932_ie, proto_q932); + /* Facility */ + dissector_add("q931.ie", (0x00 << 8) | Q932_IE_FACILITY, q932_ie_handle); + /* Notification indicator */ + dissector_add("q931.ie", (0x00 << 8) | Q932_IE_NOTIFICATION_INDICATOR, q932_ie_handle); + + data_handle = find_dissector("data"); +} + +/*---------------------------------------------------------------------------*/
\ No newline at end of file diff --git a/epan/dissectors/packet-q932.h b/epan/dissectors/packet-q932.h new file mode 100644 index 0000000000..a163af29c9 --- /dev/null +++ b/epan/dissectors/packet-q932.h @@ -0,0 +1,111 @@ +/* Do not modify this file. */ +/* It is created automatically by the ASN.1 to Wireshark dissector compiler */ +/* .\packet-q932.h */ +/* ../../tools/asn2wrs.py -b -T -e -p q932 -c q932.cnf -s packet-q932-template Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn */ + +/* Input file: packet-q932-template.h */ + +#line 1 "packet-q932-template.h" +/* packet-q932.h + * Routines for Q.932 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef PACKET_Q932_H +#define PACKET_Q932_H + + +/*--- Included file: packet-q932-exp.h ---*/ +#line 1 "packet-q932-exp.h" + +static const value_string q932_PresentedAddressScreened_vals[] = { + { 0, "presentationAlIowedAddress" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueTolnterworking" }, + { 3, "presentationRestrictedAddress" }, + { 0, NULL } +}; + +static const value_string q932_PresentedAddressUnscreened_vals[] = { + { 0, "presentationAllowedAddress" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueTolnterworking" }, + { 3, "presentationRestrictedAddress" }, + { 0, NULL } +}; + +static const value_string q932_PresentedNumberScreened_vals[] = { + { 0, "presentationAllowedNumber" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueToInterworking" }, + { 3, "presentationRestrictedNumber" }, + { 0, NULL } +}; + +static const value_string q932_PresentedNumberUnscreened_vals[] = { + { 0, "presentationAllowedNumber" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueToInterworking" }, + { 3, "presentationRestrictedNumber" }, + { 0, NULL } +}; + +static const value_string q932_PartyNumber_vals[] = { + { 0, "unknownPartyNumber" }, + { 1, "publicPartyNumber" }, + { 2, "nsapEncodedNumber" }, + { 3, "dataPartyNumber" }, + { 4, "telexPartyNumber" }, + { 5, "privatePartyNumber" }, + { 8, "nationalStandardPartyNumber" }, + { 0, NULL } +}; + +static const value_string q932_PartySubaddress_vals[] = { + { 0, "userSpecifiedSubaddress" }, + { 1, "nSAPSubaddress" }, + { 0, NULL } +}; + +static const value_string q932_ScreeningIndicator_vals[] = { + { 0, "userProvidedNotScreened" }, + { 1, "userProvidedVerifiedAndPassed" }, + { 2, "userProvidedVerifiedAndFailed" }, + { 3, "networkProvided" }, + { 0, NULL } +}; +extern int dissect_q932_PresentedAddressScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_PresentedAddressUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_PresentedNumberScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_PresentedNumberUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_PartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_PartySubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_ScreeningIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); +extern int dissect_q932_PresentationAllowedIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); + +/*--- End of included file: packet-q932-exp.h ---*/ +#line 30 "packet-q932-template.h" + +#endif /* PACKET_Q932_H */ + diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c new file mode 100644 index 0000000000..a6610fc9ad --- /dev/null +++ b/epan/dissectors/packet-qsig.c @@ -0,0 +1,2938 @@ +/* Do not modify this file. */ +/* It is created automatically by the ASN.1 to Wireshark dissector compiler */ +/* .\packet-qsig.c */ +/* ../../tools/asn2wrs.py -b -T -e -p qsig -c qsig.cnf -s packet-qsig-template qsig-gf-ext.asn qsig-gf-gp.asn qsig-gf-ade.asn qsig-na.asn qsig-cf.asn */ + +/* Input file: packet-qsig-template.c */ + +#line 1 "packet-qsig-template.c" +/* packet-qsig.c + * Routines for QSIG packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <epan/packet.h> +#include <epan/prefs.h> +#include <epan/strutil.h> +#include <epan/emem.h> + +#include "packet-ber.h" +#include "packet-qsig.h" + +#define PNAME "QSIG" +#define PSNAME "QSIG" +#define PFNAME "qsig" + +/* Shifted codeset values */ +#define CS0 0x000 +#define CS1 0x100 +#define CS2 0x200 +#define CS3 0x300 +#define CS4 0x400 +#define CS5 0x500 +#define CS6 0x600 +#define CS7 0x700 + +#define QSIG_IE_TRANSIT_COUNTER 0x31 +#define QSIG_IE_PARTY_CATEGORY 0x32 + +static const value_string qsig_str_ie_type_cs4[] = { + { QSIG_IE_TRANSIT_COUNTER , "Transit counter" }, + { 0, NULL} +}; +static const value_string qsig_str_ie_type_cs5[] = { + { QSIG_IE_PARTY_CATEGORY , "Party category" }, + { 0, NULL} +}; +/* Codeset array */ +static const value_string *qsig_str_ie_type[] = { + NULL, + NULL, + NULL, + NULL, + qsig_str_ie_type_cs4, + qsig_str_ie_type_cs5, + NULL, + NULL, +}; + + +static const value_string qsig_str_pc[] = { + { 0x00 , "unknown" }, + { 0x01 , "extension" }, + { 0x02 , "operator" }, + { 0x03 , "emergency extension" }, + { 0, NULL} +}; + +const value_string qsig_str_service[] = { + { 13868, "QSIG-NA" }, + { 13873, "QSIG-CF" }, + { 13874, "QSIG-PR" }, + { 13869, "QSIG-CT" }, + { 13870, "QSIG-CC" }, + { 14843, "QSIG-CO" }, + { 14844, "QSIG-DND(O)" }, + { 14846, "QSIG-CI" }, + { 15050, "QSIG-AOC" }, + { 15052, "QSIG-RE" }, + { 15054, "QSIG-CINT" }, + { 15506, "QSIG-MWI" }, + { 15507, "SYNC-SIG" }, + { 15772, "QSIG-CMN" }, + { 15992, "QSIG-CPI(P)" }, + { 17876, "QSIG-PUMR" }, + { 17878, "QSIG-PUMCH" }, + { 19460, "QSIG-SSCT" }, + { 15429, "QSIG-WTMLR" }, + { 15431, "QSIG-WTMCH" }, + { 15433, "QSIG-WTMAU" }, + { 21407, "QSIG-SD" }, + { 21889, "QSIG-CIDL" }, + { 325, "QSIG-SMS" }, + { 344, "QSIG-MCR" }, + { 3471, "QSIG-MCM" }, + { 3472, "QSIG-MID" }, + { 0, NULL} +}; + +const value_string qsig_str_service_name[] = { + { 13868, "Name-Operations" }, + { 13873, "Call-Diversion-Operations" }, + { 13874, "Path-Replacement-Operations" }, + { 13869, "Call-Transfer-Operations" }, + { 13870, "SS-CC-Operations" }, + { 14843, "Call-Offer-Operations" }, + { 14844, "Do-Not-Disturb-Operations" }, + { 14846, "Call-Intrusion-Operations" }, + { 15050, "SS-AOC-Operation" }, + { 15052, "Recall-Operation" }, + { 15054, "Call-Interception-Operations" }, + { 15506, "SS-MWI-Operations" }, + { 15507, "Synchronization-Operations" }, + { 15772, "Common-Information-Operations" }, + { 15992, "Call-Interruption-Operation" }, + { 17876, "PUM-Registration-Operation" }, + { 17878, "Private-User-Mobility-Call-Handling-Operations" }, + { 19460, "Single-Step-Call-Transfer-Operations" }, + { 15429, "WTM-Location-Registration-Operations" }, + { 15431, "Wireless-Terminal-Call-Handling-Operations" }, + { 15433, "WTM-Authentication-Operations" }, + { 21407, "SS-SD-Operations" }, + { 21889, "Call-Identification-and-Call-Linkage-Operations" }, + { 325, "Short-Message-Service-Operations" }, + { 344, "SS-MCR-Operations" }, + { 3471, "SS-MCM-Operations" }, + { 3472, "SS-MID-Operations" }, + { 0, NULL} +}; + +const value_string qsig_str_operation[] = { + { 0, "callingName" }, + { 1, "calledName" }, + { 2, "connectedName" }, + { 3, "busyName" }, + { 4, "pathReplacePropose" }, + { 5, "pathReplaceSetup" }, + { 6, "pathReplaceRetain" }, + { 7, "callTransferIdentify" }, + { 8, "callTransferAbandon" }, + { 9, "callTransferInitiate" }, + { 10, "callTransferSetup" }, + { 11, "callTransferActive" }, + { 12, "callTransferComplete" }, + { 13, "callTransferUpdate" }, + { 14, "subaddressTransfer" }, + { 15, "activateDiversionQ" }, + { 16, "deactivateDiversionQ" }, + { 17, "interrogateDiversionQ" }, + { 18, "checkRestriction" }, + { 19, "callRerouteing" }, + { 20, "divertingLegInformation1" }, + { 21, "divertingLegInformation2" }, + { 22, "divertingLegInformation3" }, + { 23, "cfnrDivertedLegFailed" }, +/* 24 Reserved (corresponding integer value used by ISO for MLPP) */ +/* 25 Reserved (corresponding integer value used by ISO for MLPP) */ +/* 26 Reserved (corresponding integer value used by ISO for MLPP) */ + { 27, "ccnrRequest" }, + { 28, "ccCancel" }, + { 29, "ccExecPossible" }, + { 30, "ccPathReserve" }, + { 31, "ccRingout" }, + { 32, "ccSuspend" }, + { 33, "ccResume" }, + { 34, "callOfferRequest" }, + { 35, "doNotDisturbActivateQ" }, + { 36, "doNotDisturbDeactivateQ" }, + { 37, "doNotDisturbInterrogateQ" }, + { 38, "doNotDisturbOverrideQ" }, + { 39, "doNotDisturbOvrExecuteQ" }, + { 40, "ccbsRequest" }, + { 41, "pathRetain" }, /* common for QSIG-CO, QSIG-DND(O), QSIG-CI */ + { 42, "serviceAvailable" }, /* common for QSIG-CO, QSIG-DND(O), QSIG-CI */ + { 43, "callIntrusionRequest" }, + { 44, "callIntrusionGetCIPL" }, + { 45, "callIntrusionIsolate" }, + { 46, "callIntrusionForcedRelease" }, + { 47, "callIntrusionWOBRequest" }, + { 48, "callIntrusionCompleted" }, + { 49, "cfbOverride" }, /* common for QSIG-CO, QSIG-CI */ + { 50, "locUpdate" }, + { 51, "locDelete" }, + { 52, "locDeReg" }, + { 53, "pisnEnquiry" }, + { 54, "wtmiEnquiry" }, + { 55, "wtmiDivert" }, + { 56, "wtmiInform" }, + { 57, "recallAlerting" }, + { 58, "recallAnswered" }, + { 59, "chargeRequest" }, + { 60, "getFinalCharge" }, + { 61, "aocFinal" }, + { 62, "aocInterim" }, + { 63, "aocRate" }, + { 64, "aocComplete" }, + { 65, "aocDivChargeReq" }, + { 66, "cintLegInformation1" }, + { 67, "cintLegInformation2" }, + { 68, "cintCondition" }, + { 69, "cintDisable" }, + { 70, "cintEnable" }, + { 71, "wtmoCall" }, + { 72, "authWtmUser" }, + { 73, "getWtatParam" }, + { 74, "wtatParamEnq" }, + { 75, "getWtanParam" }, + { 76, "wtanParamEnq" }, + { 77, "transferAuthParam" }, + { 78, "synchronizationRequest" }, + { 79, "synchronizationInfo" }, + { 80, "mwiActivate/mCMNewMsg" }, /* common for QSIG-MWI, QSIG-MCM */ + { 81, "mwiDeactivate/mCMNoNewMsg" }, /* common for QSIG-MWI, QSIG-MCM */ + { 82, "mwiInterrogate/mCMUpdateReq" }, /* common for QSIG-MWI, QSIG-MCM */ +/* 83 Reserved (corresponding integer value used by ISO for RRC) ISO/IEC 13241 */ + { 84, "cmnRequest" }, + { 85, "cmnInform" }, + { 86, "pathReplaceInvite" }, + { 87, "callInterruptionRequest" }, + { 88, "callProtectionRequest" }, + { 89, "pumRegistr" }, + { 90, "pumDelReg" }, + { 91, "pumDe-reg" }, + { 92, "pumInterrog" }, + { 93, "pumiEnquiry" }, + { 94, "pumiDivert" }, + { 95, "pumiInform" }, + { 96, "pumoCall" }, + { 97, "getRRCInf" }, + { 98, "locInfoCheck" }, + { 99, "ssctInitiate" }, + { 100, "ssctSetup" }, + { 101, "ssctPostDial" }, + { 102, "ssctDigitInfo" }, + { 103, "display" }, + { 104, "keypad" }, + { 105, "callIdentificationAssign" }, + { 106, "callIdentificationUpdate" }, + { 107, "smsSubmit" }, + { 108, "smsDeliver" }, + { 109, "smsStatusReport" }, + { 110, "smsCommand" }, + { 111, "scAlert" }, + { 112, "mCRequest" }, + { 113, "mCAlerting" }, + { 114, "mCInform" }, + { 115, "mCMUpdate" }, + { 116, "mCMService" }, + { 117, "mCMInterrogate" }, + { 118, "mCMailboxFull" }, + { 119, "mIDMailboxAuth" }, + { 120, "mIDMailboxID" }, + { 0, NULL} +}; + + +void dissect_qsig_arg(tvbuff_t*, packet_info*, proto_tree*, guint32); +#define FNABODY(x) static void dissect_qsig_arg##x(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) \ + { dissect_qsig_arg(tvb, pinfo, tree, (x)); } + +void dissect_qsig_res(tvbuff_t*, packet_info*, proto_tree*, guint32); +#define FNRBODY(x) static void dissect_qsig_res##x(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) \ + { dissect_qsig_res(tvb, pinfo, tree, (x)); } + +/* QSIG-NA */ +FNABODY(0) FNRBODY(0) +FNABODY(1) FNRBODY(1) +FNABODY(2) FNRBODY(2) +FNABODY(3) FNRBODY(3) +/* QSIG-CF */ +FNABODY(15) FNRBODY(15) +FNABODY(16) FNRBODY(16) +FNABODY(17) FNRBODY(17) +FNABODY(18) FNRBODY(18) +FNABODY(19) FNRBODY(19) +FNABODY(20) FNRBODY(20) +FNABODY(21) FNRBODY(21) +FNABODY(22) FNRBODY(22) +FNABODY(23) FNRBODY(23) +/* QSIG-PR */ +FNABODY(4) FNRBODY(4) +FNABODY(5) FNRBODY(5) +FNABODY(6) FNRBODY(6) +FNABODY(86) FNRBODY(86) +/* QSIG-CT */ +FNABODY(7) FNRBODY(7) +FNABODY(8) FNRBODY(8) +FNABODY(9) FNRBODY(9) +FNABODY(10) FNRBODY(10) +FNABODY(11) FNRBODY(11) +FNABODY(12) FNRBODY(12) +FNABODY(13) FNRBODY(13) +FNABODY(14) FNRBODY(14) +/* QSIG-CC */ +FNABODY(40) FNRBODY(40) +FNABODY(27) FNRBODY(27) +FNABODY(28) FNRBODY(28) +FNABODY(29) FNRBODY(29) +FNABODY(30) FNRBODY(30) +FNABODY(31) FNRBODY(31) +FNABODY(32) FNRBODY(32) +FNABODY(33) FNRBODY(33) +/* QSIG-CO */ +FNABODY(34) FNRBODY(34) +/* see common for QSIG-CO, QSIG-DND(O), QSIG-CI */ +/* QSIG-DND(O) */ +FNABODY(35) FNRBODY(35) +FNABODY(36) FNRBODY(36) +FNABODY(37) FNRBODY(37) +FNABODY(38) FNRBODY(38) +FNABODY(39) FNRBODY(39) +/* see common for QSIG-CO, QSIG-DND(O), QSIG-CI */ +/* QSIG-CI */ +FNABODY(43) FNRBODY(43) +FNABODY(44) FNRBODY(44) +FNABODY(45) FNRBODY(45) +FNABODY(46) FNRBODY(46) +FNABODY(47) FNRBODY(47) +FNABODY(48) FNRBODY(48) +/* QSIG-AOC */ +FNABODY(59) FNRBODY(59) +FNABODY(60) FNRBODY(60) +FNABODY(61) FNRBODY(61) +FNABODY(62) FNRBODY(62) +FNABODY(63) FNRBODY(63) +FNABODY(64) FNRBODY(64) +FNABODY(65) FNRBODY(65) +/* QSIG-RE */ +FNABODY(57) FNRBODY(57) +FNABODY(58) FNRBODY(58) +/* QSIG-CINT */ +FNABODY(66) FNRBODY(66) +FNABODY(67) FNRBODY(67) +FNABODY(68) FNRBODY(68) +FNABODY(69) FNRBODY(69) +FNABODY(70) FNRBODY(70) +/* QSIG-MWI */ +/* see common for QSIG-MWI, QSIG-MCM */ +/* SYNC-SIG */ +FNABODY(78) FNRBODY(78) +FNABODY(79) FNRBODY(79) +/* QSIG-CMN */ +FNABODY(84) FNRBODY(84) +FNABODY(85) FNRBODY(85) +/* QSIG-CPI(P) */ +FNABODY(87) FNRBODY(87) +FNABODY(88) FNRBODY(88) +/* QSIG-PUMR */ +FNABODY(89) FNRBODY(89) +FNABODY(90) FNRBODY(90) +FNABODY(91) FNRBODY(91) +FNABODY(92) FNRBODY(92) +/* QSIG-PUMCH */ +FNABODY(93) FNRBODY(93) +FNABODY(94) FNRBODY(94) +FNABODY(95) FNRBODY(95) +FNABODY(96) FNRBODY(96) +/* QSIG-SSCT */ +FNABODY(99) FNRBODY(99) +FNABODY(100) FNRBODY(100) +FNABODY(101) FNRBODY(101) +FNABODY(102) FNRBODY(102) +/* QSIG-WTMLR */ +FNABODY(50) FNRBODY(50) +FNABODY(51) FNRBODY(51) +FNABODY(52) FNRBODY(52) +FNABODY(53) FNRBODY(53) +FNABODY(97) FNRBODY(97) +FNABODY(98) FNRBODY(98) +/* QSIG-WTMCH */ +FNABODY(54) FNRBODY(54) +FNABODY(55) FNRBODY(55) +FNABODY(56) FNRBODY(56) +FNABODY(71) FNRBODY(71) +/* QSIG-WTMAU */ +FNABODY(72) FNRBODY(72) +FNABODY(73) FNRBODY(73) +FNABODY(74) FNRBODY(74) +FNABODY(75) FNRBODY(75) +FNABODY(76) FNRBODY(76) +FNABODY(77) FNRBODY(77) +/* QSIG-SD */ +FNABODY(103) FNRBODY(103) +FNABODY(104) FNRBODY(104) +/* QSIG-CIDL */ +FNABODY(105) FNRBODY(105) +FNABODY(106) FNRBODY(106) +/* QSIG-SMS */ +FNABODY(107) FNRBODY(107) +FNABODY(108) FNRBODY(108) +FNABODY(109) FNRBODY(109) +FNABODY(110) FNRBODY(110) +FNABODY(111) FNRBODY(111) +/* QSIG-MCR */ +FNABODY(112) FNRBODY(112) +FNABODY(113) FNRBODY(113) +FNABODY(114) FNRBODY(114) +/* QSIG-MCM */ +FNABODY(115) FNRBODY(115) +FNABODY(116) FNRBODY(116) +FNABODY(117) FNRBODY(117) +FNABODY(118) FNRBODY(118) +/* QSIG-MID */ +FNABODY(119) FNRBODY(119) +FNABODY(120) FNRBODY(120) +/* common for QSIG-CO, QSIG-DND(O), QSIG-CI */ +FNABODY(41) FNRBODY(41) +FNABODY(42) FNRBODY(42) +FNABODY(49) FNRBODY(49) +/* common for QSIG-MWI, QSIG-MCM */ +FNABODY(80) FNRBODY(80) +FNABODY(81) FNRBODY(81) +FNABODY(82) FNRBODY(82) + + +typedef guint32 (*pdu_fn)(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset); + +typedef struct _qsig_op { + guint32 service; + dissector_t arg_dissector; + dissector_t res_dissector; + dissector_t arg_pdu; + dissector_t res_pdu; +} qsig_op; +#define FNA(x) dissect_qsig_arg##x +#define FNR(x) dissect_qsig_res##x + +/* Initialize the protocol and registered fields */ +int proto_qsig = -1; +static int hf_qsig_operation = -1; +static int hf_qsig_service = -1; +static int hf_qsig_ie_type = -1; +static int hf_qsig_ie_type_cs4 = -1; +static int hf_qsig_ie_type_cs5 = -1; +static int hf_qsig_ie_len = -1; +static int hf_qsig_ie_data = -1; +static int hf_qsig_tc = -1; +static int hf_qsig_pc = -1; + +/*--- Included file: packet-qsig-hf.c ---*/ +#line 1 "packet-qsig-hf.c" +static int hf_qsig_NameArg_PDU = -1; /* NameArg */ +static int hf_qsig_ActivateDivArg_PDU = -1; /* ActivateDivArg */ +static int hf_qsig_ActivateDivRes_PDU = -1; /* ActivateDivRes */ +static int hf_qsig_DeactivateDivArg_PDU = -1; /* DeactivateDivArg */ +static int hf_qsig_DeactivateDivRes_PDU = -1; /* DeactivateDivRes */ +static int hf_qsig_InterrDivArg_PDU = -1; /* InterrDivArg */ +static int hf_qsig_ChkResArg_PDU = -1; /* ChkResArg */ +static int hf_qsig_ChkResRes_PDU = -1; /* ChkResRes */ +static int hf_qsig_CallRrArg_PDU = -1; /* CallRrArg */ +static int hf_qsig_CallRrRes_PDU = -1; /* CallRrRes */ +static int hf_qsig_DivLegInf1Arg_PDU = -1; /* DivLegInf1Arg */ +static int hf_qsig_DivLegInf2Arg_PDU = -1; /* DivLegInf2Arg */ +static int hf_qsig_DivLegInf3Arg_PDU = -1; /* DivLegInf3Arg */ +static int hf_qsig_DivLegFailArg_PDU = -1; /* DivLegFailArg */ +static int hf_qsig_IntResultList_PDU = -1; /* IntResultList */ +static int hf_qsig_extensionId = -1; /* OBJECT_IDENTIFIER */ +static int hf_qsig_extensionArgument = -1; /* T_extensionArgument */ +static int hf_qsig_presentationAllowedAddressS = -1; /* AddressScreened */ +static int hf_qsig_presentationRestricted = -1; /* NULL */ +static int hf_qsig_numberNotAvailableDueToInterworking = -1; /* NULL */ +static int hf_qsig_presentationRestrictedAddressS = -1; /* AddressScreened */ +static int hf_qsig_presentationAllowedAddressU = -1; /* Address */ +static int hf_qsig_presentationRestrictedAddressU = -1; /* Address */ +static int hf_qsig_presentationAllowedAddressNS = -1; /* NumberScreened */ +static int hf_qsig_presentationRestrictedAddressNS = -1; /* NumberScreened */ +static int hf_qsig_presentationAllowedAddressNU = -1; /* PartyNumber */ +static int hf_qsig_presentationRestrictedAddressNU = -1; /* PartyNumber */ +static int hf_qsig_partyNumber = -1; /* PartyNumber */ +static int hf_qsig_screeningIndicator = -1; /* ScreeningIndicator */ +static int hf_qsig_partySubaddress = -1; /* PartySubaddress */ +static int hf_qsig_unknownPartyNumber = -1; /* NumberDigits */ +static int hf_qsig_publicPartyNumber = -1; /* PublicPartyNumber */ +static int hf_qsig_dataPartyNumber = -1; /* NumberDigits */ +static int hf_qsig_telexPartyNumber = -1; /* NumberDigits */ +static int hf_qsig_privatePartyNumber = -1; /* PrivatePartyNumber */ +static int hf_qsig_nationalStandardPartyNumber = -1; /* NumberDigits */ +static int hf_qsig_publicTypeOfNumber = -1; /* PublicTypeOfNumber */ +static int hf_qsig_publicNumberDigits = -1; /* NumberDigits */ +static int hf_qsig_privateTypeOfNumber = -1; /* PrivateTypeOfNumber */ +static int hf_qsig_privateNumberDigits = -1; /* NumberDigits */ +static int hf_qsig_userSpecifiedSubaddress = -1; /* UserSpecifiedSubaddress */ +static int hf_qsig_nSAPSubaddress = -1; /* NSAPSubaddress */ +static int hf_qsig_subaddressInformation = -1; /* SubaddressInformation */ +static int hf_qsig_oddCountIndicator = -1; /* BOOLEAN */ +static int hf_qsig_name = -1; /* Name */ +static int hf_qsig_nameSequence = -1; /* T_nameSequence */ +static int hf_qsig_extensionNA = -1; /* NameExtension */ +static int hf_qsig_single = -1; /* Extension */ +static int hf_qsig_multiple = -1; /* SEQUENCE_OF_Extension */ +static int hf_qsig_multiple_item = -1; /* Extension */ +static int hf_qsig_namePresentationAllowed = -1; /* NamePresentationAllowed */ +static int hf_qsig_namePresentationRestricted = -1; /* NamePresentationRestricted */ +static int hf_qsig_nameNotAvailable = -1; /* NameNotAvailable */ +static int hf_qsig_namePresentationAllowedSimple = -1; /* NameData */ +static int hf_qsig_namePresentationAllowedExtended = -1; /* NameSet */ +static int hf_qsig_namePresentationRestrictedSimple = -1; /* NameData */ +static int hf_qsig_namePresentationRestrictedExtended = -1; /* NameSet */ +static int hf_qsig_namePresentationRestrictedNull = -1; /* NULL */ +static int hf_qsig_nameData = -1; /* NameData */ +static int hf_qsig_characterSet = -1; /* CharacterSet */ +static int hf_qsig_procedure = -1; /* Procedure */ +static int hf_qsig_basicService = -1; /* BasicService */ +static int hf_qsig_divertedToAddress = -1; /* Address */ +static int hf_qsig_servedUserNr = -1; /* PartyNumber */ +static int hf_qsig_activatingUserNr = -1; /* PartyNumber */ +static int hf_qsig_extensionAD = -1; /* ADExtension */ +static int hf_qsig_null = -1; /* NULL */ +static int hf_qsig_deactivatingUserNr = -1; /* PartyNumber */ +static int hf_qsig_extensionDD = -1; /* DDExtension */ +static int hf_qsig_interrogatingUserNr = -1; /* PartyNumber */ +static int hf_qsig_extensionID = -1; /* IDExtension */ +static int hf_qsig_divertedToNr = -1; /* PartyNumber */ +static int hf_qsig_extensionCHR = -1; /* CHRExtension */ +static int hf_qsig_rerouteingReason = -1; /* DiversionReason */ +static int hf_qsig_originalRerouteingReason = -1; /* DiversionReason */ +static int hf_qsig_calledAddress = -1; /* Address */ +static int hf_qsig_diversionCounter = -1; /* INTEGER_1_15 */ +static int hf_qsig_pSS1InfoElement = -1; /* PSS1InformationElement */ +static int hf_qsig_lastRerouteingNr = -1; /* PresentedNumberUnscreened */ +static int hf_qsig_subscriptionOption = -1; /* SubscriptionOption */ +static int hf_qsig_callingPartySubaddress = -1; /* PartySubaddress */ +static int hf_qsig_callingNumber = -1; /* PresentedNumberScreened */ +static int hf_qsig_callingName = -1; /* Name */ +static int hf_qsig_originalCalledNr = -1; /* PresentedNumberUnscreened */ +static int hf_qsig_redirectingName = -1; /* Name */ +static int hf_qsig_originalCalledName = -1; /* Name */ +static int hf_qsig_extensionCRR = -1; /* CRRExtension */ +static int hf_qsig_diversionReason = -1; /* DiversionReason */ +static int hf_qsig_nominatedNr = -1; /* PartyNumber */ +static int hf_qsig_extensionDLI1 = -1; /* DLI1Extension */ +static int hf_qsig_originalDiversionReason = -1; /* DiversionReason */ +static int hf_qsig_divertingNr = -1; /* PresentedNumberUnscreened */ +static int hf_qsig_extensionDLI2 = -1; /* DLI2Extension */ +static int hf_qsig_presentationAllowedIndicator = -1; /* PresentationAllowedIndicator */ +static int hf_qsig_redirectionName = -1; /* Name */ +static int hf_qsig_extensionDLI3 = -1; /* DLI3Extension */ +static int hf_qsig_IntResultList_item = -1; /* IntResult */ +static int hf_qsig_remoteEnabled = -1; /* BOOLEAN */ +static int hf_qsig_extensionIR = -1; /* IRExtension */ + +/*--- End of included file: packet-qsig-hf.c ---*/ +#line 455 "packet-qsig-template.c" + +static int *hf_qsig_ie_type_arr[] = { + NULL, + NULL, + NULL, + NULL, + &hf_qsig_ie_type_cs4, + &hf_qsig_ie_type_cs5, + NULL, + NULL, +}; + +/* Initialize the subtree pointers */ +static gint ett_qsig = -1; +static gint ett_qsig_ie = -1; + +/*--- Included file: packet-qsig-ett.c ---*/ +#line 1 "packet-qsig-ett.c" +static gint ett_qsig_Extension = -1; +static gint ett_qsig_PresentedAddressScreened = -1; +static gint ett_qsig_PresentedAddressUnscreened = -1; +static gint ett_qsig_PresentedNumberScreened = -1; +static gint ett_qsig_PresentedNumberUnscreened = -1; +static gint ett_qsig_AddressScreened = -1; +static gint ett_qsig_NumberScreened = -1; +static gint ett_qsig_Address = -1; +static gint ett_qsig_PartyNumber = -1; +static gint ett_qsig_PublicPartyNumber = -1; +static gint ett_qsig_PrivatePartyNumber = -1; +static gint ett_qsig_PartySubaddress = -1; +static gint ett_qsig_UserSpecifiedSubaddress = -1; +static gint ett_qsig_NameArg = -1; +static gint ett_qsig_T_nameSequence = -1; +static gint ett_qsig_NameExtension = -1; +static gint ett_qsig_SEQUENCE_OF_Extension = -1; +static gint ett_qsig_Name = -1; +static gint ett_qsig_NamePresentationAllowed = -1; +static gint ett_qsig_NamePresentationRestricted = -1; +static gint ett_qsig_NameSet = -1; +static gint ett_qsig_ActivateDivArg = -1; +static gint ett_qsig_ADExtension = -1; +static gint ett_qsig_ActivateDivRes = -1; +static gint ett_qsig_DeactivateDivArg = -1; +static gint ett_qsig_DDExtension = -1; +static gint ett_qsig_DeactivateDivRes = -1; +static gint ett_qsig_InterrDivArg = -1; +static gint ett_qsig_IDExtension = -1; +static gint ett_qsig_ChkResArg = -1; +static gint ett_qsig_CHRExtension = -1; +static gint ett_qsig_ChkResRes = -1; +static gint ett_qsig_CallRrArg = -1; +static gint ett_qsig_CRRExtension = -1; +static gint ett_qsig_CallRrRes = -1; +static gint ett_qsig_DivLegInf1Arg = -1; +static gint ett_qsig_DLI1Extension = -1; +static gint ett_qsig_DivLegInf2Arg = -1; +static gint ett_qsig_DLI2Extension = -1; +static gint ett_qsig_DivLegInf3Arg = -1; +static gint ett_qsig_DLI3Extension = -1; +static gint ett_qsig_DivLegFailArg = -1; +static gint ett_qsig_IntResultList = -1; +static gint ett_qsig_IntResult = -1; +static gint ett_qsig_IRExtension = -1; + +/*--- End of included file: packet-qsig-ett.c ---*/ +#line 471 "packet-qsig-template.c" + +/* Preferences */ + +/* Subdissectors */ +static dissector_handle_t data_handle = NULL; + +/* Gloabl variables */ + + + +/*--- Included file: packet-qsig-fn.c ---*/ +#line 1 "packet-qsig-fn.c" +/*--- Fields for imported types ---*/ + + + + +static int +dissect_qsig_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL); + + return offset; +} +static int dissect_extensionId(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_OBJECT_IDENTIFIER(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionId); +} + + + +static int +dissect_qsig_T_extensionArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 65 "qsig.cnf" + + + + return offset; +} +static int dissect_extensionArgument(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_T_extensionArgument(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionArgument); +} + + +static const ber_sequence_t Extension_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_extensionId }, + { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_extensionArgument }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_Extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + Extension_sequence, hf_index, ett_qsig_Extension); + + return offset; +} +static int dissect_single_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Extension(TRUE, tvb, offset, pinfo, tree, hf_qsig_single); +} +static int dissect_multiple_item(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Extension(FALSE, tvb, offset, pinfo, tree, hf_qsig_multiple_item); +} + + + +static int +dissect_qsig_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} + + + +static int +dissect_qsig_PSS1InformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_tagged_type(implicit_tag, pinfo, tree, tvb, offset, + hf_index, BER_CLASS_APP, 0, TRUE, dissect_qsig_OCTET_STRING); + + return offset; +} +static int dissect_pSS1InfoElement(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PSS1InformationElement(FALSE, tvb, offset, pinfo, tree, hf_qsig_pSS1InfoElement); +} + + + +static int +dissect_qsig_NumberDigits(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString, + pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_unknownPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_qsig_unknownPartyNumber); +} +static int dissect_dataPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_qsig_dataPartyNumber); +} +static int dissect_telexPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_qsig_telexPartyNumber); +} +static int dissect_nationalStandardPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberDigits(TRUE, tvb, offset, pinfo, tree, hf_qsig_nationalStandardPartyNumber); +} +static int dissect_publicNumberDigits(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberDigits(FALSE, tvb, offset, pinfo, tree, hf_qsig_publicNumberDigits); +} +static int dissect_privateNumberDigits(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberDigits(FALSE, tvb, offset, pinfo, tree, hf_qsig_privateNumberDigits); +} + + +static const value_string qsig_PublicTypeOfNumber_vals[] = { + { 0, "unknown" }, + { 1, "internationalNumber" }, + { 2, "nationalNumber" }, + { 3, "networkSpecificNumber" }, + { 4, "subscriberNumber" }, + { 6, "abbreviatedNumber" }, + { 0, NULL } +}; + + +static int +dissect_qsig_PublicTypeOfNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_publicTypeOfNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PublicTypeOfNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_publicTypeOfNumber); +} + + +static const ber_sequence_t PublicPartyNumber_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_publicTypeOfNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_publicNumberDigits }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PublicPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + PublicPartyNumber_sequence, hf_index, ett_qsig_PublicPartyNumber); + + return offset; +} +static int dissect_publicPartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PublicPartyNumber(TRUE, tvb, offset, pinfo, tree, hf_qsig_publicPartyNumber); +} + + +static const value_string qsig_PrivateTypeOfNumber_vals[] = { + { 0, "unknown" }, + { 1, "level2RegionalNumber" }, + { 2, "level1RegionalNumber" }, + { 3, "pISNSpecificNumber" }, + { 4, "localNumber" }, + { 6, "abbreviatedNumber" }, + { 0, NULL } +}; + + +static int +dissect_qsig_PrivateTypeOfNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_privateTypeOfNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PrivateTypeOfNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_privateTypeOfNumber); +} + + +static const ber_sequence_t PrivatePartyNumber_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_privateTypeOfNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_privateNumberDigits }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PrivatePartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + PrivatePartyNumber_sequence, hf_index, ett_qsig_PrivatePartyNumber); + + return offset; +} +static int dissect_privatePartyNumber_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PrivatePartyNumber(TRUE, tvb, offset, pinfo, tree, hf_qsig_privatePartyNumber); +} + + +static const value_string qsig_PartyNumber_vals[] = { + { 0, "unknownPartyNumber" }, + { 1, "publicPartyNumber" }, + { 3, "dataPartyNumber" }, + { 4, "telexPartyNumber" }, + { 5, "privatePartyNumber" }, + { 8, "nationalStandardPartyNumber" }, + { 0, NULL } +}; + +static const ber_choice_t PartyNumber_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_unknownPartyNumber_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_publicPartyNumber_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_dataPartyNumber_impl }, + { 4, BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_telexPartyNumber_impl }, + { 5, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_privatePartyNumber_impl }, + { 8, BER_CLASS_CON, 8, BER_FLAGS_IMPLTAG, dissect_nationalStandardPartyNumber_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PartyNumber_choice, hf_index, ett_qsig_PartyNumber, + NULL); + + return offset; +} +static int dissect_presentationAllowedAddressNU(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_presentationAllowedAddressNU); +} +static int dissect_presentationRestrictedAddressNU(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_presentationRestrictedAddressNU); +} +static int dissect_partyNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_partyNumber); +} +static int dissect_servedUserNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_servedUserNr); +} +static int dissect_activatingUserNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_activatingUserNr); +} +static int dissect_deactivatingUserNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_deactivatingUserNr); +} +static int dissect_interrogatingUserNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_interrogatingUserNr); +} +static int dissect_divertedToNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_divertedToNr); +} +static int dissect_nominatedNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartyNumber(FALSE, tvb, offset, pinfo, tree, hf_qsig_nominatedNr); +} + + +static const value_string qsig_ScreeningIndicator_vals[] = { + { 0, "userProvidedNotScreened" }, + { 1, "userProvidedVerifiedAndPassed" }, + { 2, "userProvidedVerifiedAndFailed" }, + { 3, "networkProvided" }, + { 0, NULL } +}; + + +static int +dissect_qsig_ScreeningIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_screeningIndicator(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_ScreeningIndicator(FALSE, tvb, offset, pinfo, tree, hf_qsig_screeningIndicator); +} + + + +static int +dissect_qsig_SubaddressInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_subaddressInformation(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_SubaddressInformation(FALSE, tvb, offset, pinfo, tree, hf_qsig_subaddressInformation); +} + + + +static int +dissect_qsig_BOOLEAN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index); + + return offset; +} +static int dissect_oddCountIndicator(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_BOOLEAN(FALSE, tvb, offset, pinfo, tree, hf_qsig_oddCountIndicator); +} +static int dissect_remoteEnabled(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_BOOLEAN(FALSE, tvb, offset, pinfo, tree, hf_qsig_remoteEnabled); +} + + +static const ber_sequence_t UserSpecifiedSubaddress_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_subaddressInformation }, + { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_oddCountIndicator }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_UserSpecifiedSubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + UserSpecifiedSubaddress_sequence, hf_index, ett_qsig_UserSpecifiedSubaddress); + + return offset; +} +static int dissect_userSpecifiedSubaddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_UserSpecifiedSubaddress(FALSE, tvb, offset, pinfo, tree, hf_qsig_userSpecifiedSubaddress); +} + + + +static int +dissect_qsig_NSAPSubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_nSAPSubaddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NSAPSubaddress(FALSE, tvb, offset, pinfo, tree, hf_qsig_nSAPSubaddress); +} + + +static const value_string qsig_PartySubaddress_vals[] = { + { 0, "userSpecifiedSubaddress" }, + { 1, "nSAPSubaddress" }, + { 0, NULL } +}; + +static const ber_choice_t PartySubaddress_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_userSpecifiedSubaddress }, + { 1, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_nSAPSubaddress }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PartySubaddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PartySubaddress_choice, hf_index, ett_qsig_PartySubaddress, + NULL); + + return offset; +} +static int dissect_partySubaddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartySubaddress(FALSE, tvb, offset, pinfo, tree, hf_qsig_partySubaddress); +} +static int dissect_callingPartySubaddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PartySubaddress(FALSE, tvb, offset, pinfo, tree, hf_qsig_callingPartySubaddress); +} + + +static const ber_sequence_t AddressScreened_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partyNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_screeningIndicator }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partySubaddress }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_AddressScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + AddressScreened_sequence, hf_index, ett_qsig_AddressScreened); + + return offset; +} +static int dissect_presentationAllowedAddressS_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_AddressScreened(TRUE, tvb, offset, pinfo, tree, hf_qsig_presentationAllowedAddressS); +} +static int dissect_presentationRestrictedAddressS_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_AddressScreened(TRUE, tvb, offset, pinfo, tree, hf_qsig_presentationRestrictedAddressS); +} + + + +static int +dissect_qsig_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index); + + return offset; +} +static int dissect_presentationRestricted_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NULL(TRUE, tvb, offset, pinfo, tree, hf_qsig_presentationRestricted); +} +static int dissect_numberNotAvailableDueToInterworking_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NULL(TRUE, tvb, offset, pinfo, tree, hf_qsig_numberNotAvailableDueToInterworking); +} +static int dissect_namePresentationRestrictedNull_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NULL(TRUE, tvb, offset, pinfo, tree, hf_qsig_namePresentationRestrictedNull); +} +static int dissect_null(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NULL(FALSE, tvb, offset, pinfo, tree, hf_qsig_null); +} + + +static const value_string qsig_PresentedAddressScreened_vals[] = { + { 0, "presentationAllowedAddressS" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueToInterworking" }, + { 3, "presentationRestrictedAddressS" }, + { 0, NULL } +}; + +static const ber_choice_t PresentedAddressScreened_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_presentationAllowedAddressS_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueToInterworking_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_presentationRestrictedAddressS_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PresentedAddressScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedAddressScreened_choice, hf_index, ett_qsig_PresentedAddressScreened, + NULL); + + return offset; +} + + +static const ber_sequence_t Address_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partyNumber }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partySubaddress }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + Address_sequence, hf_index, ett_qsig_Address); + + return offset; +} +static int dissect_presentationAllowedAddressU_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Address(TRUE, tvb, offset, pinfo, tree, hf_qsig_presentationAllowedAddressU); +} +static int dissect_presentationRestrictedAddressU_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Address(TRUE, tvb, offset, pinfo, tree, hf_qsig_presentationRestrictedAddressU); +} +static int dissect_divertedToAddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Address(FALSE, tvb, offset, pinfo, tree, hf_qsig_divertedToAddress); +} +static int dissect_calledAddress(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Address(FALSE, tvb, offset, pinfo, tree, hf_qsig_calledAddress); +} + + +static const value_string qsig_PresentedAddressUnscreened_vals[] = { + { 0, "presentationAllowedAddressU" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueToInterworking" }, + { 3, "presentationRestrictedAddressU" }, + { 0, NULL } +}; + +static const ber_choice_t PresentedAddressUnscreened_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_presentationAllowedAddressU_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueToInterworking_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_presentationRestrictedAddressU_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PresentedAddressUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedAddressUnscreened_choice, hf_index, ett_qsig_PresentedAddressUnscreened, + NULL); + + return offset; +} + + +static const ber_sequence_t NumberScreened_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_partyNumber }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_screeningIndicator }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_NumberScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + NumberScreened_sequence, hf_index, ett_qsig_NumberScreened); + + return offset; +} +static int dissect_presentationAllowedAddressNS_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberScreened(TRUE, tvb, offset, pinfo, tree, hf_qsig_presentationAllowedAddressNS); +} +static int dissect_presentationRestrictedAddressNS_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NumberScreened(TRUE, tvb, offset, pinfo, tree, hf_qsig_presentationRestrictedAddressNS); +} + + +static const value_string qsig_PresentedNumberScreened_vals[] = { + { 0, "presentationAllowedAddressNS" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueToInterworking" }, + { 3, "presentationRestrictedAddressNS" }, + { 0, NULL } +}; + +static const ber_choice_t PresentedNumberScreened_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_presentationAllowedAddressNS_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueToInterworking_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_presentationRestrictedAddressNS_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PresentedNumberScreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedNumberScreened_choice, hf_index, ett_qsig_PresentedNumberScreened, + NULL); + + return offset; +} +static int dissect_callingNumber(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PresentedNumberScreened(FALSE, tvb, offset, pinfo, tree, hf_qsig_callingNumber); +} + + +static const value_string qsig_PresentedNumberUnscreened_vals[] = { + { 0, "presentationAllowedAddressNU" }, + { 1, "presentationRestricted" }, + { 2, "numberNotAvailableDueToInterworking" }, + { 3, "presentationRestrictedAddressNU" }, + { 0, NULL } +}; + +static const ber_choice_t PresentedNumberUnscreened_choice[] = { + { 0, BER_CLASS_CON, 0, 0, dissect_presentationAllowedAddressNU }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_presentationRestricted_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_numberNotAvailableDueToInterworking_impl }, + { 3, BER_CLASS_CON, 3, 0, dissect_presentationRestrictedAddressNU }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_PresentedNumberUnscreened(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + PresentedNumberUnscreened_choice, hf_index, ett_qsig_PresentedNumberUnscreened, + NULL); + + return offset; +} +static int dissect_lastRerouteingNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PresentedNumberUnscreened(FALSE, tvb, offset, pinfo, tree, hf_qsig_lastRerouteingNr); +} +static int dissect_originalCalledNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PresentedNumberUnscreened(FALSE, tvb, offset, pinfo, tree, hf_qsig_originalCalledNr); +} +static int dissect_divertingNr(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PresentedNumberUnscreened(FALSE, tvb, offset, pinfo, tree, hf_qsig_divertingNr); +} + + + +static int +dissect_qsig_PresentationAllowedIndicator(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_boolean(implicit_tag, pinfo, tree, tvb, offset, hf_index); + + return offset; +} +static int dissect_presentationAllowedIndicator(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_PresentationAllowedIndicator(FALSE, tvb, offset, pinfo, tree, hf_qsig_presentationAllowedIndicator); +} + + + +static int +dissect_qsig_NameData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_namePresentationAllowedSimple_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NameData(TRUE, tvb, offset, pinfo, tree, hf_qsig_namePresentationAllowedSimple); +} +static int dissect_namePresentationRestrictedSimple_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NameData(TRUE, tvb, offset, pinfo, tree, hf_qsig_namePresentationRestrictedSimple); +} +static int dissect_nameData(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NameData(FALSE, tvb, offset, pinfo, tree, hf_qsig_nameData); +} + + +static const value_string qsig_CharacterSet_vals[] = { + { 0, "unknown" }, + { 1, "iso8859-1" }, + { 3, "iso8859-2" }, + { 4, "iso8859-3" }, + { 5, "iso8859-4" }, + { 6, "iso8859-5" }, + { 7, "iso8859-7" }, + { 8, "iso10646-BmpString" }, + { 9, "iso10646-utf-8String" }, + { 0, NULL } +}; + + +static int +dissect_qsig_CharacterSet(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_characterSet(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_CharacterSet(FALSE, tvb, offset, pinfo, tree, hf_qsig_characterSet); +} + + +static const ber_sequence_t NameSet_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_nameData }, + { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_characterSet }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_NameSet(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + NameSet_sequence, hf_index, ett_qsig_NameSet); + + return offset; +} +static int dissect_namePresentationAllowedExtended_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NameSet(TRUE, tvb, offset, pinfo, tree, hf_qsig_namePresentationAllowedExtended); +} +static int dissect_namePresentationRestrictedExtended_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NameSet(TRUE, tvb, offset, pinfo, tree, hf_qsig_namePresentationRestrictedExtended); +} + + +static const value_string qsig_NamePresentationAllowed_vals[] = { + { 0, "namePresentationAllowedSimple" }, + { 1, "namePresentationAllowedExtended" }, + { 0, NULL } +}; + +static const ber_choice_t NamePresentationAllowed_choice[] = { + { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_namePresentationAllowedSimple_impl }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_namePresentationAllowedExtended_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_NamePresentationAllowed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + NamePresentationAllowed_choice, hf_index, ett_qsig_NamePresentationAllowed, + NULL); + + return offset; +} +static int dissect_namePresentationAllowed(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NamePresentationAllowed(FALSE, tvb, offset, pinfo, tree, hf_qsig_namePresentationAllowed); +} + + +static const value_string qsig_NamePresentationRestricted_vals[] = { + { 2, "namePresentationRestrictedSimple" }, + { 3, "namePresentationRestrictedExtended" }, + { 7, "namePresentationRestrictedNull" }, + { 0, NULL } +}; + +static const ber_choice_t NamePresentationRestricted_choice[] = { + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_namePresentationRestrictedSimple_impl }, + { 3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_namePresentationRestrictedExtended_impl }, + { 7, BER_CLASS_CON, 7, BER_FLAGS_IMPLTAG, dissect_namePresentationRestrictedNull_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_NamePresentationRestricted(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + NamePresentationRestricted_choice, hf_index, ett_qsig_NamePresentationRestricted, + NULL); + + return offset; +} +static int dissect_namePresentationRestricted(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NamePresentationRestricted(FALSE, tvb, offset, pinfo, tree, hf_qsig_namePresentationRestricted); +} + + + +static int +dissect_qsig_NameNotAvailable(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_tagged_type(implicit_tag, pinfo, tree, tvb, offset, + hf_index, BER_CLASS_CON, 4, TRUE, dissect_qsig_NULL); + + return offset; +} +static int dissect_nameNotAvailable(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NameNotAvailable(FALSE, tvb, offset, pinfo, tree, hf_qsig_nameNotAvailable); +} + + +static const ber_choice_t Name_choice[] = { + { 0, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_namePresentationAllowed }, + { 1, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_namePresentationRestricted }, + { 2, BER_CLASS_CON, 4, BER_FLAGS_NOOWNTAG, dissect_nameNotAvailable }, + { 0, 0, 0, 0, NULL } +}; + +int +dissect_qsig_Name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + Name_choice, hf_index, ett_qsig_Name, + NULL); + + return offset; +} +static int dissect_name(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Name(FALSE, tvb, offset, pinfo, tree, hf_qsig_name); +} +static int dissect_callingName(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Name(FALSE, tvb, offset, pinfo, tree, hf_qsig_callingName); +} +static int dissect_redirectingName(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Name(FALSE, tvb, offset, pinfo, tree, hf_qsig_redirectingName); +} +static int dissect_originalCalledName(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Name(FALSE, tvb, offset, pinfo, tree, hf_qsig_originalCalledName); +} +static int dissect_redirectionName(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Name(FALSE, tvb, offset, pinfo, tree, hf_qsig_redirectionName); +} + + +static const ber_sequence_t SEQUENCE_OF_Extension_sequence_of[1] = { + { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_multiple_item }, +}; + +static int +dissect_qsig_SEQUENCE_OF_Extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset, + SEQUENCE_OF_Extension_sequence_of, hf_index, ett_qsig_SEQUENCE_OF_Extension); + + return offset; +} +static int dissect_multiple_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_SEQUENCE_OF_Extension(TRUE, tvb, offset, pinfo, tree, hf_qsig_multiple); +} + + +static const value_string qsig_NameExtension_vals[] = { + { 5, "single" }, + { 6, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t NameExtension_choice[] = { + { 5, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 6, BER_CLASS_CON, 6, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_NameExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + NameExtension_choice, hf_index, ett_qsig_NameExtension, + NULL); + + return offset; +} +static int dissect_extensionNA(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_NameExtension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionNA); +} + + +static const ber_sequence_t T_nameSequence_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_name }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionNA }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_T_nameSequence(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + T_nameSequence_sequence, hf_index, ett_qsig_T_nameSequence); + + return offset; +} +static int dissect_nameSequence(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_T_nameSequence(FALSE, tvb, offset, pinfo, tree, hf_qsig_nameSequence); +} + + +static const value_string qsig_NameArg_vals[] = { + { 0, "name" }, + { 1, "nameSequence" }, + { 0, NULL } +}; + +static const ber_choice_t NameArg_choice[] = { + { 0, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_name }, + { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_nameSequence }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_NameArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + NameArg_choice, hf_index, ett_qsig_NameArg, + NULL); + + return offset; +} + + +static const value_string qsig_Procedure_vals[] = { + { 0, "cfu" }, + { 1, "cfb" }, + { 2, "cfnr" }, + { 0, NULL } +}; + + +static int +dissect_qsig_Procedure(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_procedure(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_Procedure(FALSE, tvb, offset, pinfo, tree, hf_qsig_procedure); +} + + +static const value_string qsig_BasicService_vals[] = { + { 0, "allServices" }, + { 1, "speech" }, + { 2, "unrestrictedDigitalInformation" }, + { 3, "audio3100Hz" }, + { 32, "telephony" }, + { 33, "teletex" }, + { 34, "telefaxGroup4Class1" }, + { 35, "videotexSyntaxBased" }, + { 36, "videotelephony" }, + { 0, NULL } +}; + + +static int +dissect_qsig_BasicService(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_basicService(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_BasicService(FALSE, tvb, offset, pinfo, tree, hf_qsig_basicService); +} + + +static const value_string qsig_ADExtension_vals[] = { + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t ADExtension_choice[] = { + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_ADExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + ADExtension_choice, hf_index, ett_qsig_ADExtension, + NULL); + + return offset; +} +static int dissect_extensionAD(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_ADExtension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionAD); +} + + +static const ber_sequence_t ActivateDivArg_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_procedure }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_basicService }, + { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_divertedToAddress }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_servedUserNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_activatingUserNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionAD }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_ActivateDivArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + ActivateDivArg_sequence, hf_index, ett_qsig_ActivateDivArg); + + return offset; +} + + +static const value_string qsig_ActivateDivRes_vals[] = { + { 0, "null" }, + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t ActivateDivRes_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_null }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_ActivateDivRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + ActivateDivRes_choice, hf_index, ett_qsig_ActivateDivRes, + NULL); + + return offset; +} + + +static const value_string qsig_DDExtension_vals[] = { + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t DDExtension_choice[] = { + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DDExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + DDExtension_choice, hf_index, ett_qsig_DDExtension, + NULL); + + return offset; +} +static int dissect_extensionDD(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DDExtension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionDD); +} + + +static const ber_sequence_t DeactivateDivArg_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_procedure }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_basicService }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_servedUserNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_deactivatingUserNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionDD }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DeactivateDivArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + DeactivateDivArg_sequence, hf_index, ett_qsig_DeactivateDivArg); + + return offset; +} + + +static const value_string qsig_DeactivateDivRes_vals[] = { + { 0, "null" }, + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t DeactivateDivRes_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_null }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DeactivateDivRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + DeactivateDivRes_choice, hf_index, ett_qsig_DeactivateDivRes, + NULL); + + return offset; +} + + +static const value_string qsig_IDExtension_vals[] = { + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t IDExtension_choice[] = { + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_IDExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + IDExtension_choice, hf_index, ett_qsig_IDExtension, + NULL); + + return offset; +} +static int dissect_extensionID(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_IDExtension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionID); +} + + +static const ber_sequence_t InterrDivArg_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_procedure }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_basicService }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_servedUserNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_interrogatingUserNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionID }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_InterrDivArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + InterrDivArg_sequence, hf_index, ett_qsig_InterrDivArg); + + return offset; +} + + +static const value_string qsig_CHRExtension_vals[] = { + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t CHRExtension_choice[] = { + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_CHRExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + CHRExtension_choice, hf_index, ett_qsig_CHRExtension, + NULL); + + return offset; +} +static int dissect_extensionCHR(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_CHRExtension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionCHR); +} + + +static const ber_sequence_t ChkResArg_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_servedUserNr }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_basicService }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_divertedToNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionCHR }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_ChkResArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + ChkResArg_sequence, hf_index, ett_qsig_ChkResArg); + + return offset; +} + + +static const value_string qsig_ChkResRes_vals[] = { + { 0, "null" }, + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t ChkResRes_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_null }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_ChkResRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + ChkResRes_choice, hf_index, ett_qsig_ChkResRes, + NULL); + + return offset; +} + + +static const value_string qsig_DiversionReason_vals[] = { + { 0, "unknown" }, + { 1, "cfu" }, + { 2, "cfb" }, + { 3, "cfnr" }, + { 0, NULL } +}; + + +static int +dissect_qsig_DiversionReason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_rerouteingReason(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DiversionReason(FALSE, tvb, offset, pinfo, tree, hf_qsig_rerouteingReason); +} +static int dissect_originalRerouteingReason_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DiversionReason(TRUE, tvb, offset, pinfo, tree, hf_qsig_originalRerouteingReason); +} +static int dissect_diversionReason(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DiversionReason(FALSE, tvb, offset, pinfo, tree, hf_qsig_diversionReason); +} +static int dissect_originalDiversionReason_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DiversionReason(TRUE, tvb, offset, pinfo, tree, hf_qsig_originalDiversionReason); +} + + + +static int +dissect_qsig_INTEGER_1_15(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_diversionCounter(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_INTEGER_1_15(FALSE, tvb, offset, pinfo, tree, hf_qsig_diversionCounter); +} + + +static const value_string qsig_SubscriptionOption_vals[] = { + { 0, "noNotification" }, + { 1, "notificationWithoutDivertedToNr" }, + { 2, "notificationWithDivertedToNr" }, + { 0, NULL } +}; + + +static int +dissect_qsig_SubscriptionOption(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, + NULL); + + return offset; +} +static int dissect_subscriptionOption(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_SubscriptionOption(FALSE, tvb, offset, pinfo, tree, hf_qsig_subscriptionOption); +} +static int dissect_subscriptionOption_impl(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_SubscriptionOption(TRUE, tvb, offset, pinfo, tree, hf_qsig_subscriptionOption); +} + + +static const value_string qsig_CRRExtension_vals[] = { + { 9, "single" }, + { 10, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t CRRExtension_choice[] = { + { 9, BER_CLASS_CON, 9, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 10, BER_CLASS_CON, 10, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_CRRExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + CRRExtension_choice, hf_index, ett_qsig_CRRExtension, + NULL); + + return offset; +} +static int dissect_extensionCRR(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_CRRExtension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionCRR); +} + + +static const ber_sequence_t CallRrArg_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_rerouteingReason }, + { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_originalRerouteingReason_impl }, + { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_calledAddress }, + { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_diversionCounter }, + { BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_pSS1InfoElement }, + { BER_CLASS_CON, 1, BER_FLAGS_NOTCHKTAG, dissect_lastRerouteingNr }, + { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_subscriptionOption_impl }, + { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_callingPartySubaddress }, + { BER_CLASS_CON, 4, BER_FLAGS_NOTCHKTAG, dissect_callingNumber }, + { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_callingName }, + { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_originalCalledNr }, + { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_redirectingName }, + { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_originalCalledName }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionCRR }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_CallRrArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + CallRrArg_sequence, hf_index, ett_qsig_CallRrArg); + + return offset; +} + + +static const value_string qsig_CallRrRes_vals[] = { + { 0, "null" }, + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t CallRrRes_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_null }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_CallRrRes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + CallRrRes_choice, hf_index, ett_qsig_CallRrRes, + NULL); + + return offset; +} + + +static const value_string qsig_DLI1Extension_vals[] = { + { 9, "single" }, + { 10, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t DLI1Extension_choice[] = { + { 9, BER_CLASS_CON, 9, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 10, BER_CLASS_CON, 10, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DLI1Extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + DLI1Extension_choice, hf_index, ett_qsig_DLI1Extension, + NULL); + + return offset; +} +static int dissect_extensionDLI1(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DLI1Extension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionDLI1); +} + + +static const ber_sequence_t DivLegInf1Arg_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_diversionReason }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_subscriptionOption }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_nominatedNr }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionDLI1 }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DivLegInf1Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + DivLegInf1Arg_sequence, hf_index, ett_qsig_DivLegInf1Arg); + + return offset; +} + + +static const value_string qsig_DLI2Extension_vals[] = { + { 5, "single" }, + { 6, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t DLI2Extension_choice[] = { + { 5, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 6, BER_CLASS_CON, 6, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DLI2Extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + DLI2Extension_choice, hf_index, ett_qsig_DLI2Extension, + NULL); + + return offset; +} +static int dissect_extensionDLI2(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DLI2Extension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionDLI2); +} + + +static const ber_sequence_t DivLegInf2Arg_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_diversionCounter }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_diversionReason }, + { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_originalDiversionReason_impl }, + { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_divertingNr }, + { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_originalCalledNr }, + { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_redirectingName }, + { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_originalCalledName }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionDLI2 }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DivLegInf2Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + DivLegInf2Arg_sequence, hf_index, ett_qsig_DivLegInf2Arg); + + return offset; +} + + +static const value_string qsig_DLI3Extension_vals[] = { + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t DLI3Extension_choice[] = { + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DLI3Extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + DLI3Extension_choice, hf_index, ett_qsig_DLI3Extension, + NULL); + + return offset; +} +static int dissect_extensionDLI3(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_DLI3Extension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionDLI3); +} + + +static const ber_sequence_t DivLegInf3Arg_sequence[] = { + { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_NOOWNTAG, dissect_presentationAllowedIndicator }, + { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_redirectionName }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionDLI3 }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DivLegInf3Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + DivLegInf3Arg_sequence, hf_index, ett_qsig_DivLegInf3Arg); + + return offset; +} + + +static const value_string qsig_DivLegFailArg_vals[] = { + { 0, "null" }, + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t DivLegFailArg_choice[] = { + { 0, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_null }, + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_DivLegFailArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + DivLegFailArg_choice, hf_index, ett_qsig_DivLegFailArg, + NULL); + + return offset; +} + + +static const value_string qsig_IRExtension_vals[] = { + { 1, "single" }, + { 2, "multiple" }, + { 0, NULL } +}; + +static const ber_choice_t IRExtension_choice[] = { + { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_single_impl }, + { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_multiple_impl }, + { 0, 0, 0, 0, NULL } +}; + +static int +dissect_qsig_IRExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_choice(pinfo, tree, tvb, offset, + IRExtension_choice, hf_index, ett_qsig_IRExtension, + NULL); + + return offset; +} +static int dissect_extensionIR(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_IRExtension(FALSE, tvb, offset, pinfo, tree, hf_qsig_extensionIR); +} + + +static const ber_sequence_t IntResult_sequence[] = { + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_servedUserNr }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_basicService }, + { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_procedure }, + { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_divertedToAddress }, + { BER_CLASS_UNI, BER_UNI_TAG_BOOLEAN, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_remoteEnabled }, + { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extensionIR }, + { 0, 0, 0, NULL } +}; + +static int +dissect_qsig_IntResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset, + IntResult_sequence, hf_index, ett_qsig_IntResult); + + return offset; +} +static int dissect_IntResultList_item(packet_info *pinfo _U_, proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_) { + return dissect_qsig_IntResult(FALSE, tvb, offset, pinfo, tree, hf_qsig_IntResultList_item); +} + + +static const ber_sequence_t IntResultList_set_of[1] = { + { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_IntResultList_item }, +}; + +static int +dissect_qsig_IntResultList(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset, + IntResultList_set_of, hf_index, ett_qsig_IntResultList); + + return offset; +} + +/*--- PDUs ---*/ + +static void dissect_NameArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_NameArg(FALSE, tvb, 0, pinfo, tree, hf_qsig_NameArg_PDU); +} +static void dissect_ActivateDivArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_ActivateDivArg(FALSE, tvb, 0, pinfo, tree, hf_qsig_ActivateDivArg_PDU); +} +static void dissect_ActivateDivRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_ActivateDivRes(FALSE, tvb, 0, pinfo, tree, hf_qsig_ActivateDivRes_PDU); +} +static void dissect_DeactivateDivArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_DeactivateDivArg(FALSE, tvb, 0, pinfo, tree, hf_qsig_DeactivateDivArg_PDU); +} +static void dissect_DeactivateDivRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_DeactivateDivRes(FALSE, tvb, 0, pinfo, tree, hf_qsig_DeactivateDivRes_PDU); +} +static void dissect_InterrDivArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_InterrDivArg(FALSE, tvb, 0, pinfo, tree, hf_qsig_InterrDivArg_PDU); +} +static void dissect_ChkResArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_ChkResArg(FALSE, tvb, 0, pinfo, tree, hf_qsig_ChkResArg_PDU); +} +static void dissect_ChkResRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_ChkResRes(FALSE, tvb, 0, pinfo, tree, hf_qsig_ChkResRes_PDU); +} +static void dissect_CallRrArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_CallRrArg(FALSE, tvb, 0, pinfo, tree, hf_qsig_CallRrArg_PDU); +} +static void dissect_CallRrRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_CallRrRes(FALSE, tvb, 0, pinfo, tree, hf_qsig_CallRrRes_PDU); +} +static void dissect_DivLegInf1Arg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_DivLegInf1Arg(FALSE, tvb, 0, pinfo, tree, hf_qsig_DivLegInf1Arg_PDU); +} +static void dissect_DivLegInf2Arg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_DivLegInf2Arg(FALSE, tvb, 0, pinfo, tree, hf_qsig_DivLegInf2Arg_PDU); +} +static void dissect_DivLegInf3Arg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_DivLegInf3Arg(FALSE, tvb, 0, pinfo, tree, hf_qsig_DivLegInf3Arg_PDU); +} +static void dissect_DivLegFailArg_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_DivLegFailArg(FALSE, tvb, 0, pinfo, tree, hf_qsig_DivLegFailArg_PDU); +} +static void dissect_IntResultList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { + dissect_qsig_IntResultList(FALSE, tvb, 0, pinfo, tree, hf_qsig_IntResultList_PDU); +} + + +/*--- End of included file: packet-qsig-fn.c ---*/ +#line 481 "packet-qsig-template.c" + + +static qsig_op qsig_tab[] = { + /* 0 */ { 13868, FNA( 0), FNR( 0), dissect_NameArg_PDU, NULL }, + /* 1 */ { 13868, FNA( 1), FNR( 1), dissect_NameArg_PDU, NULL }, + /* 2 */ { 13868, FNA( 2), FNR( 2), dissect_NameArg_PDU, NULL }, + /* 3 */ { 13868, FNA( 3), FNR( 3), dissect_NameArg_PDU, NULL }, + /* 4 */ { 13874, FNA( 4), FNR( 4), NULL, NULL }, + /* 5 */ { 13874, FNA( 5), FNR( 5), NULL, NULL }, + /* 6 */ { 13874, FNA( 6), FNR( 6), NULL, NULL }, + /* 7 */ { 13869, FNA( 7), FNR( 7), NULL, NULL }, + /* 8 */ { 13869, FNA( 8), FNR( 8), NULL, NULL }, + /* 9 */ { 13869, FNA( 9), FNR( 9), NULL, NULL }, + /* 10 */ { 13869, FNA( 10), FNR( 10), NULL, NULL }, + /* 11 */ { 13869, FNA( 11), FNR( 11), NULL, NULL }, + /* 12 */ { 13869, FNA( 12), FNR( 12), NULL, NULL }, + /* 13 */ { 13869, FNA( 13), FNR( 13), NULL, NULL }, + /* 14 */ { 13869, FNA( 14), FNR( 14), NULL, NULL }, + /* 15 */ { 13873, FNA( 15), FNR( 15), dissect_ActivateDivArg_PDU, dissect_ActivateDivRes_PDU }, + /* 16 */ { 13873, FNA( 16), FNR( 16), dissect_DeactivateDivArg_PDU, dissect_DeactivateDivRes_PDU }, + /* 17 */ { 13873, FNA( 17), FNR( 17), dissect_InterrDivArg_PDU, dissect_IntResultList_PDU }, + /* 18 */ { 13873, FNA( 18), FNR( 18), dissect_ChkResArg_PDU, dissect_ChkResRes_PDU }, + /* 19 */ { 13873, FNA( 19), FNR( 19), dissect_CallRrArg_PDU, dissect_CallRrArg_PDU }, + /* 20 */ { 13873, FNA( 20), FNR( 20), dissect_DivLegInf1Arg_PDU, NULL }, + /* 21 */ { 13873, FNA( 21), FNR( 21), dissect_DivLegInf2Arg_PDU, NULL }, + /* 22 */ { 13873, FNA( 22), FNR( 22), dissect_DivLegInf3Arg_PDU, NULL }, + /* 23 */ { 13873, FNA( 23), FNR( 23), dissect_DivLegFailArg_PDU, NULL }, + /* 24 */ { -1, NULL, NULL, NULL, NULL }, + /* 25 */ { -1, NULL, NULL, NULL, NULL }, + /* 26 */ { -1, NULL, NULL, NULL, NULL }, + /* 27 */ { 13870, FNA( 27), FNR( 27), NULL, NULL }, + /* 28 */ { 13870, FNA( 28), FNR( 28), NULL, NULL }, + /* 29 */ { 13870, FNA( 29), FNR( 29), NULL, NULL }, + /* 30 */ { 13870, FNA( 30), FNR( 30), NULL, NULL }, + /* 31 */ { 13870, FNA( 31), FNR( 31), NULL, NULL }, + /* 32 */ { 13870, FNA( 32), FNR( 32), NULL, NULL }, + /* 33 */ { 13870, FNA( 33), FNR( 33), NULL, NULL }, + /* 34 */ { 14843, FNA( 34), FNR( 34), NULL, NULL }, + /* 35 */ { 14844, FNA( 35), FNR( 35), NULL, NULL }, + /* 36 */ { 14844, FNA( 36), FNR( 36), NULL, NULL }, + /* 37 */ { 14844, FNA( 37), FNR( 37), NULL, NULL }, + /* 38 */ { 14844, FNA( 38), FNR( 38), NULL, NULL }, + /* 39 */ { 14844, FNA( 39), FNR( 39), NULL, NULL }, + /* 40 */ { 13870, FNA( 40), FNR( 40), NULL, NULL }, + /* 41 */ { 90001, FNA( 41), FNR( 41), NULL, NULL }, + /* 42 */ { 90001, FNA( 42), FNR( 42), NULL, NULL }, + /* 43 */ { 14846, FNA( 43), FNR( 43), NULL, NULL }, + /* 44 */ { 14846, FNA( 44), FNR( 44), NULL, NULL }, + /* 45 */ { 14846, FNA( 45), FNR( 45), NULL, NULL }, + /* 46 */ { 14846, FNA( 46), FNR( 46), NULL, NULL }, + /* 47 */ { 14846, FNA( 47), FNR( 47), NULL, NULL }, + /* 48 */ { 14846, FNA( 48), FNR( 48), NULL, NULL }, + /* 49 */ { 90001, FNA( 49), FNR( 49), NULL, NULL }, + /* 50 */ { 15429, FNA( 50), FNR( 50), NULL, NULL }, + /* 51 */ { 15429, FNA( 51), FNR( 51), NULL, NULL }, + /* 52 */ { 15429, FNA( 52), FNR( 52), NULL, NULL }, + /* 53 */ { 15429, FNA( 53), FNR( 53), NULL, NULL }, + /* 54 */ { 15431, FNA( 54), FNR( 54), NULL, NULL }, + /* 55 */ { 15431, FNA( 55), FNR( 55), NULL, NULL }, + /* 56 */ { 15431, FNA( 56), FNR( 56), NULL, NULL }, + /* 57 */ { 15052, FNA( 57), FNR( 57), NULL, NULL }, + /* 58 */ { 15052, FNA( 58), FNR( 58), NULL, NULL }, + /* 59 */ { 15050, FNA( 59), FNR( 59), NULL, NULL }, + /* 60 */ { 15050, FNA( 60), FNR( 60), NULL, NULL }, + /* 61 */ { 15050, FNA( 61), FNR( 61), NULL, NULL }, + /* 62 */ { 15050, FNA( 62), FNR( 62), NULL, NULL }, + /* 63 */ { 15050, FNA( 63), FNR( 63), NULL, NULL }, + /* 64 */ { 15050, FNA( 64), FNR( 64), NULL, NULL }, + /* 65 */ { 15050, FNA( 65), FNR( 65), NULL, NULL }, + /* 66 */ { 15054, FNA( 66), FNR( 66), NULL, NULL }, + /* 67 */ { 15054, FNA( 67), FNR( 67), NULL, NULL }, + /* 68 */ { 15054, FNA( 68), FNR( 68), NULL, NULL }, + /* 69 */ { 15054, FNA( 69), FNR( 69), NULL, NULL }, + /* 70 */ { 15054, FNA( 70), FNR( 70), NULL, NULL }, + /* 71 */ { 15431, FNA( 71), FNR( 71), NULL, NULL }, + /* 72 */ { 15433, FNA( 72), FNR( 72), NULL, NULL }, + /* 73 */ { 15433, FNA( 73), FNR( 73), NULL, NULL }, + /* 74 */ { 15433, FNA( 74), FNR( 74), NULL, NULL }, + /* 75 */ { 15433, FNA( 75), FNR( 75), NULL, NULL }, + /* 76 */ { 15433, FNA( 76), FNR( 76), NULL, NULL }, + /* 77 */ { 15433, FNA( 77), FNR( 77), NULL, NULL }, + /* 78 */ { 15507, FNA( 78), FNR( 78), NULL, NULL }, + /* 79 */ { 15507, FNA( 79), FNR( 79), NULL, NULL }, + /* 80 */ { 90002, FNA( 80), FNR( 80), NULL, NULL }, + /* 81 */ { 90002, FNA( 81), FNR( 81), NULL, NULL }, + /* 82 */ { 90002, FNA( 82), FNR( 82), NULL, NULL }, + /* 83 */ { -1, NULL, NULL, NULL, NULL }, + /* 84 */ { 15772, FNA( 84), FNR( 84), NULL, NULL }, + /* 85 */ { 15772, FNA( 85), FNR( 85), NULL, NULL }, + /* 86 */ { 13874, FNA( 86), FNR( 86), NULL, NULL }, + /* 87 */ { 15992, FNA( 87), FNR( 87), NULL, NULL }, + /* 88 */ { 15992, FNA( 88), FNR( 88), NULL, NULL }, + /* 89 */ { 17876, FNA( 89), FNR( 89), NULL, NULL }, + /* 90 */ { 17876, FNA( 90), FNR( 90), NULL, NULL }, + /* 91 */ { 17876, FNA( 91), FNR( 91), NULL, NULL }, + /* 92 */ { 17876, FNA( 92), FNR( 92), NULL, NULL }, + /* 93 */ { 17878, FNA( 93), FNR( 93), NULL, NULL }, + /* 94 */ { 17878, FNA( 94), FNR( 94), NULL, NULL }, + /* 95 */ { 17878, FNA( 95), FNR( 95), NULL, NULL }, + /* 96 */ { 17878, FNA( 96), FNR( 96), NULL, NULL }, + /* 97 */ { 15429, FNA( 97), FNR( 97), NULL, NULL }, + /* 98 */ { 15429, FNA( 98), FNR( 98), NULL, NULL }, + /* 99 */ { 19460, FNA( 99), FNR( 99), NULL, NULL }, + /* 100 */ { 19460, FNA(100), FNR(100), NULL, NULL }, + /* 101 */ { 19460, FNA(101), FNR(101), NULL, NULL }, + /* 102 */ { 19460, FNA(102), FNR(102), NULL, NULL }, + /* 103 */ { 21407, FNA(103), FNR(103), NULL, NULL }, + /* 104 */ { 21407, FNA(104), FNR(104), NULL, NULL }, + /* 105 */ { 21889, FNA(105), FNR(105), NULL, NULL }, + /* 106 */ { 21889, FNA(106), FNR(106), NULL, NULL }, + /* 107 */ { 325, FNA(107), FNR(107), NULL, NULL }, + /* 108 */ { 325, FNA(108), FNR(108), NULL, NULL }, + /* 109 */ { 325, FNA(109), FNR(109), NULL, NULL }, + /* 110 */ { 325, FNA(110), FNR(110), NULL, NULL }, + /* 111 */ { 325, FNA(111), FNR(111), NULL, NULL }, + /* 112 */ { 344, FNA(112), FNR(112), NULL, NULL }, + /* 113 */ { 344, FNA(113), FNR(113), NULL, NULL }, + /* 114 */ { 344, FNA(114), FNR(114), NULL, NULL }, + /* 115 */ { 3471, FNA(115), FNR(115), NULL, NULL }, + /* 116 */ { 3471, FNA(116), FNR(116), NULL, NULL }, + /* 117 */ { 3471, FNA(117), FNR(117), NULL, NULL }, + /* 118 */ { 3471, FNA(118), FNR(118), NULL, NULL }, + /* 119 */ { 3472, FNA(119), FNR(119), NULL, NULL }, + /* 120 */ { 3472, FNA(120), FNR(120), NULL, NULL }, +}; + +/*--- dissect_qsig_arg ------------------------------------------------------*/ +/*static*/ void +dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 operation) { + gint offset; + const gchar *p; + proto_item *ti, *ti_tmp; + proto_tree *qsig_tree; + + offset = 0; + ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_length(tvb), FALSE); + qsig_tree = proto_item_add_subtree(ti, ett_qsig); + + proto_tree_add_uint(qsig_tree, hf_qsig_operation, tvb, 0, 0, operation); + p = match_strval(operation, VALS(qsig_str_operation)); + if (p) { + proto_item_append_text(ti, ": %s", p); + proto_item_append_text(proto_item_get_parent(proto_tree_get_parent(tree)), " %s", p); + } + if (operation >= array_length(qsig_tab)) return; + if (qsig_tab[operation].service != -1) { + ti_tmp = proto_tree_add_uint(qsig_tree, hf_qsig_service, tvb, 0, 0, qsig_tab[operation].service); + p = match_strval(qsig_tab[operation].service, VALS(qsig_str_service_name)); + if (p) proto_item_append_text(ti_tmp, " - %s", p); + } + if (qsig_tab[operation].arg_pdu) + qsig_tab[operation].arg_pdu(tvb, pinfo, qsig_tree); + else + if (tvb_length_remaining(tvb, offset) > 0) + proto_tree_add_text(qsig_tree, tvb, offset, tvb_length_remaining(tvb, offset), "UNSUPPORTED ARGUMENT TYPE (QSIG)"); +} + +/*--- dissect_qsig_res -------------------------------------------------------*/ +/*static*/ void +dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 operation) { + gint offset; + const gchar *p; + proto_item *ti, *ti_tmp; + proto_tree *qsig_tree; + + offset = 0; + ti = proto_tree_add_item(tree, proto_qsig, tvb, offset, tvb_length(tvb), FALSE); + qsig_tree = proto_item_add_subtree(ti, ett_qsig); + + proto_tree_add_uint(qsig_tree, hf_qsig_operation, tvb, 0, 0, operation); + p = match_strval(operation, VALS(qsig_str_operation)); + if (p) { + proto_item_append_text(ti, ": %s", p); + proto_item_append_text(proto_item_get_parent(proto_tree_get_parent(tree)), " %s", p); + } + if (operation >= array_length(qsig_tab)) return; + if (qsig_tab[operation].service != -1) { + ti_tmp = proto_tree_add_uint(qsig_tree, hf_qsig_service, tvb, 0, 0, qsig_tab[operation].service); + p = match_strval(qsig_tab[operation].service, VALS(qsig_str_service_name)); + if (p) proto_item_append_text(ti_tmp, " - %s", p); + } + if (qsig_tab[operation].res_pdu) + qsig_tab[operation].res_pdu(tvb, pinfo, qsig_tree); + else + if (tvb_length_remaining(tvb, offset) > 0) + proto_tree_add_text(qsig_tree, tvb, offset, tvb_length_remaining(tvb, offset), "UNSUPPORTED RESULT TYPE (QSIG)"); +} + +/*--- dissect_qsig_transit_counter_ie ---------------------------------------*/ +static int +dissect_qsig_transit_counter_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + proto_tree_add_item(tree, hf_qsig_tc, tvb, offset, 1, FALSE); + offset++; + return offset; +} +/*--- dissect_qsig_party_category_ie ----------------------------------------*/ +static int +dissect_qsig_party_category_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int length) { + proto_tree_add_item(tree, hf_qsig_pc, tvb, offset, 1, FALSE); + offset++; + return offset; +} + +/*--- dissect_qsig_ie -------------------------------------------------------*/ +static void +dissect_qsig_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int codeset) { + gint offset; + proto_item *ti, *ti_ie; + proto_tree *ie_tree; + guint8 ie_type, ie_len; + + offset = 0; + + ti = proto_tree_add_item_hidden(tree, proto_qsig, tvb, offset, -1, FALSE); + + ie_type = tvb_get_guint8(tvb, offset); + ie_len = tvb_get_guint8(tvb, offset + 1); + + ti_ie = proto_tree_add_text(tree, tvb, offset, -1, "%s", + val_to_str(ie_type, VALS(qsig_str_ie_type[codeset]), "unknown (0x%02X)")); + ie_tree = proto_item_add_subtree(ti_ie, ett_qsig_ie); + proto_tree_add_item(ie_tree, *hf_qsig_ie_type_arr[codeset], tvb, offset, 1, FALSE); + proto_tree_add_item_hidden(ie_tree, hf_qsig_ie_type, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_qsig_ie_len, tvb, offset + 1, 1, FALSE); + offset += 2; + if (tvb_length_remaining(tvb, offset) <= 0) + return; + switch ((codeset << 8) | ie_type) { + case CS4 | QSIG_IE_TRANSIT_COUNTER : + dissect_qsig_transit_counter_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + case CS5 | QSIG_IE_PARTY_CATEGORY : + dissect_qsig_party_category_ie(tvb, offset, pinfo, ie_tree, ie_len); + break; + default: + if (ie_len > 0) { + if (tree) proto_tree_add_item(ie_tree, hf_qsig_ie_data, tvb, offset, ie_len, FALSE); + } + } +} +/*--- dissect_qsig_ie_cs4 ---------------------------------------------------*/ +static void +dissect_qsig_ie_cs4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + dissect_qsig_ie(tvb, pinfo, tree, 4); +} +/*--- dissect_qsig_ie_cs5 ---------------------------------------------------*/ +static void +dissect_qsig_ie_cs5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { + dissect_qsig_ie(tvb, pinfo, tree, 5); +} + +/*--- proto_register_qsig ---------------------------------------------------*/ +void proto_register_qsig(void) { + + /* List of fields */ + static hf_register_info hf[] = { + { &hf_qsig_operation, { "Operation", "qsig.operation", + FT_UINT8, BASE_DEC, VALS(qsig_str_operation), 0x0, + "Operation", HFILL }}, + { &hf_qsig_service, { "Service", "qsig.service", + FT_UINT8, BASE_DEC, VALS(qsig_str_service), 0x0, + "Supplementary Service", HFILL }}, + { &hf_qsig_ie_type, { "Type", "qsig.ie.type", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Information Element Type", HFILL }}, + { &hf_qsig_ie_type_cs4, { "Type", "qsig.ie.type.cs4", + FT_UINT8, BASE_HEX, VALS(qsig_str_ie_type_cs4), 0x0, + "Information Element Type (Codeset 4)", HFILL }}, + { &hf_qsig_ie_type_cs5, { "Type", "qsig.ie.type.cs5", + FT_UINT8, BASE_HEX, VALS(qsig_str_ie_type_cs5), 0x0, + "Information Element Type (Codeset 5)", HFILL }}, + { &hf_qsig_ie_len, { "Length", "qsig.ie.len", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Information Element Length", HFILL }}, + { &hf_qsig_ie_data, { "Data", "qsig.ie.data", + FT_BYTES, BASE_HEX, NULL, 0x0, + "Data", HFILL }}, + { &hf_qsig_tc, { "Transit count", "qsig.tc", + FT_UINT8, BASE_DEC, NULL, 0x1F, + "Transit count", HFILL }}, + { &hf_qsig_pc, { "Party category", "qsig.pc", + FT_UINT8, BASE_HEX, VALS(qsig_str_pc), 0x07, + "Party category", HFILL }}, + +/*--- Included file: packet-qsig-hfarr.c ---*/ +#line 1 "packet-qsig-hfarr.c" + { &hf_qsig_NameArg_PDU, + { "NameArg", "qsig.NameArg", + FT_UINT32, BASE_DEC, VALS(qsig_NameArg_vals), 0, + "qsig.NameArg", HFILL }}, + { &hf_qsig_ActivateDivArg_PDU, + { "ActivateDivArg", "qsig.ActivateDivArg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.ActivateDivArg", HFILL }}, + { &hf_qsig_ActivateDivRes_PDU, + { "ActivateDivRes", "qsig.ActivateDivRes", + FT_UINT32, BASE_DEC, VALS(qsig_ActivateDivRes_vals), 0, + "qsig.ActivateDivRes", HFILL }}, + { &hf_qsig_DeactivateDivArg_PDU, + { "DeactivateDivArg", "qsig.DeactivateDivArg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.DeactivateDivArg", HFILL }}, + { &hf_qsig_DeactivateDivRes_PDU, + { "DeactivateDivRes", "qsig.DeactivateDivRes", + FT_UINT32, BASE_DEC, VALS(qsig_DeactivateDivRes_vals), 0, + "qsig.DeactivateDivRes", HFILL }}, + { &hf_qsig_InterrDivArg_PDU, + { "InterrDivArg", "qsig.InterrDivArg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.InterrDivArg", HFILL }}, + { &hf_qsig_ChkResArg_PDU, + { "ChkResArg", "qsig.ChkResArg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.ChkResArg", HFILL }}, + { &hf_qsig_ChkResRes_PDU, + { "ChkResRes", "qsig.ChkResRes", + FT_UINT32, BASE_DEC, VALS(qsig_ChkResRes_vals), 0, + "qsig.ChkResRes", HFILL }}, + { &hf_qsig_CallRrArg_PDU, + { "CallRrArg", "qsig.CallRrArg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.CallRrArg", HFILL }}, + { &hf_qsig_CallRrRes_PDU, + { "CallRrRes", "qsig.CallRrRes", + FT_UINT32, BASE_DEC, VALS(qsig_CallRrRes_vals), 0, + "qsig.CallRrRes", HFILL }}, + { &hf_qsig_DivLegInf1Arg_PDU, + { "DivLegInf1Arg", "qsig.DivLegInf1Arg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.DivLegInf1Arg", HFILL }}, + { &hf_qsig_DivLegInf2Arg_PDU, + { "DivLegInf2Arg", "qsig.DivLegInf2Arg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.DivLegInf2Arg", HFILL }}, + { &hf_qsig_DivLegInf3Arg_PDU, + { "DivLegInf3Arg", "qsig.DivLegInf3Arg", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.DivLegInf3Arg", HFILL }}, + { &hf_qsig_DivLegFailArg_PDU, + { "DivLegFailArg", "qsig.DivLegFailArg", + FT_UINT32, BASE_DEC, VALS(qsig_DivLegFailArg_vals), 0, + "qsig.DivLegFailArg", HFILL }}, + { &hf_qsig_IntResultList_PDU, + { "IntResultList", "qsig.IntResultList", + FT_UINT32, BASE_DEC, NULL, 0, + "qsig.IntResultList", HFILL }}, + { &hf_qsig_extensionId, + { "extensionId", "qsig.extensionId", + FT_OID, BASE_NONE, NULL, 0, + "qsig.OBJECT_IDENTIFIER", HFILL }}, + { &hf_qsig_extensionArgument, + { "extensionArgument", "qsig.extensionArgument", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.T_extensionArgument", HFILL }}, + { &hf_qsig_presentationAllowedAddressS, + { "presentationAllowedAddressS", "qsig.presentationAllowedAddressS", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.AddressScreened", HFILL }}, + { &hf_qsig_presentationRestricted, + { "presentationRestricted", "qsig.presentationRestricted", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NULL", HFILL }}, + { &hf_qsig_numberNotAvailableDueToInterworking, + { "numberNotAvailableDueToInterworking", "qsig.numberNotAvailableDueToInterworking", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NULL", HFILL }}, + { &hf_qsig_presentationRestrictedAddressS, + { "presentationRestrictedAddressS", "qsig.presentationRestrictedAddressS", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.AddressScreened", HFILL }}, + { &hf_qsig_presentationAllowedAddressU, + { "presentationAllowedAddressU", "qsig.presentationAllowedAddressU", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.Address", HFILL }}, + { &hf_qsig_presentationRestrictedAddressU, + { "presentationRestrictedAddressU", "qsig.presentationRestrictedAddressU", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.Address", HFILL }}, + { &hf_qsig_presentationAllowedAddressNS, + { "presentationAllowedAddressNS", "qsig.presentationAllowedAddressNS", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NumberScreened", HFILL }}, + { &hf_qsig_presentationRestrictedAddressNS, + { "presentationRestrictedAddressNS", "qsig.presentationRestrictedAddressNS", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NumberScreened", HFILL }}, + { &hf_qsig_presentationAllowedAddressNU, + { "presentationAllowedAddressNU", "qsig.presentationAllowedAddressNU", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_presentationRestrictedAddressNU, + { "presentationRestrictedAddressNU", "qsig.presentationRestrictedAddressNU", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_partyNumber, + { "partyNumber", "qsig.partyNumber", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_screeningIndicator, + { "screeningIndicator", "qsig.screeningIndicator", + FT_UINT32, BASE_DEC, VALS(qsig_ScreeningIndicator_vals), 0, + "qsig.ScreeningIndicator", HFILL }}, + { &hf_qsig_partySubaddress, + { "partySubaddress", "qsig.partySubaddress", + FT_UINT32, BASE_DEC, VALS(qsig_PartySubaddress_vals), 0, + "qsig.PartySubaddress", HFILL }}, + { &hf_qsig_unknownPartyNumber, + { "unknownPartyNumber", "qsig.unknownPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NumberDigits", HFILL }}, + { &hf_qsig_publicPartyNumber, + { "publicPartyNumber", "qsig.publicPartyNumber", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.PublicPartyNumber", HFILL }}, + { &hf_qsig_dataPartyNumber, + { "dataPartyNumber", "qsig.dataPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NumberDigits", HFILL }}, + { &hf_qsig_telexPartyNumber, + { "telexPartyNumber", "qsig.telexPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NumberDigits", HFILL }}, + { &hf_qsig_privatePartyNumber, + { "privatePartyNumber", "qsig.privatePartyNumber", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.PrivatePartyNumber", HFILL }}, + { &hf_qsig_nationalStandardPartyNumber, + { "nationalStandardPartyNumber", "qsig.nationalStandardPartyNumber", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NumberDigits", HFILL }}, + { &hf_qsig_publicTypeOfNumber, + { "publicTypeOfNumber", "qsig.publicTypeOfNumber", + FT_UINT32, BASE_DEC, VALS(qsig_PublicTypeOfNumber_vals), 0, + "qsig.PublicTypeOfNumber", HFILL }}, + { &hf_qsig_publicNumberDigits, + { "publicNumberDigits", "qsig.publicNumberDigits", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NumberDigits", HFILL }}, + { &hf_qsig_privateTypeOfNumber, + { "privateTypeOfNumber", "qsig.privateTypeOfNumber", + FT_UINT32, BASE_DEC, VALS(qsig_PrivateTypeOfNumber_vals), 0, + "qsig.PrivateTypeOfNumber", HFILL }}, + { &hf_qsig_privateNumberDigits, + { "privateNumberDigits", "qsig.privateNumberDigits", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NumberDigits", HFILL }}, + { &hf_qsig_userSpecifiedSubaddress, + { "userSpecifiedSubaddress", "qsig.userSpecifiedSubaddress", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.UserSpecifiedSubaddress", HFILL }}, + { &hf_qsig_nSAPSubaddress, + { "nSAPSubaddress", "qsig.nSAPSubaddress", + FT_BYTES, BASE_HEX, NULL, 0, + "qsig.NSAPSubaddress", HFILL }}, + { &hf_qsig_subaddressInformation, + { "subaddressInformation", "qsig.subaddressInformation", + FT_BYTES, BASE_HEX, NULL, 0, + "qsig.SubaddressInformation", HFILL }}, + { &hf_qsig_oddCountIndicator, + { "oddCountIndicator", "qsig.oddCountIndicator", + FT_BOOLEAN, 8, NULL, 0, + "qsig.BOOLEAN", HFILL }}, + { &hf_qsig_name, + { "name", "qsig.name", + FT_UINT32, BASE_DEC, VALS(qsig_Name_vals), 0, + "qsig.Name", HFILL }}, + { &hf_qsig_nameSequence, + { "nameSequence", "qsig.nameSequence", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.T_nameSequence", HFILL }}, + { &hf_qsig_extensionNA, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_NameExtension_vals), 0, + "qsig.NameExtension", HFILL }}, + { &hf_qsig_single, + { "single", "qsig.single", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.Extension", HFILL }}, + { &hf_qsig_multiple, + { "multiple", "qsig.multiple", + FT_UINT32, BASE_DEC, NULL, 0, + "qsig.SEQUENCE_OF_Extension", HFILL }}, + { &hf_qsig_multiple_item, + { "Item", "qsig.multiple_item", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.Extension", HFILL }}, + { &hf_qsig_namePresentationAllowed, + { "namePresentationAllowed", "qsig.namePresentationAllowed", + FT_UINT32, BASE_DEC, VALS(qsig_NamePresentationAllowed_vals), 0, + "qsig.NamePresentationAllowed", HFILL }}, + { &hf_qsig_namePresentationRestricted, + { "namePresentationRestricted", "qsig.namePresentationRestricted", + FT_UINT32, BASE_DEC, VALS(qsig_NamePresentationRestricted_vals), 0, + "qsig.NamePresentationRestricted", HFILL }}, + { &hf_qsig_nameNotAvailable, + { "nameNotAvailable", "qsig.nameNotAvailable", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NameNotAvailable", HFILL }}, + { &hf_qsig_namePresentationAllowedSimple, + { "namePresentationAllowedSimple", "qsig.namePresentationAllowedSimple", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NameData", HFILL }}, + { &hf_qsig_namePresentationAllowedExtended, + { "namePresentationAllowedExtended", "qsig.namePresentationAllowedExtended", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NameSet", HFILL }}, + { &hf_qsig_namePresentationRestrictedSimple, + { "namePresentationRestrictedSimple", "qsig.namePresentationRestrictedSimple", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NameData", HFILL }}, + { &hf_qsig_namePresentationRestrictedExtended, + { "namePresentationRestrictedExtended", "qsig.namePresentationRestrictedExtended", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NameSet", HFILL }}, + { &hf_qsig_namePresentationRestrictedNull, + { "namePresentationRestrictedNull", "qsig.namePresentationRestrictedNull", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NULL", HFILL }}, + { &hf_qsig_nameData, + { "nameData", "qsig.nameData", + FT_STRING, BASE_NONE, NULL, 0, + "qsig.NameData", HFILL }}, + { &hf_qsig_characterSet, + { "characterSet", "qsig.characterSet", + FT_UINT32, BASE_DEC, VALS(qsig_CharacterSet_vals), 0, + "qsig.CharacterSet", HFILL }}, + { &hf_qsig_procedure, + { "procedure", "qsig.procedure", + FT_UINT32, BASE_DEC, VALS(qsig_Procedure_vals), 0, + "qsig.Procedure", HFILL }}, + { &hf_qsig_basicService, + { "basicService", "qsig.basicService", + FT_UINT32, BASE_DEC, VALS(qsig_BasicService_vals), 0, + "qsig.BasicService", HFILL }}, + { &hf_qsig_divertedToAddress, + { "divertedToAddress", "qsig.divertedToAddress", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.Address", HFILL }}, + { &hf_qsig_servedUserNr, + { "servedUserNr", "qsig.servedUserNr", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_activatingUserNr, + { "activatingUserNr", "qsig.activatingUserNr", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_extensionAD, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_ADExtension_vals), 0, + "qsig.ADExtension", HFILL }}, + { &hf_qsig_null, + { "null", "qsig.null", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.NULL", HFILL }}, + { &hf_qsig_deactivatingUserNr, + { "deactivatingUserNr", "qsig.deactivatingUserNr", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_extensionDD, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_DDExtension_vals), 0, + "qsig.DDExtension", HFILL }}, + { &hf_qsig_interrogatingUserNr, + { "interrogatingUserNr", "qsig.interrogatingUserNr", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_extensionID, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_IDExtension_vals), 0, + "qsig.IDExtension", HFILL }}, + { &hf_qsig_divertedToNr, + { "divertedToNr", "qsig.divertedToNr", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_extensionCHR, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_CHRExtension_vals), 0, + "qsig.CHRExtension", HFILL }}, + { &hf_qsig_rerouteingReason, + { "rerouteingReason", "qsig.rerouteingReason", + FT_UINT32, BASE_DEC, VALS(qsig_DiversionReason_vals), 0, + "qsig.DiversionReason", HFILL }}, + { &hf_qsig_originalRerouteingReason, + { "originalRerouteingReason", "qsig.originalRerouteingReason", + FT_UINT32, BASE_DEC, VALS(qsig_DiversionReason_vals), 0, + "qsig.DiversionReason", HFILL }}, + { &hf_qsig_calledAddress, + { "calledAddress", "qsig.calledAddress", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.Address", HFILL }}, + { &hf_qsig_diversionCounter, + { "diversionCounter", "qsig.diversionCounter", + FT_UINT32, BASE_DEC, NULL, 0, + "qsig.INTEGER_1_15", HFILL }}, + { &hf_qsig_pSS1InfoElement, + { "pSS1InfoElement", "qsig.pSS1InfoElement", + FT_BYTES, BASE_HEX, NULL, 0, + "qsig.PSS1InformationElement", HFILL }}, + { &hf_qsig_lastRerouteingNr, + { "lastRerouteingNr", "qsig.lastRerouteingNr", + FT_UINT32, BASE_DEC, VALS(qsig_PresentedNumberUnscreened_vals), 0, + "qsig.PresentedNumberUnscreened", HFILL }}, + { &hf_qsig_subscriptionOption, + { "subscriptionOption", "qsig.subscriptionOption", + FT_UINT32, BASE_DEC, VALS(qsig_SubscriptionOption_vals), 0, + "qsig.SubscriptionOption", HFILL }}, + { &hf_qsig_callingPartySubaddress, + { "callingPartySubaddress", "qsig.callingPartySubaddress", + FT_UINT32, BASE_DEC, VALS(qsig_PartySubaddress_vals), 0, + "qsig.PartySubaddress", HFILL }}, + { &hf_qsig_callingNumber, + { "callingNumber", "qsig.callingNumber", + FT_UINT32, BASE_DEC, VALS(qsig_PresentedNumberScreened_vals), 0, + "qsig.PresentedNumberScreened", HFILL }}, + { &hf_qsig_callingName, + { "callingName", "qsig.callingName", + FT_UINT32, BASE_DEC, VALS(qsig_Name_vals), 0, + "qsig.Name", HFILL }}, + { &hf_qsig_originalCalledNr, + { "originalCalledNr", "qsig.originalCalledNr", + FT_UINT32, BASE_DEC, VALS(qsig_PresentedNumberUnscreened_vals), 0, + "qsig.PresentedNumberUnscreened", HFILL }}, + { &hf_qsig_redirectingName, + { "redirectingName", "qsig.redirectingName", + FT_UINT32, BASE_DEC, VALS(qsig_Name_vals), 0, + "qsig.Name", HFILL }}, + { &hf_qsig_originalCalledName, + { "originalCalledName", "qsig.originalCalledName", + FT_UINT32, BASE_DEC, VALS(qsig_Name_vals), 0, + "qsig.Name", HFILL }}, + { &hf_qsig_extensionCRR, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_CRRExtension_vals), 0, + "qsig.CRRExtension", HFILL }}, + { &hf_qsig_diversionReason, + { "diversionReason", "qsig.diversionReason", + FT_UINT32, BASE_DEC, VALS(qsig_DiversionReason_vals), 0, + "qsig.DiversionReason", HFILL }}, + { &hf_qsig_nominatedNr, + { "nominatedNr", "qsig.nominatedNr", + FT_UINT32, BASE_DEC, VALS(qsig_PartyNumber_vals), 0, + "qsig.PartyNumber", HFILL }}, + { &hf_qsig_extensionDLI1, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_DLI1Extension_vals), 0, + "qsig.DLI1Extension", HFILL }}, + { &hf_qsig_originalDiversionReason, + { "originalDiversionReason", "qsig.originalDiversionReason", + FT_UINT32, BASE_DEC, VALS(qsig_DiversionReason_vals), 0, + "qsig.DiversionReason", HFILL }}, + { &hf_qsig_divertingNr, + { "divertingNr", "qsig.divertingNr", + FT_UINT32, BASE_DEC, VALS(qsig_PresentedNumberUnscreened_vals), 0, + "qsig.PresentedNumberUnscreened", HFILL }}, + { &hf_qsig_extensionDLI2, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_DLI2Extension_vals), 0, + "qsig.DLI2Extension", HFILL }}, + { &hf_qsig_presentationAllowedIndicator, + { "presentationAllowedIndicator", "qsig.presentationAllowedIndicator", + FT_BOOLEAN, 8, NULL, 0, + "qsig.PresentationAllowedIndicator", HFILL }}, + { &hf_qsig_redirectionName, + { "redirectionName", "qsig.redirectionName", + FT_UINT32, BASE_DEC, VALS(qsig_Name_vals), 0, + "qsig.Name", HFILL }}, + { &hf_qsig_extensionDLI3, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_DLI3Extension_vals), 0, + "qsig.DLI3Extension", HFILL }}, + { &hf_qsig_IntResultList_item, + { "Item", "qsig.IntResultList_item", + FT_NONE, BASE_NONE, NULL, 0, + "qsig.IntResult", HFILL }}, + { &hf_qsig_remoteEnabled, + { "remoteEnabled", "qsig.remoteEnabled", + FT_BOOLEAN, 8, NULL, 0, + "qsig.BOOLEAN", HFILL }}, + { &hf_qsig_extensionIR, + { "extension", "qsig.extension", + FT_UINT32, BASE_DEC, VALS(qsig_IRExtension_vals), 0, + "qsig.IRExtension", HFILL }}, + +/*--- End of included file: packet-qsig-hfarr.c ---*/ +#line 765 "packet-qsig-template.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_qsig, + &ett_qsig_ie, + +/*--- Included file: packet-qsig-ettarr.c ---*/ +#line 1 "packet-qsig-ettarr.c" + &ett_qsig_Extension, + &ett_qsig_PresentedAddressScreened, + &ett_qsig_PresentedAddressUnscreened, + &ett_qsig_PresentedNumberScreened, + &ett_qsig_PresentedNumberUnscreened, + &ett_qsig_AddressScreened, + &ett_qsig_NumberScreened, + &ett_qsig_Address, + &ett_qsig_PartyNumber, + &ett_qsig_PublicPartyNumber, + &ett_qsig_PrivatePartyNumber, + &ett_qsig_PartySubaddress, + &ett_qsig_UserSpecifiedSubaddress, + &ett_qsig_NameArg, + &ett_qsig_T_nameSequence, + &ett_qsig_NameExtension, + &ett_qsig_SEQUENCE_OF_Extension, + &ett_qsig_Name, + &ett_qsig_NamePresentationAllowed, + &ett_qsig_NamePresentationRestricted, + &ett_qsig_NameSet, + &ett_qsig_ActivateDivArg, + &ett_qsig_ADExtension, + &ett_qsig_ActivateDivRes, + &ett_qsig_DeactivateDivArg, + &ett_qsig_DDExtension, + &ett_qsig_DeactivateDivRes, + &ett_qsig_InterrDivArg, + &ett_qsig_IDExtension, + &ett_qsig_ChkResArg, + &ett_qsig_CHRExtension, + &ett_qsig_ChkResRes, + &ett_qsig_CallRrArg, + &ett_qsig_CRRExtension, + &ett_qsig_CallRrRes, + &ett_qsig_DivLegInf1Arg, + &ett_qsig_DLI1Extension, + &ett_qsig_DivLegInf2Arg, + &ett_qsig_DLI2Extension, + &ett_qsig_DivLegInf3Arg, + &ett_qsig_DLI3Extension, + &ett_qsig_DivLegFailArg, + &ett_qsig_IntResultList, + &ett_qsig_IntResult, + &ett_qsig_IRExtension, + +/*--- End of included file: packet-qsig-ettarr.c ---*/ +#line 772 "packet-qsig-template.c" + }; + + /* Register protocol and dissector */ + proto_qsig = proto_register_protocol(PNAME, PSNAME, PFNAME); + + /* Register fields and subtrees */ + proto_register_field_array(proto_qsig, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + + +/*--- proto_reg_handoff_qsig ------------------------------------------------*/ +void proto_reg_handoff_qsig(void) { + guint32 op; + dissector_handle_t qsig_op_handle; + dissector_handle_t qsig_ie_handle; + + data_handle = find_dissector("data"); + + if (find_dissector_table("q932.ros.local.arg")) { + for (op=0; op<array_length(qsig_tab); op++) { + if (qsig_tab[op].arg_dissector) { + qsig_op_handle = create_dissector_handle(qsig_tab[op].arg_dissector, proto_qsig); + dissector_add("q932.ros.local.arg", op, qsig_op_handle); + } + if (qsig_tab[op].res_dissector) { + qsig_op_handle = create_dissector_handle(qsig_tab[op].res_dissector, proto_qsig); + dissector_add("q932.ros.local.res", op, qsig_op_handle); + } + } + } + + qsig_ie_handle = create_dissector_handle(dissect_qsig_ie_cs4, proto_qsig); + /* QSIG-TC - Transit counter */ + dissector_add("q931.ie", CS4 | QSIG_IE_TRANSIT_COUNTER, qsig_ie_handle); + + qsig_ie_handle = create_dissector_handle(dissect_qsig_ie_cs5, proto_qsig); + /* SSIG-BC - Party category */ + dissector_add("q931.ie", CS5 | QSIG_IE_PARTY_CATEGORY, qsig_ie_handle); + +} + +/*---------------------------------------------------------------------------*/
\ No newline at end of file diff --git a/epan/dissectors/packet-qsig.h b/epan/dissectors/packet-qsig.h new file mode 100644 index 0000000000..074e66f200 --- /dev/null +++ b/epan/dissectors/packet-qsig.h @@ -0,0 +1,53 @@ +/* Do not modify this file. */ +/* It is created automatically by the ASN.1 to Wireshark dissector compiler */ +/* .\packet-qsig.h */ +/* ../../tools/asn2wrs.py -b -T -e -p qsig -c qsig.cnf -s packet-qsig-template qsig-gf-ext.asn qsig-gf-gp.asn qsig-gf-ade.asn qsig-na.asn qsig-cf.asn */ + +/* Input file: packet-qsig-template.h */ + +#line 1 "packet-qsig-template.h" +/* packet-qsig.h + * Routines for QSIG packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef PACKET_QSIG_H +#define PACKET_QSIG_H + + +/*--- Included file: packet-qsig-exp.h ---*/ +#line 1 "packet-qsig-exp.h" + +static const value_string qsig_Name_vals[] = { + { 0, "namePresentationAllowed" }, + { 1, "namePresentationRestricted" }, + { 2, "nameNotAvailable" }, + { 0, NULL } +}; +extern int dissect_qsig_Name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, int hf_index _U_); + +/*--- End of included file: packet-qsig-exp.h ---*/ +#line 30 "packet-qsig-template.h" + +#endif /* PACKET_QSIG_H */ + diff --git a/epan/libwireshark.def b/epan/libwireshark.def index 092841a568..b641c7504a 100644 --- a/epan/libwireshark.def +++ b/epan/libwireshark.def @@ -221,6 +221,11 @@ dissect_per_sequence dissect_per_sequence_of dissect_per_set_of dissect_per_VisibleString +dissect_q932_PresentedNumberScreened +dissect_q932_PresentedNumberUnscreened +dissect_q932_PartyNumber +dissect_q932_PartySubaddress +dissect_qsig_Name dissect_rpc_array dissect_rpc_bool dissect_rpc_bytes |