summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/pcap-dlpi.c
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2007-10-16 02:02:02 +0000
committermlaier <mlaier@FreeBSD.org>2007-10-16 02:02:02 +0000
commit446242760ec28d8a7634115ac07f647f057e2ed5 (patch)
treed0ef5ecf5675a568c261ed2198083e6dc6d51e94 /contrib/libpcap/pcap-dlpi.c
parentffd4bfbe7bca827ff32b489ba212a49c38c3f224 (diff)
downloadFreeBSD-src-446242760ec28d8a7634115ac07f647f057e2ed5.zip
FreeBSD-src-446242760ec28d8a7634115ac07f647f057e2ed5.tar.gz
Import of libpcap v0.9.8
Diffstat (limited to 'contrib/libpcap/pcap-dlpi.c')
-rw-r--r--contrib/libpcap/pcap-dlpi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/libpcap/pcap-dlpi.c b/contrib/libpcap/pcap-dlpi.c
index ee70b88..8ea7850 100644
--- a/contrib/libpcap/pcap-dlpi.c
+++ b/contrib/libpcap/pcap-dlpi.c
@@ -70,7 +70,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.108.2.6 2005/08/13 23:15:58 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.108.2.7 2006/04/04 05:33:02 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -396,6 +396,14 @@ pcap_inject_dlpi(pcap_t *p, const void *buf, size_t size)
pcap_strerror(errno));
return (-1);
}
+ /*
+ * putmsg() returns either 0 or -1; it doesn't indicate how
+ * many bytes were written (presumably they were all written
+ * or none of them were written). OpenBSD's pcap_inject()
+ * returns the number of bytes written, so, for API compatibility,
+ * we return the number of bytes we were told to write.
+ */
+ ret = size;
#else /* no raw mode */
/*
* XXX - this is a pain, because you might have to extract
OpenPOWER on IntegriCloud