aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-01-18 00:25:50 +0000
committerGuy Harris <guy@alum.mit.edu>2002-01-18 00:25:50 +0000
commit6cdc5dfde2c5ab883ec36bb9b8eda01781cb68cd (patch)
treef15e5e678f1a10af17842a6caa4f445f9d2e9a31 /wiretap/wtap.h
parent3ee2d34a2338768bd0f781c1a0b81d88810d34d6 (diff)
In the EtherPeek file reader, keep the capture start time in a private
data structure attached to the "wtap" structure, rather than in a pseudo-header structure; get rid of the EtherPeek pseudo-header structure, as it's not actually used as a pseudo-header, it's just used as private data for the EtherPeek reader. Get rid of an extra level of indentation in switch statements. svn path=/trunk/; revision=4561
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r--wiretap/wtap.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index ccf5493923..eaa0fa2314 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -1,6 +1,6 @@
/* wtap.h
*
- * $Id: wtap.h,v 1.99 2001/12/04 22:28:19 guy Exp $
+ * $Id: wtap.h,v 1.100 2002/01/18 00:25:50 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -163,6 +163,22 @@
#include <glib.h>
#include <stdio.h>
+/*
+ * "Pseudo-headers" are used to supply to the clients of wiretap
+ * per-packet information that's not part of the packet payload
+ * proper.
+ *
+ * NOTE: do not use pseudo-header structures to hold information
+ * used by the code to read a particular capture file type; to
+ * keep that sort of state information, add a new structure for
+ * that private information to "wtap-int.h", add a pointer to that
+ * type of structure to the "capture" member of the "struct wtap"
+ * structure, and allocate one of those structures and set that member
+ * in the "open" routine for that capture file type if the open
+ * succeeds. See various other capture file type handlers for examples
+ * of that.
+ */
+
/* Packet "pseudo-header" information for X.25 capture files. */
struct x25_phdr {
guint8 flags; /* ENCAP_LAPB : 1st bit means From DCE */
@@ -199,11 +215,6 @@ struct ascend_phdr {
guint32 task; /* Task number */
};
-/* Packet "pseudo_header" for etherpeek capture files. */
-struct etherpeek_phdr {
- struct timeval reference_time;
-};
-
struct p2p_phdr {
gboolean sent; /* TRUE=sent, FALSE=received */
};
@@ -265,7 +276,6 @@ union wtap_pseudo_header {
struct x25_phdr x25;
struct ngsniffer_atm_phdr ngsniffer_atm;
struct ascend_phdr ascend;
- struct etherpeek_phdr etherpeek;
struct p2p_phdr p2p;
};