summaryrefslogtreecommitdiffstats
path: root/lib/libpcap/pcap-int.h
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2005-11-18 11:05:38 +0000
committerdjm <djm@openbsd.org>2005-11-18 11:05:38 +0000
commita878b8190bd951d272b5ce5df54b7a46fd7a9b0d (patch)
tree1a081693f9083731b7ed15ed3eeb9429e2dd5f01 /lib/libpcap/pcap-int.h
parentremove stray .Ed; (diff)
downloadwireguard-openbsd-a878b8190bd951d272b5ce5df54b7a46fd7a9b0d.tar.xz
wireguard-openbsd-a878b8190bd951d272b5ce5df54b7a46fd7a9b0d.zip
pull in the good bits of libpcap-0.9.4's API without the cross-platform
cruft. help from deraadt@, mpf@, jmc@; ok mpf@a nb. this will break tcpdump unless it updated too
Diffstat (limited to 'lib/libpcap/pcap-int.h')
-rw-r--r--lib/libpcap/pcap-int.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/libpcap/pcap-int.h b/lib/libpcap/pcap-int.h
index c8d261c736b..f86d5e4b7a3 100644
--- a/lib/libpcap/pcap-int.h
+++ b/lib/libpcap/pcap-int.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcap-int.h,v 1.9 2001/10/02 18:04:35 deraadt Exp $ */
+/* $OpenBSD: pcap-int.h,v 1.10 2005/11/18 11:05:39 djm Exp $ */
/*
* Copyright (c) 1994, 1995, 1996
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /home/cvs/src/lib/libpcap/pcap-int.h,v 1.9 2001/10/02 18:04:35 deraadt Exp $ (LBL)
+ * @(#) $Header: /home/cvs/src/lib/libpcap/pcap-int.h,v 1.10 2005/11/18 11:05:39 djm Exp $ (LBL)
*/
#ifndef pcap_int_h
@@ -73,6 +73,7 @@ struct pcap {
int linktype;
int tzoff; /* timezone offset */
int offset; /* offset for proper alignment */
+ int break_loop; /* force break from packet-reading loop */
struct pcap_sf sf;
struct pcap_md md;
@@ -96,6 +97,12 @@ struct pcap {
*/
struct bpf_program fcode;
+ /*
+ * Datalink types supported on underlying fd
+ */
+ int dlt_count;
+ u_int *dlt_list;
+
char errbuf[PCAP_ERRBUF_SIZE];
};
@@ -115,6 +122,14 @@ int yylex(void);
#define min(a, b) ((a) > (b) ? (b) : (a))
#endif
+/* Not all systems have IFF_LOOPBACK */
+#ifdef IFF_LOOPBACK
+#define ISLOOPBACK(name, flags) ((flags) & IFF_LOOPBACK)
+#else
+#define ISLOOPBACK(name, flags) ((name)[0] == 'l' && (name)[1] == 'o' && \
+ (isdigit((unsigned char)((name)[2])) || (name)[2] == '\0'))
+#endif
+
/* XXX should these be in pcap.h? */
int pcap_offline_read(pcap_t *, int, pcap_handler, u_char *);
int pcap_read(pcap_t *, int cnt, pcap_handler, u_char *);