aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/h323
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2007-10-17 10:25:21 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2007-10-17 10:25:21 +0000
commit286f231eb9237bd800aa339aff2413f147300552 (patch)
treedc35a85051ba45f75c10bf12071155666b5d1f96 /asn1/h323
parent5fa636334baa7c78115a6626f140c6c386725197 (diff)
new H.323 dissector
- Generic Extensible Framework helper - Annex M1 (QSIG over H.323) - Annex M4 - Annex R H.225/H.245 support for Generic Extensible Framework (GEF) H.235 register MIKEY into new H.225/H.245 GEF tables regenerate H.225,H.245,H.235,H.450,H.450-ROS,T.35 from new makefiles svn path=/trunk/; revision=23216
Diffstat (limited to 'asn1/h323')
-rw-r--r--asn1/h323/Makefile.am26
-rw-r--r--asn1/h323/Makefile.common53
-rw-r--r--asn1/h323/Makefile.nmake29
-rw-r--r--asn1/h323/RAS-PROTOCOL-TUNNEL.asn27
-rw-r--r--asn1/h323/ROBUSTNESS-DATA.asn89
-rw-r--r--asn1/h323/h323.cnf17
-rw-r--r--asn1/h323/packet-h323-template.c145
7 files changed, 386 insertions, 0 deletions
diff --git a/asn1/h323/Makefile.am b/asn1/h323/Makefile.am
new file mode 100644
index 0000000000..0b7ca0ada3
--- /dev/null
+++ b/asn1/h323/Makefile.am
@@ -0,0 +1,26 @@
+# $Id: Makefile.am 23085 2007-10-07 21:07:33Z jmayer $
+#
+#
+# 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.
+
+
+include ../Makefile.preinc
+include Makefile.common
+include ../Makefile.inc
+
diff --git a/asn1/h323/Makefile.common b/asn1/h323/Makefile.common
new file mode 100644
index 0000000000..152abac171
--- /dev/null
+++ b/asn1/h323/Makefile.common
@@ -0,0 +1,53 @@
+# $Id: Makefile.common 22951 2007-09-25 11:58:35Z kukosa $
+#
+#
+# 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.
+
+
+PROTOCOL_NAME = h323
+
+DISSECTOR_FILES = \
+ packet-$(PROTOCOL_NAME).c \
+ packet-$(PROTOCOL_NAME).h
+
+NEED_PACKET_PROTO_H = 1
+
+EXT_ASN_FILE_LIST =
+
+ASN_FILE_LIST = \
+ RAS-PROTOCOL-TUNNEL.asn \
+ ROBUSTNESS-DATA.asn
+
+EXTRA_DIST = \
+ $(ASN_FILE_LIST) \
+ packet-$(PROTOCOL_NAME)-template.c \
+ $(PROTOCOL_NAME).cnf
+
+SRC_FILES = \
+ $(EXTRA_DIST) \
+ $(EXT_ASN_FILE_LIST)
+
+A2W_FLAGS =
+
+EXTRA_CNF = \
+ ../h225/h225-exp.cnf
+
+../h225/h225-exp.cnf:
+ (cd ../h225 && $(MAKE_CNF_EXPORT))
+
diff --git a/asn1/h323/Makefile.nmake b/asn1/h323/Makefile.nmake
new file mode 100644
index 0000000000..d8dc2a43eb
--- /dev/null
+++ b/asn1/h323/Makefile.nmake
@@ -0,0 +1,29 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id: Makefile.nmake 23085 2007-10-07 21:07:33Z jmayer $
+#
+#
+# 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.
+
+
+include ../../config.nmake
+include ../Makefile.preinc.nmake
+include Makefile.common
+include ../Makefile.inc.nmake
+
diff --git a/asn1/h323/RAS-PROTOCOL-TUNNEL.asn b/asn1/h323/RAS-PROTOCOL-TUNNEL.asn
new file mode 100644
index 0000000000..20a7c41902
--- /dev/null
+++ b/asn1/h323/RAS-PROTOCOL-TUNNEL.asn
@@ -0,0 +1,27 @@
+-- RAS-PROTOCOL-TUNNEL.asn
+--
+-- Taken from ITU ASN.1 database
+-- http://www.itu.int/ITU-T/asn1/database/itu-t/h/h323/2006/RAS-PROTOCOL-TUNNEL.asn
+--
+-- $Id: H235-SECURITY-MESSAGES.asn 18339 2006-06-05 06:52:50Z kukosa $
+--
+
+-- Module RAS-PROTOCOL-TUNNEL (H.323:06/2006)
+RAS-PROTOCOL-TUNNEL DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+
+IMPORTS TunnelledProtocol, NonStandardParameter
+ FROM H323-MESSAGES;
+
+RasTunnelledSignallingMessage ::= SEQUENCE {
+ tunnelledProtocolID TunnelledProtocol, -- tunnelled signalling protocol ID
+ messageContent SEQUENCE OF OCTET STRING, -- sequence of entire message(s)
+ tunnellingRequired NULL OPTIONAL,
+ nonStandardData NonStandardParameter OPTIONAL,
+ ...
+}
+
+END
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D
+
diff --git a/asn1/h323/ROBUSTNESS-DATA.asn b/asn1/h323/ROBUSTNESS-DATA.asn
new file mode 100644
index 0000000000..b2fe7aed6c
--- /dev/null
+++ b/asn1/h323/ROBUSTNESS-DATA.asn
@@ -0,0 +1,89 @@
+-- ROBUSTNESS-DATA.asn
+--
+-- $Id: H235-SECURITY-MESSAGES.asn 18339 2006-06-05 06:52:50Z kukosa $
+--
+-- ITU-T Rec. H.323 (06/2006)
+--
+-- Annex R - Robustness methods for H.323 entities
+-- R.11 GenericData usage
+--
+
+ROBUSTNESS-DATA DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+
+IMPORTS
+ TransportAddress, AlternateTransportAddresses,
+ GloballyUniqueID, TimeToLive
+ FROM H323-MESSAGES;
+
+RobustnessData ::= SEQUENCE {
+ versionID INTEGER(1..256),
+ robustnessData
+ CHOICE {
+ rrqData Rrq-RD,
+ rcfData Rcf-RD,
+ setupData Setup-RD,
+ connectData Connect-RD,
+ statusData Status-RD,
+ statusInquiryData StatusInquiry-RD,
+ ...
+ },
+ ...
+}
+
+BackupCallSignalAddresses ::= SEQUENCE OF
+ CHOICE {
+ tcp TransportAddress,
+ alternateTransport AlternateTransportAddresses,
+ ...
+ }
+
+GloballyUniqueIdentifier ::= GloballyUniqueID
+
+Rrq-RD ::= SEQUENCE {
+ backupCallSignalAddresses BackupCallSignalAddresses,
+ hasSharedRepository NULL OPTIONAL,
+ ...
+}
+
+Rcf-RD ::= SEQUENCE {
+ hasSharedRepository NULL OPTIONAL,
+ ...,
+ irrFrequency INTEGER(1..65535) OPTIONAL -- in seconds;
+ -- not present
+ -- if GK does not
+ -- want IRRs for
+ -- recovered calls
+}
+
+Setup-RD ::= SEQUENCE {
+ backupCallSignalAddresses BackupCallSignalAddresses,
+ hasSharedRepository NULL OPTIONAL,
+ endpointGuid GloballyUniqueIdentifier OPTIONAL,
+ ...
+}
+
+Connect-RD ::= SEQUENCE {
+ backupCallSignalAddresses BackupCallSignalAddresses,
+ hasSharedRepository NULL OPTIONAL,
+ endpointGuid GloballyUniqueIdentifier OPTIONAL,
+ ...
+}
+
+Status-RD ::= SEQUENCE {
+ h245Address TransportAddress OPTIONAL,
+ fastStart SEQUENCE OF OCTET STRING OPTIONAL,
+ ...,
+ resetH245 NULL OPTIONAL
+}
+
+StatusInquiry-RD ::= SEQUENCE {
+ h245Address TransportAddress OPTIONAL,
+ timeToLive TimeToLive OPTIONAL,
+ includeFastStart NULL OPTIONAL,
+ ...
+}
+
+robustnessId GenericIdentifier ::= standard:1
+
+END
diff --git a/asn1/h323/h323.cnf b/asn1/h323/h323.cnf
new file mode 100644
index 0000000000..2ca21adaef
--- /dev/null
+++ b/asn1/h323/h323.cnf
@@ -0,0 +1,17 @@
+# h323.cnf
+# H.323 conformation file
+# 2007 Tomas Kukosa
+
+# $Id$
+
+#.IMPORT ../h225/h225-exp.cnf
+
+#.OPT
+PER
+ALIGNED
+#.END
+
+#.PDU_NEW
+RasTunnelledSignallingMessage
+RobustnessData
+#.END
diff --git a/asn1/h323/packet-h323-template.c b/asn1/h323/packet-h323-template.c
new file mode 100644
index 0000000000..bb3d268f61
--- /dev/null
+++ b/asn1/h323/packet-h323-template.c
@@ -0,0 +1,145 @@
+/* packet-h323.c
+ * Routines for H.323 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 <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+#include <epan/oids.h>
+#include <epan/asn1.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-per.h"
+#include "packet-h225.h"
+#include "packet-h323.h"
+
+#define PNAME "H.323"
+#define PSNAME "H.323"
+#define PFNAME "h323"
+
+
+/* Generic Extensible Framework */
+gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type) {
+ gef_ctx_t *gefx;
+
+ gefx = ep_alloc0(sizeof(gef_ctx_t));
+ gefx->signature = GEF_CTX_SIGNATURE;
+ gefx->parent = parent;
+ gefx->type = type;
+ return gefx;
+}
+
+gboolean gef_ctx_check_signature(gef_ctx_t *gefx) {
+ return gefx && (gefx->signature == GEF_CTX_SIGNATURE);
+}
+
+gef_ctx_t* gef_ctx_get(void *ptr) {
+ gef_ctx_t *gefx = (gef_ctx_t*)ptr;
+ asn1_ctx_t *actx = (asn1_ctx_t*)ptr;
+
+ if (!asn1_ctx_check_signature(actx))
+ actx = NULL;
+
+ if (actx)
+ gefx = actx->private_data;
+
+ if (!gef_ctx_check_signature(gefx))
+ gefx = NULL;
+
+ return gefx;
+}
+
+void gef_ctx_update_key(gef_ctx_t *gefx) {
+ const gchar *parent_key;
+
+ if (!gefx) return;
+ parent_key = (gefx->parent) ? gefx->parent->key : NULL;
+ gefx->key = ep_strdup_printf(
+ "%s%s" /* parent prefix */
+ "%s%s%s" /* type, id */
+ "%s%s" /* subid */,
+ (parent_key) ? parent_key : "", (parent_key) ? "/" : "",
+ (gefx->type) ? gefx->type : "", (gefx->type && (gefx->id || gefx->subid)) ? "/" : "", (gefx->id) ? gefx->id : "",
+ (gefx->subid) ? "-" : "", (gefx->subid) ? gefx->subid : ""
+ );
+}
+
+/* Subdissectors */
+static dissector_handle_t q931_handle = NULL;
+
+/* Initialize the protocol and registered fields */
+int proto_h323 = -1;
+#include "packet-h323-hf.c"
+
+/* Initialize the subtree pointers */
+#include "packet-h323-ett.c"
+
+#include "packet-h323-fn.c"
+
+/*--- proto_register_h323 ----------------------------------------------*/
+void proto_register_h323(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] = {
+#include "packet-h323-hfarr.c"
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+#include "packet-h323-ettarr.c"
+ };
+
+ /* Register protocol */
+ proto_h323 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_h323, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+
+}
+
+
+/*--- proto_reg_handoff_h323 -------------------------------------------*/
+void proto_reg_handoff_h323(void)
+{
+ q931_handle = find_dissector("q931");
+
+ /* H.323, Annex M1, Tunnelling of signalling protocols (QSIG) in H.323 */
+ dissector_add_string("h225.tp", "1.3.12.9", q931_handle);
+
+ /* H.323, Annex M4, Tunnelling of narrow-band signalling syntax (NSS) for H.323 */
+ dissector_add_string("h225.gef.content", "GenericData/1000/1",
+ new_create_dissector_handle(dissect_RasTunnelledSignallingMessage_PDU, proto_h323));
+
+ /* H.323, Annex R, Robustness methods for H.323 entities */
+ dissector_add_string("h225.gef.content", "GenericData/1/1",
+ new_create_dissector_handle(dissect_RobustnessData_PDU, proto_h323));
+}
+