summaryrefslogtreecommitdiff
path: root/lib/libpcap/pcap-int.h
diff options
context:
space:
mode:
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 a3997831619..e5d2e204b33 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: /cvs/OpenBSD/src/lib/libpcap/pcap-int.h,v 1.9 2001/10/02 18:04:35 deraadt Exp $ (LBL)
+ * @(#) $Header: /cvs/OpenBSD/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 *);