From 090a5aa24b748dfc3da6afc24931bfdafc2ab1d6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 24 Apr 2003 21:15:13 +0000 Subject: From Matthijs Melchior: add the ASN.1 routines to the table of routines exported to dissectors. svn path=/trunk/; revision=7552 --- AUTHORS | 1 + doc/ethereal.pod.template | 1 + epan/plugins.c | 28 +++++++++++++++++++++++++++- plugins/plugin_api.c | 28 +++++++++++++++++++++++++++- plugins/plugin_api.h | 28 +++++++++++++++++++++++++++- plugins/plugin_api_decls.h | 27 ++++++++++++++++++++++++++- plugins/plugin_table.h | 34 +++++++++++++++++++++++++++++++++- 7 files changed, 142 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8caf2b2243..e91796dbd0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1686,6 +1686,7 @@ And assorted fixes and enhancements by the people listed above and by: Eric Perie David Yon Marcio Franco + Matthijs Melchior Alain Magloire was kind enough to give his permission to use his version of snprintf.c. diff --git a/doc/ethereal.pod.template b/doc/ethereal.pod.template index 6121570e1e..e832b7590e 100644 --- a/doc/ethereal.pod.template +++ b/doc/ethereal.pod.template @@ -1735,6 +1735,7 @@ B. Eric Perie David Yon Marcio Franco + Matthijs Melchior Alain Magloire was kind enough to give his permission to use his version of snprintf.c. diff --git a/epan/plugins.c b/epan/plugins.c index 3191ac529c..e30326af09 100644 --- a/epan/plugins.c +++ b/epan/plugins.c @@ -1,7 +1,7 @@ /* plugins.c * plugin routines * - * $Id: plugins.c,v 1.64 2003/04/08 17:20:03 guy Exp $ + * $Id: plugins.c,v 1.65 2003/04/24 21:15:12 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -66,6 +66,7 @@ #include "packet-tpkt.h" #include "packet-tcp.h" #include "tap.h" +#include "asn1.h" #include "plugins/plugin_table.h" static plugin_address_table_t patable; #endif @@ -492,6 +493,31 @@ init_plugins(const char *plugin_dir) patable.p_register_tap = register_tap; patable.p_tap_queue_packet = tap_queue_packet; + + patable.p_asn1_open = asn1_open; + patable.p_asn1_close = asn1_close; + patable.p_asn1_octet_decode = asn1_octet_decode; + patable.p_asn1_tag_decode = asn1_tag_decode; + patable.p_asn1_id_decode = asn1_id_decode; + patable.p_asn1_length_decode = asn1_length_decode; + patable.p_asn1_header_decode = asn1_header_decode; + patable.p_asn1_eoc = asn1_eoc; + patable.p_asn1_eoc_decode = asn1_eoc_decode; + patable.p_asn1_null_decode = asn1_null_decode; + patable.p_asn1_bool_decode = asn1_bool_decode; + patable.p_asn1_int32_value_decode = asn1_int32_value_decode; + patable.p_asn1_int32_decode = asn1_int32_decode; + patable.p_asn1_uint32_value_decode = asn1_uint32_value_decode; + patable.p_asn1_uint32_decode = asn1_uint32_decode; + patable.p_asn1_bits_decode = asn1_bits_decode; + patable.p_asn1_string_value_decode = asn1_string_value_decode; + patable.p_asn1_string_decode = asn1_octet_string_decode; + patable.p_asn1_octet_string_decode = asn1_octet_string_decode; + patable.p_asn1_subid_decode = asn1_subid_decode; + patable.p_asn1_oid_value_decode = asn1_oid_value_decode; + patable.p_asn1_oid_decode = asn1_oid_decode; + patable.p_asn1_sequence_decode = asn1_sequence_decode; + patable.p_asn1_err_to_str = asn1_err_to_str; #endif diff --git a/plugins/plugin_api.c b/plugins/plugin_api.c index 89b9503078..8f822748a0 100644 --- a/plugins/plugin_api.c +++ b/plugins/plugin_api.c @@ -1,7 +1,7 @@ /* plugin_api.c * Routines for Ethereal plugins. * - * $Id: plugin_api.c,v 1.45 2003/04/08 17:20:05 guy Exp $ + * $Id: plugin_api.c,v 1.46 2003/04/24 21:15:13 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez @@ -214,4 +214,30 @@ plugin_address_table_init(plugin_address_table_t *pat) p_register_tap = pat->p_register_tap; p_tap_queue_packet = pat->p_tap_queue_packet; + + p_asn1_open = pat->p_asn1_open; + p_asn1_close = pat->p_asn1_close; + p_asn1_octet_decode = pat->p_asn1_octet_decode; + p_asn1_tag_decode = pat->p_asn1_tag_decode; + p_asn1_id_decode = pat->p_asn1_id_decode; + p_asn1_length_decode = pat->p_asn1_length_decode; + p_asn1_header_decode = pat->p_asn1_header_decode; + p_asn1_eoc = pat->p_asn1_eoc; + p_asn1_eoc_decode = pat->p_asn1_eoc_decode; + p_asn1_null_decode = pat->p_asn1_null_decode; + p_asn1_bool_decode = pat->p_asn1_bool_decode; + p_asn1_int32_value_decode = pat->p_asn1_int32_value_decode; + p_asn1_int32_decode = pat->p_asn1_int32_decode; + p_asn1_uint32_value_decode = pat->p_asn1_uint32_value_decode; + p_asn1_uint32_decode = pat->p_asn1_uint32_decode; + p_asn1_bits_decode = pat->p_asn1_bits_decode; + p_asn1_string_value_decode = pat->p_asn1_string_value_decode; + p_asn1_string_decode = pat->p_asn1_string_decode; + p_asn1_octet_string_decode = pat->p_asn1_octet_string_decode; + p_asn1_subid_decode = pat->p_asn1_subid_decode; + p_asn1_oid_value_decode = pat->p_asn1_oid_value_decode; + p_asn1_oid_decode = pat->p_asn1_oid_decode; + p_asn1_sequence_decode = pat->p_asn1_sequence_decode; + p_asn1_err_to_str = pat->p_asn1_err_to_str; + } diff --git a/plugins/plugin_api.h b/plugins/plugin_api.h index af09fdeeff..9c667914dd 100644 --- a/plugins/plugin_api.h +++ b/plugins/plugin_api.h @@ -1,7 +1,7 @@ /* plugin_api.h * Routines for Ethereal plugins. * - * $Id: plugin_api.h,v 1.46 2003/04/08 17:20:05 guy Exp $ + * $Id: plugin_api.h,v 1.47 2003/04/24 21:15:13 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez @@ -245,6 +245,31 @@ #define register_tap (*p_register_tap) #define tap_queue_packet (*p_tap_queue_packet) +#define asn1_open (*p_asn1_open) +#define asn1_close (*p_asn1_close) +#define asn1_octet_decode (*p_asn1_octet_decode) +#define asn1_tag_decode (*p_asn1_tag_decode) +#define asn1_id_decode (*p_asn1_id_decode) +#define asn1_length_decode (*p_asn1_length_decode) +#define asn1_header_decode (*p_asn1_header_decode) +#define asn1_eoc (*p_asn1_eoc) +#define asn1_eoc_decode (*p_asn1_eoc_decode) +#define asn1_null_decode (*p_asn1_null_decode) +#define asn1_bool_decode (*p_asn1_bool_decode) +#define asn1_int32_value_decode (*p_asn1_int32_value_decode) +#define asn1_int32_decode (*p_asn1_int32_decode) +#define asn1_uint32_value_decode (*p_asn1_uint32_value_decode) +#define asn1_uint32_decode (*p_asn1_uint32_decode) +#define asn1_bits_decode (*p_asn1_bits_decode) +#define asn1_string_value_decode (*p_asn1_string_value_decode) +#define asn1_string_decode (*p_asn1_string_decode) +#define asn1_octet_string_decode (*p_asn1_octet_string_decode) +#define asn1_subid_decode (*p_asn1_subid_decode) +#define asn1_oid_value_decode (*p_asn1_oid_value_decode) +#define asn1_oid_decode (*p_asn1_oid_decode) +#define asn1_sequence_decode (*p_asn1_sequence_decode) +#define asn1_err_to_str (*p_asn1_err_to_str) + #endif #include @@ -255,6 +280,7 @@ #include "packet-tpkt.h" #include "packet-tcp.h" #include "tap.h" +#include "asn1.h" #include "plugin_table.h" diff --git a/plugins/plugin_api_decls.h b/plugins/plugin_api_decls.h index 2216d02e57..8721e0bdb5 100644 --- a/plugins/plugin_api_decls.h +++ b/plugins/plugin_api_decls.h @@ -2,7 +2,7 @@ * Declarations of a list of "p_" names; included in various places * to declare them as variables or as function members. * - * $Id: plugin_api_decls.h,v 1.8 2003/04/08 17:20:05 guy Exp $ + * $Id: plugin_api_decls.h,v 1.9 2003/04/24 21:15:13 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez @@ -253,3 +253,28 @@ addr_show_fragment_seq_tree p_show_fragment_seq_tree; addr_register_tap p_register_tap; addr_tap_queue_packet p_tap_queue_packet; + +addr_asn1_open p_asn1_open; +addr_asn1_close p_asn1_close; +addr_asn1_octet_decode p_asn1_octet_decode; +addr_asn1_tag_decode p_asn1_tag_decode; +addr_asn1_id_decode p_asn1_id_decode; +addr_asn1_length_decode p_asn1_length_decode; +addr_asn1_header_decode p_asn1_header_decode; +addr_asn1_eoc p_asn1_eoc; +addr_asn1_eoc_decode p_asn1_eoc_decode; +addr_asn1_null_decode p_asn1_null_decode; +addr_asn1_bool_decode p_asn1_bool_decode; +addr_asn1_int32_value_decode p_asn1_int32_value_decode; +addr_asn1_int32_decode p_asn1_int32_decode; +addr_asn1_uint32_value_decode p_asn1_uint32_value_decode; +addr_asn1_uint32_decode p_asn1_uint32_decode; +addr_asn1_bits_decode p_asn1_bits_decode; +addr_asn1_string_value_decode p_asn1_string_value_decode; +addr_asn1_string_decode p_asn1_string_decode; +addr_asn1_octet_string_decode p_asn1_octet_string_decode; +addr_asn1_subid_decode p_asn1_subid_decode; +addr_asn1_oid_value_decode p_asn1_oid_value_decode; +addr_asn1_oid_decode p_asn1_oid_decode; +addr_asn1_sequence_decode p_asn1_sequence_decode; +addr_asn1_err_to_str p_asn1_err_to_str; diff --git a/plugins/plugin_table.h b/plugins/plugin_table.h index 4ef39bd2ec..76ed4d6009 100644 --- a/plugins/plugin_table.h +++ b/plugins/plugin_table.h @@ -1,7 +1,7 @@ /* plugin_table.h * Table of exported addresses for Ethereal plugins. * - * $Id: plugin_table.h,v 1.58 2003/04/08 17:20:05 guy Exp $ + * $Id: plugin_table.h,v 1.59 2003/04/24 21:15:13 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez @@ -283,6 +283,38 @@ typedef gboolean (*addr_show_fragment_seq_tree)(fragment_data *, const fragment_ typedef int (*addr_register_tap)(char *); typedef void (*addr_tap_queue_packet)(int, packet_info *, void *); +typedef void (*addr_asn1_open)(ASN1_SCK *, tvbuff_t *, int ); +typedef void (*addr_asn1_close)(ASN1_SCK *, int *); +typedef int (*addr_asn1_octet_decode)(ASN1_SCK *, guchar *); +typedef int (*addr_asn1_tag_decode)(ASN1_SCK *, guint *); +typedef int (*addr_asn1_id_decode)(ASN1_SCK *, guint *, guint *, guint *); +typedef int (*addr_asn1_length_decode)(ASN1_SCK *, gboolean *, guint *); +typedef int (*addr_asn1_header_decode)(ASN1_SCK *, guint *, guint *, guint *, + gboolean *, guint *); +typedef int (*addr_asn1_eoc)(ASN1_SCK *, int ); +typedef int (*addr_asn1_eoc_decode)(ASN1_SCK *, int ); +typedef int (*addr_asn1_null_decode)(ASN1_SCK *, int ); +typedef int (*addr_asn1_bool_decode)(ASN1_SCK *, int , gboolean *); +typedef int (*addr_asn1_int32_value_decode)(ASN1_SCK *, int , gint32 *); +typedef int (*addr_asn1_int32_decode)(ASN1_SCK *, gint32 *, guint *); +typedef int (*addr_asn1_uint32_value_decode)(ASN1_SCK *, int , guint *); +typedef int (*addr_asn1_uint32_decode)(ASN1_SCK *, guint32 *, guint *); +typedef int (*addr_asn1_bits_decode)(ASN1_SCK *, int , guchar **, + guint *, guchar *); +typedef int (*addr_asn1_string_value_decode)(ASN1_SCK *, int , + guchar **); +typedef int (*addr_asn1_string_decode)(ASN1_SCK *, guchar **, guint *, + guint *, guint ); +typedef int (*addr_asn1_octet_string_decode)(ASN1_SCK *, guchar **, guint *, + guint *); +typedef int (*addr_asn1_subid_decode)(ASN1_SCK *, subid_t *); +typedef int (*addr_asn1_oid_value_decode)(ASN1_SCK *, int , subid_t **, + guint *); +typedef int (*addr_asn1_oid_decode)( ASN1_SCK *, subid_t **, guint *, guint *); +typedef int (*addr_asn1_sequence_decode)( ASN1_SCK *, guint *, guint *); + +typedef char *(*addr_asn1_err_to_str)(int ); + typedef struct { #include "plugin_api_decls.h" -- cgit v1.2.1