aboutsummaryrefslogtreecommitdiff
path: root/contrib/libpcap/pcap.h
diff options
context:
space:
mode:
authorMax Laier <mlaier@FreeBSD.org>2007-10-16 02:07:55 +0000
committerMax Laier <mlaier@FreeBSD.org>2007-10-16 02:07:55 +0000
commit5357e0fedb25cf03a87aa46d098860ed16f77560 (patch)
tree03bad2e07204c8bfa6cd8122c786eb4c73a5cdc9 /contrib/libpcap/pcap.h
parent1f372e4dae87ec6ae259276c00d157bb634e8bc3 (diff)
downloadsrc-5357e0fedb25cf03a87aa46d098860ed16f77560.tar.gz
src-5357e0fedb25cf03a87aa46d098860ed16f77560.zip
Resolve merge conflicts
Approved by: re (kensmith) Obtained from: tcpdump.org
Notes
Notes: svn path=/head/; revision=172680
Diffstat (limited to 'contrib/libpcap/pcap.h')
-rw-r--r--contrib/libpcap/pcap.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/contrib/libpcap/pcap.h b/contrib/libpcap/pcap.h
index e91b9d5272f3..f6815aa6b0df 100644
--- a/contrib/libpcap/pcap.h
+++ b/contrib/libpcap/pcap.h
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* $FreeBSD$
- * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.52.2.5 2005/07/07 02:04:36 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.52.2.7 2007/06/11 09:52:05 guy Exp $ (LBL)
*/
#ifndef lib_pcap_h
@@ -41,7 +41,9 @@
#include <sys/types.h>
#include <sys/time.h>
-#include <net/bpf.h>
+#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
+#include <pcap-bpf.h>
+#endif
#include <stdio.h>
@@ -119,9 +121,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 */
@@ -222,12 +231,12 @@ int pcap_setnonblock(pcap_t *, int, char *);
void pcap_perror(pcap_t *, char *);
int pcap_inject(pcap_t *, const void *, size_t);
int pcap_sendpacket(pcap_t *, const u_char *, int);
-char *pcap_strerror(int);
+const char *pcap_strerror(int);
char *pcap_geterr(pcap_t *);
-int pcap_compile(pcap_t *, struct bpf_program *, char *, int,
+int pcap_compile(pcap_t *, struct bpf_program *, const char *, int,
bpf_u_int32);
int pcap_compile_nopcap(int, int, struct bpf_program *,
- char *, int, bpf_u_int32);
+ const char *, int, bpf_u_int32);
void pcap_freecode(struct bpf_program *);
int pcap_datalink(pcap_t *);
int pcap_list_datalinks(pcap_t *, int **);