From 84488ec01617591a27cd6ca848992694a13c12ac Mon Sep 17 00:00:00 2001 From: Tomas Kukosa Date: Mon, 29 Oct 2007 19:25:37 +0000 Subject: asn2wrs - parameterized object class assignment - octet string with extensible size constraint - RELATIVE-OID type (still not supported in packet-per/ber) packet-per - octet string with extensible size constraint more dissect_per_... functions exported from libwireshark.dll PER dissectors regenerated add forgotten packet-h323-template.h fix svn properties for h323 files svn path=/trunk/; revision=23309 --- asn1/h323/Makefile.am | 52 +++---- asn1/h323/Makefile.common | 106 +++++++------- asn1/h323/Makefile.nmake | 58 ++++---- asn1/h323/RAS-PROTOCOL-TUNNEL.asn | 2 +- asn1/h323/ROBUSTNESS-DATA.asn | 2 +- asn1/h323/h323.cnf | 34 ++--- asn1/h323/packet-h323-template.c | 290 +++++++++++++++++++------------------- asn1/h323/packet-h323-template.h | 66 +++++++++ 8 files changed, 338 insertions(+), 272 deletions(-) create mode 100644 asn1/h323/packet-h323-template.h (limited to 'asn1/h323') diff --git a/asn1/h323/Makefile.am b/asn1/h323/Makefile.am index 0b7ca0ada3..462af31e88 100644 --- a/asn1/h323/Makefile.am +++ b/asn1/h323/Makefile.am @@ -1,26 +1,26 @@ -# $Id: Makefile.am 23085 2007-10-07 21:07:33Z jmayer $ -# -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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 - +# $Id$ +# +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# 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 index 152abac171..c57acb54a5 100644 --- a/asn1/h323/Makefile.common +++ b/asn1/h323/Makefile.common @@ -1,53 +1,53 @@ -# $Id: Makefile.common 22951 2007-09-25 11:58:35Z kukosa $ -# -# -# Wireshark - Network traffic analyzer -# By Gerald Combs -# 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)) - +# $Id$ +# +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# 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 index d8dc2a43eb..5a32997c60 100644 --- a/asn1/h323/Makefile.nmake +++ b/asn1/h323/Makefile.nmake @@ -1,29 +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 -# 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 - +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id$ +# +# +# Wireshark - Network traffic analyzer +# By Gerald Combs +# 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 index 20a7c41902..4f791c314c 100644 --- a/asn1/h323/RAS-PROTOCOL-TUNNEL.asn +++ b/asn1/h323/RAS-PROTOCOL-TUNNEL.asn @@ -3,7 +3,7 @@ -- 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 $ +-- $Id$ -- -- Module RAS-PROTOCOL-TUNNEL (H.323:06/2006) diff --git a/asn1/h323/ROBUSTNESS-DATA.asn b/asn1/h323/ROBUSTNESS-DATA.asn index b2fe7aed6c..7af9ae89bb 100644 --- a/asn1/h323/ROBUSTNESS-DATA.asn +++ b/asn1/h323/ROBUSTNESS-DATA.asn @@ -1,6 +1,6 @@ -- ROBUSTNESS-DATA.asn -- --- $Id: H235-SECURITY-MESSAGES.asn 18339 2006-06-05 06:52:50Z kukosa $ +-- $Id$ -- -- ITU-T Rec. H.323 (06/2006) -- diff --git a/asn1/h323/h323.cnf b/asn1/h323/h323.cnf index 2ca21adaef..de01473bd7 100644 --- a/asn1/h323/h323.cnf +++ b/asn1/h323/h323.cnf @@ -1,17 +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 +# 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 index bb3d268f61..44f2b816ad 100644 --- a/asn1/h323/packet-h323-template.c +++ b/asn1/h323/packet-h323-template.c @@ -1,145 +1,145 @@ -/* packet-h323.c - * Routines for H.323 packet dissection - * 2007 Tomas Kukosa - * - * $Id$ - * - * Wireshark - Network traffic analyzer - * By Gerald Combs - * 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 -#include -#include -#include -#include - -#include -#include - -#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)); -} - +/* packet-h323.c + * Routines for H.323 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * 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 +#include +#include +#include +#include + +#include +#include + +#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)); +} + diff --git a/asn1/h323/packet-h323-template.h b/asn1/h323/packet-h323-template.h new file mode 100644 index 0000000000..2f467b66cd --- /dev/null +++ b/asn1/h323/packet-h323-template.h @@ -0,0 +1,66 @@ +/* packet-h323.h + * Routines for H.235 packet dissection + * 2007 Tomas Kukosa + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * 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_H323_H +#define PACKET_H323_H + +/* Generic Extensible Framework */ + +#define GEF_CTX_SIGNATURE 0x47454658 /* "GEFX" */ + +typedef struct _gef_ctx_t { + guint32 signature; + struct _gef_ctx_t *parent; + /* + H323-MESSAGES + FeatureDescriptor/ + + GenericData/ + + MULTIMEDIA-SYSTEM-CONTROL + GenericInformation/[-] + + GenericMessage/[-] + + GenericCapability/ + collapsing/ + nonCollapsing/ + nonCollapsingRaw + EncryptionSync + + */ + const gchar *type; + const gchar *id; + const gchar *subid; + const gchar *key; +} gef_ctx_t; + +extern gef_ctx_t* gef_ctx_alloc(gef_ctx_t *parent, const gchar *type); +extern gboolean gef_ctx_check_signature(gef_ctx_t *gefx); +extern gef_ctx_t* gef_ctx_get(void *ptr); +extern void gef_ctx_update_key(gef_ctx_t *gefx); + +#endif /* PACKET_H323_H */ + -- cgit v1.2.1