]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap.h
Clean up some comments, and give more details so people understand what
[libpcap] / pcap.h
diff --git a/pcap.h b/pcap.h
index 9a5aafa41238c09125b5c02aa117eab42ccc71e0..59589edbaee14c93dddff91f629f5f33e93caaf5 100644 (file)
--- a/pcap.h
+++ b/pcap.h
@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.57 2005-07-07 01:57:03 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.58 2006-02-09 22:26:12 guy Exp $ (LBL)
  */
 
 #ifndef lib_pcap_h
@@ -127,9 +127,16 @@ typedef enum {
 } pcap_direction_t;
 
 /*
- * Each packet in the dump file is prepended with this generic header.
- * This gets around the problem of different headers for different
- * packet interfaces.
+ * Generic per-packet information, as supplied by libpcap.
+ *
+ * The time stamp can and should be a "struct timeval", regardless of
+ * whether your system supports 32-bit tv_sec in "struct timeval",
+ * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit
+ * and 64-bit applications.  The on-disk format of savefiles uses 32-bit
+ * tv_sec (and tv_usec); this structure is irrelevant to that.  32-bit
+ * and 64-bit versions of libpcap, even if they're on the same platform,
+ * should supply the appropriate version of "struct timeval", even if
+ * that's not what the underlying packet capture mechanism supplies.
  */
 struct pcap_pkthdr {
        struct timeval ts;      /* time stamp */