diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-02-22 08:56:48 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-02-22 08:56:48 +0000 |
commit | e9bc3da3707e51d56a96bf079b99f577f7c5ae6c (patch) | |
tree | 22e81a4bb0f52d77136bcefccfacdee0d743da32 /plugins | |
parent | df151b784ad010e9efe84b59e2667ae3a4eaeaab (diff) | |
download | wireshark-e9bc3da3707e51d56a96bf079b99f577f7c5ae6c.tar.gz wireshark-e9bc3da3707e51d56a96bf079b99f577f7c5ae6c.tar.bz2 wireshark-e9bc3da3707e51d56a96bf079b99f577f7c5ae6c.zip |
Handle TPKT packets split across segment boundaries, and multiple TPKT
packets per segment.
Instead of having a routine for dissectors such as the Q.931 dissector
to call to dissect the TPKT header, have a routine that does all the
reassembly and multiple-packets-per-segment work, and have the Q.931
dissector call it. Export "is_tpkt()", and the new routine, to plugins.
Add preferences for TPKT and Q.931 reassembly.
svn path=/trunk/; revision=4778
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/plugin_api.c | 8 | ||||
-rw-r--r-- | plugins/plugin_api.h | 10 | ||||
-rw-r--r-- | plugins/plugin_api_defs.h | 5 | ||||
-rw-r--r-- | plugins/plugin_table.h | 11 |
4 files changed, 29 insertions, 5 deletions
diff --git a/plugins/plugin_api.c b/plugins/plugin_api.c index 95d6a945b6..a76207d05c 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.36 2002/02/20 08:24:52 guy Exp $ + * $Id: plugin_api.c,v 1.37 2002/02/22 08:56:48 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -168,4 +168,10 @@ plugin_address_table_init(plugin_address_table_t *pat) /* GIOP End */ + /* TPKT Begin */ + + p_is_tpkt = pat->p_is_tpkt; + p_dissect_tpkt_encap = pat->p_dissect_tpkt_encap; + + /* TPKT End */ } diff --git a/plugins/plugin_api.h b/plugins/plugin_api.h index 17ab3ccfdf..b23e42438f 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.37 2002/02/20 08:24:52 guy Exp $ + * $Id: plugin_api.h,v 1.38 2002/02/22 08:56:48 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -168,7 +168,6 @@ #define prefs_register_enum_preference (*p_prefs_register_enum_preference) #define prefs_register_string_preference (*p_prefs_register_string_preference) - /* GIOP entries Begin */ #define register_giop_user (*p_register_giop_user) @@ -197,12 +196,19 @@ /* GIOP entries End */ +/* TPKT entries Begin */ + +#define is_tpkt (*p_is_tpkt) +#define dissect_tpkt_encap (*p_dissect_tpkt_encap) + +/* TPKT entries End */ #endif #include <epan/packet.h> #include <epan/conversation.h> #include "prefs.h" #include "packet-giop.h" +#include "packet-tpkt.h" #include "plugin_table.h" diff --git a/plugins/plugin_api_defs.h b/plugins/plugin_api_defs.h index 3847af90c2..93fe80f598 100644 --- a/plugins/plugin_api_defs.h +++ b/plugins/plugin_api_defs.h @@ -1,7 +1,7 @@ /* plugin_api_defs.h * Define the variables that hold pointers to plugin API functions * - * $Id: plugin_api_defs.h,v 1.12 2002/02/20 08:24:52 guy Exp $ + * $Id: plugin_api_defs.h,v 1.13 2002/02/22 08:56:48 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -192,6 +192,9 @@ addr_get_CDR_ushort p_get_CDR_ushort; addr_get_CDR_wchar p_get_CDR_wchar; addr_get_CDR_wstring p_get_CDR_wstring; +addr_is_tpkt p_is_tpkt; +addr_dissect_tpkt_encap p_dissect_tpkt_encap; + #endif /* PLUGINS_NEED_ADDRESS_TABLE */ #endif /* PLUGIN_API_DEFS_H */ diff --git a/plugins/plugin_table.h b/plugins/plugin_table.h index 6c5715fbf2..580df8e0b4 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.40 2002/02/20 08:24:52 guy Exp $ + * $Id: plugin_table.h,v 1.41 2002/02/22 08:56:48 guy Exp $ * * Ethereal - Network traffic analyzer * Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -221,6 +221,10 @@ typedef gint8 (*addr_get_CDR_wchar)(tvbuff_t *, gchar **, int *, typedef guint32 (*addr_get_CDR_wstring)(tvbuff_t *, gchar **, int *, gboolean, int, MessageHeader *); +typedef int (*addr_is_tpkt)(tvbuff_t *, int *); +typedef void (*addr_dissect_tpkt_encap)(tvbuff_t *, packet_info *, + proto_tree *, gboolean, dissector_handle_t); + typedef struct { addr_check_col p_check_col; @@ -384,7 +388,12 @@ typedef struct { /* GIOP End */ + /* TPKT Begin */ + + addr_is_tpkt p_is_tpkt; + addr_dissect_tpkt_encap p_dissect_tpkt_encap; + /* GIOP End */ } plugin_address_table_t; #else /* ! PLUGINS_NEED_ADDRESS_TABLE */ |