aboutsummaryrefslogtreecommitdiff
path: root/pcap-null.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2018-05-18 12:21:19 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2018-05-18 12:21:19 +0000
commitd109bf9e4b609b5a0626b433e56db4a47dc530bb (patch)
tree48bc2a4852c42b213448a7e9d93f2e5eb6348ea0 /pcap-null.c
parent2369c04eb959fda4140b71f1c78798251bf43b62 (diff)
downloadsrc-d109bf9e4b609b5a0626b433e56db4a47dc530bb.tar.gz
src-d109bf9e4b609b5a0626b433e56db4a47dc530bb.zip
Import vendor revision 77da77c36e5d958f9b8d6729876a33f670de031f from:
https://github.com/the-tcpdump-group/libpcap.git This among other minor fixes adds support for sniffing RDMA devices. Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/vendor/libpcap/dist/; revision=333789
Diffstat (limited to 'pcap-null.c')
-rw-r--r--pcap-null.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/pcap-null.c b/pcap-null.c
index b5fa3ab91fab..92a5e2d8649b 100644
--- a/pcap-null.c
+++ b/pcap-null.c
@@ -20,17 +20,11 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
-#include <sys/param.h> /* optionally get BSD define */
-
#include <string.h>
-#ifdef HAVE_OS_PROTO_H
-#include "os-proto.h"
-#endif
-
#include "pcap-int.h"
static char nosup[] = "live packet capture not supported on this system";
@@ -43,11 +37,29 @@ pcap_create_interface(const char *device _U_, char *ebuf)
}
int
-pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf)
{
/*
* There are no interfaces on which we can capture.
*/
- *alldevsp = NULL;
return (0);
}
+
+#ifdef _WIN32
+int
+pcap_lookupnet(const char *device _U_, bpf_u_int32 *netp _U_,
+ bpf_u_int32 *maskp _U_, char *errbuf)
+{
+ (void)strlcpy(errbuf, nosup, PCAP_ERRBUF_SIZE);
+ return (-1);
+}
+#endif
+
+/*
+ * Libpcap version string.
+ */
+const char *
+pcap_lib_version(void)
+{
+ return (PCAP_VERSION_STRING);
+}