summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/pcap-int.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-07-11 03:43:25 +0000
committersam <sam@FreeBSD.org>2005-07-11 03:43:25 +0000
commitb0948cc146b74585abbc8e1ddb07a0ed768ac090 (patch)
treeb1290283be00a899ee2c6555fc04d310d7b651d8 /contrib/libpcap/pcap-int.h
parent17d5b030de962032fa5ffb4b3f2b4b774145bb34 (diff)
downloadFreeBSD-src-b0948cc146b74585abbc8e1ddb07a0ed768ac090.zip
FreeBSD-src-b0948cc146b74585abbc8e1ddb07a0ed768ac090.tar.gz
resolve merge conflicts
Approved by: re (scottl)
Diffstat (limited to 'contrib/libpcap/pcap-int.h')
-rw-r--r--contrib/libpcap/pcap-int.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/contrib/libpcap/pcap-int.h b/contrib/libpcap/pcap-int.h
index 260062b..01fe105 100644
--- a/contrib/libpcap/pcap-int.h
+++ b/contrib/libpcap/pcap-int.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* $FreeBSD$
- * @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.68 2004/12/18 08:52:10 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.68.2.2 2005/05/03 18:54:36 guy Exp $ (LBL)
*/
#ifndef pcap_int_h
@@ -100,6 +100,14 @@ struct pcap_md {
#endif
};
+/*
+ * Ultrix, DEC OSF/1^H^H^H^H^H^H^H^H^HDigital UNIX^H^H^H^H^H^H^H^H^H^H^H^H
+ * Tru64 UNIX, and NetBSD pad to make everything line up on a nice boundary.
+ */
+#if defined(ultrix) || defined(__osf__) || (defined(__NetBSD__) && __NetBSD_Version__ > 106000000)
+#define PCAP_FDDIPAD 3
+#endif
+
struct pcap {
#ifdef WIN32
ADAPTER *adapter;
@@ -143,12 +151,16 @@ struct pcap {
*/
u_char *pkt;
+ /* We're accepting only packets in this direction/these directions. */
+ direction_t direction;
+
/*
* Methods.
*/
int (*read_op)(pcap_t *, int cnt, pcap_handler, u_char *);
int (*inject_op)(pcap_t *, const void *, size_t);
int (*setfilter_op)(pcap_t *, struct bpf_program *);
+ int (*setdirection_op)(pcap_t *, direction_t);
int (*set_datalink_op)(pcap_t *, int);
int (*getnonblock_op)(pcap_t *, char *);
int (*setnonblock_op)(pcap_t *, int, char *);
@@ -239,13 +251,11 @@ int yylex(void);
int pcap_offline_read(pcap_t *, int, pcap_handler, u_char *);
int pcap_read(pcap_t *, int cnt, pcap_handler, u_char *);
-
-/*
- * Ultrix, DEC OSF/1^H^H^H^H^H^H^H^H^HDigital UNIX^H^H^H^H^H^H^H^H^H^H^H^H
- * Tru64 UNIX, and NetBSD pad to make everything line up on a nice boundary.
- */
-#if defined(ultrix) || defined(__osf__) || defined(__NetBSD__)
-#define PCAP_FDDIPAD 3
+#ifndef HAVE_STRLCPY
+#define strlcpy(x, y, z) \
+ (strncpy((x), (y), (z)), \
+ ((z) <= 0 ? 0 : ((x)[(z) - 1] = '\0')), \
+ strlen((y)))
#endif
#include <stdarg.h>
OpenPOWER on IntegriCloud