aboutsummaryrefslogtreecommitdiffstats
path: root/packet.h
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
commit292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch)
treedb4edef02456a48d0f6d505166ac7d70f6c0f644 /packet.h
parent162800efb308901e0c302517be01226130e39b19 (diff)
Add tvbuff class.
Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
Diffstat (limited to 'packet.h')
-rw-r--r--packet.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/packet.h b/packet.h
index 3a8636223c..528b98cabb 100644
--- a/packet.h
+++ b/packet.h
@@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
- * $Id: packet.h,v 1.183 2000/05/05 09:32:09 guy Exp $
+ * $Id: packet.h,v 1.184 2000/05/11 08:15:59 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -35,6 +35,11 @@
#include "proto.h"
#endif
+#ifndef __TVBUFF_H__
+#include "tvbuff.h"
+#endif
+
+
/* Pointer versions of ntohs and ntohl. Given a pointer to a member of a
* byte array, returns the value of the two or four bytes at the pointer.
* The pletoh[sl] versions return the little-endian representation.
@@ -65,7 +70,6 @@
/* Useful when you have an array whose size you can tell at compile-time */
#define array_length(x) (sizeof x / sizeof x[0])
-
/* Useful when highlighting regions inside a dissect_*() function. With this
* macro, you can highlight from an arbitrary offset to the end of the
* packet (which may come before the end of the frame).
@@ -182,6 +186,9 @@ typedef enum {
} port_type;
typedef struct _packet_info {
+ const char *current_proto; /* name of protocol currently being dissected */
+ frame_data *fd;
+ tvbuff_t *compat_top_tvb; /* only needed while converting Ethereal to use tvbuffs */
int len;
int captured_len;
address dl_src; /* link-layer source address */