aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2007-04-27 08:10:18 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2007-04-27 08:10:18 +0000
commitb3fedb67fa542a94338ff3093cf0b1061f2c7ea1 (patch)
tree508f65f7c9e84287c91138eafb9009f54369f2ac /asn1
parent9e368307eb9340b5a3560f20bfe410ff38f4b9ad (diff)
new Q.932 and QSIG dissectors
svn path=/trunk/; revision=21602
Diffstat (limited to 'asn1')
-rw-r--r--asn1/Makefile.nmake18
-rw-r--r--asn1/q932/Addressing-Data-Elements.asn159
-rw-r--r--asn1/q932/Interpretation-component.asn26
-rw-r--r--asn1/q932/Makefile19
-rw-r--r--asn1/q932/Makefile.nmake62
-rw-r--r--asn1/q932/Network-Facility-Extension.asn35
-rw-r--r--asn1/q932/Network-Protocol-Profile-component.asn22
-rw-r--r--asn1/q932/packet-q932-ros-template.c102
-rw-r--r--asn1/q932/packet-q932-ros-template.h42
-rw-r--r--asn1/q932/packet-q932-template.c333
-rw-r--r--asn1/q932/packet-q932-template.h32
-rw-r--r--asn1/q932/q932-exp.cnf36
-rw-r--r--asn1/q932/q932-ros.asn112
-rw-r--r--asn1/q932/q932-ros.cnf187
-rw-r--r--asn1/q932/q932.cnf34
-rw-r--r--asn1/qsig/Makefile16
-rw-r--r--asn1/qsig/Makefile.nmake47
-rw-r--r--asn1/qsig/packet-qsig-template.c815
-rw-r--r--asn1/qsig/packet-qsig-template.h32
-rw-r--r--asn1/qsig/qsig-cf.asn440
-rw-r--r--asn1/qsig/qsig-exp.cnf21
-rw-r--r--asn1/qsig/qsig-gf-ade.asn132
-rw-r--r--asn1/qsig/qsig-gf-ext.asn36
-rw-r--r--asn1/qsig/qsig-gf-gp.asn15
-rw-r--r--asn1/qsig/qsig-na.asn137
-rw-r--r--asn1/qsig/qsig.cnf66
26 files changed, 2976 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