aboutsummaryrefslogtreecommitdiffstats
path: root/rpc_defrag.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-02-18 23:51:55 +0000
committerGuy Harris <guy@alum.mit.edu>2002-02-18 23:51:55 +0000
commitb5058439201fcfdba86c6f7a6105ecb0cb6d6fdb (patch)
tree7b55a5cf8df1e890f729f2bf2a75756883f1c6a9 /rpc_defrag.h
parent8166da40d5ce25fcf056eff41e8f43424fdc243d (diff)
Add support for reassembling RPC-over-TCP fragments, and do that in both
RPC and NDMP. Show the RPC-over-TCP fragment header as a tree with bitfields below it. Add a routine to show a reported bounds error as an "Unreassembled Packet" or a "Malformed Packet" depending on whether "pinfo->fragmented" is set, and have NBNS and RPC use that. Add "ett_ndmp_file_stats" to the list of ett_ values to be initialized (it wasn't in that list, and wasn't getting initialized). When freeing up various hash tables and memory chunks in the RPC dissector, zero out the pointers to them, just to make sure we don't try to free them again. Always destroy the TCP segment key and address memory chunks in "tcp_desegment_init()", regardless of whether TCP desegmentation is enabled - we don't *allocate* them if TCP desegmentation isn't enabled, but we should free them even if it's not enabled. Also, when we free them, set the pointers to them to null, so we don't double-free them. Supply to subdissectors called from the TCP dissector the sequence number of the first byte handed to the sub dissector. svn path=/trunk/; revision=4753
Diffstat (limited to 'rpc_defrag.h')
-rw-r--r--rpc_defrag.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/rpc_defrag.h b/rpc_defrag.h
new file mode 100644
index 0000000000..2f7dc29876
--- /dev/null
+++ b/rpc_defrag.h
@@ -0,0 +1,43 @@
+/* rpc-defrag.h
+ * Declarations for RPC defragmentation
+ *
+ * $Id: rpc_defrag.h,v 1.1 2002/02/18 23:51:55 guy Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * 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 __RPC_DEFRAG_H__
+#define __RPC_DEFRAG_H__
+
+/*
+ * RPC-over-TCP fragmentation.
+ */
+#define RPC_RM_LASTFRAG 0x80000000L
+#define RPC_RM_FRAGLEN 0x7fffffffL
+
+typedef (*rec_dissector_t)(tvbuff_t *, packet_info *, proto_tree *,
+ tvbuff_t *, fragment_data *, gboolean, guint32);
+
+extern void show_rpc_fraginfo(tvbuff_t *tvb, tvbuff_t *frag_tvb,
+ proto_tree *tree, guint32 rpc_rm, fragment_data *ipfd_head);
+extern int dissect_rpc_fragment(tvbuff_t *tvb, int offset, packet_info *pinfo,
+ proto_tree *tree, rec_dissector_t dissector, gboolean is_heur,
+ int proto, int ett, gboolean defragment);
+
+#endif /* __RPC_DEFRAG_H__ */