From 314c36da9ab818ee9d47759cda10cb9466afbce7 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Mon, 24 Oct 2005 21:42:19 +0000 Subject: From Graeme Lunt: The ftbp.patch file includes: a) A fix to acse.cnf which works around an asn2eth bug (it is the AE-qualifier EXPORT I want, but asn2eth doesn't generate the appropriate extern for the values). Also a small cosmetic change for EXTERNAL decodings. b) New EXPORTs for the FTAM dissector for use in FTBP. c) A fix to asn2eth to solve the problem if you EXPORT types that include a '-' character in the name (e.g. "AE-qualifier" from acse.cnf, "Date-and-Time-Attribute" from ftam.cnf). The problem is that asn2eth generates the "xxxx-exp.cnf" file using the 'C' name (which has replaced '-' with '_') rather than the original 'ASN' name. The fix just undoes the replacement as I couldn't see the original name being preserved anywhere. There still remains a problem if the type has a '.' in the name - but generally I don't think they do. * Better ROS handling and registration * Simplified RTSE registration * X411 column information, extension naming and use of new RTSE/ROS registration * X420 notification extensions, warnings removal and export of ExtensionsField (missed from recent FTBP patch). * Better highlighting of S4406 protocol. svn path=/trunk/; revision=16296 --- asn1/ftbp/packet-ftbp-template.c | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 asn1/ftbp/packet-ftbp-template.c (limited to 'asn1/ftbp/packet-ftbp-template.c') diff --git a/asn1/ftbp/packet-ftbp-template.c b/asn1/ftbp/packet-ftbp-template.c new file mode 100644 index 0000000000..e4f24acc3f --- /dev/null +++ b/asn1/ftbp/packet-ftbp-template.c @@ -0,0 +1,91 @@ +/* packet-ftbp.c + * Routines for File Transfer Body Part (FTBP) dissection (used in X.420 content) + * Graeme Lunt 2005 + * + * $Id$ + * + * Ethereal - 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 "packet-ber.h" + +#include "packet-acse.h" +#include "packet-ftam.h" +#include "packet-x411.h" +#include "packet-x420.h" + +#include "packet-ftbp.h" + +#define PNAME "X.420 File Transfer Body Part" +#define PSNAME "FTBP" +#define PFNAME "ftbp" + +/* Initialize the protocol and registered fields */ +int proto_ftbp = -1; + +#include "packet-ftbp-hf.c" + +/* Initialize the subtree pointers */ +static gint ett_ftbp = -1; +#include "packet-ftbp-ett.c" + +#include "packet-ftbp-fn.c" + + +/*--- proto_register_ftbp -------------------------------------------*/ +void proto_register_ftbp(void) { + + /* List of fields */ + static hf_register_info hf[] = + { +#include "packet-ftbp-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_ftbp, +#include "packet-ftbp-ettarr.c" + }; + + /* Register protocol */ + proto_ftbp = proto_register_protocol(PNAME, PSNAME, PFNAME); + + /* Register fields and subtrees */ + proto_register_field_array(proto_ftbp, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + +} + + +/*--- proto_reg_handoff_ftbp --- */ +void proto_reg_handoff_ftbp(void) { +#include "packet-ftbp-dis-tab.c" + +} -- cgit v1.2.3