summaryrefslogtreecommitdiff
path: root/pcap-null.c
diff options
context:
space:
mode:
authorCheoleun Moon <chleun.moon@samsung.com>2019-10-17 19:20:32 +0900
committerCheoleun Moon <chleun.moon@samsung.com>2019-10-17 19:22:32 +0900
commit5ba315c303f1b918aecaf290de2428eb0a1116ba (patch)
tree3e7f0fbfafdf260490332e028fb07a8a903b4081 /pcap-null.c
parenta2db57476cfba84fc739ff1c5d907f03c7058257 (diff)
downloadlibpcap-upstream.tar.gz
libpcap-upstream.tar.bz2
libpcap-upstream.zip
Imported Upstream version 1.9.1upstream/1.9.1upstream
Change-Id: I8ccc371679c730299ebe8068ed5af0ae033c4f7d Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
Diffstat (limited to 'pcap-null.c')
-rw-r--r--pcap-null.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/pcap-null.c b/pcap-null.c
index 934fb2c..2ae27bf 100644
--- a/pcap-null.c
+++ b/pcap-null.c
@@ -20,30 +20,46 @@
*/
#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";
pcap_t *
-pcap_create_interface(const char *device, char *ebuf)
+pcap_create_interface(const char *device _U_, char *ebuf)
{
- (void)strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE);
+ (void)pcap_strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE);
return (NULL);
}
int
-pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_platform_finddevs(pcap_if_list_t *devlistp _U_, char *errbuf _U_)
{
+ /*
+ * There are no interfaces on which we can capture.
+ */
return (0);
}
+
+#ifdef _WIN32
+int
+pcap_lookupnet(const char *device _U_, bpf_u_int32 *netp _U_,
+ bpf_u_int32 *maskp _U_, char *errbuf)
+{
+ (void)pcap_strlcpy(errbuf, nosup, PCAP_ERRBUF_SIZE);
+ return (-1);
+}
+#endif
+
+/*
+ * Libpcap version string.
+ */
+const char *
+pcap_lib_version(void)
+{
+ return (PCAP_VERSION_STRING);
+}