]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-null.c
pcap_create_interface() needs the interface name on Linux.
[libpcap] / pcap-null.c
index 013185a2c51c6b20da6c7791af2b36a1805bd177..b5fa3ab91fabfc576a22796e402ab9728ecd6d8b 100644 (file)
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
-#ifndef lint
-static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.19 2003-07-25 05:07:02 guy Exp $ (LBL)";
-#endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -39,16 +35,8 @@ static const char rcsid[] =
 
 static char nosup[] = "live packet capture not supported on this system";
 
-int
-pcap_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
-{
-       (void)snprintf(p->errbuf, sizeof(p->errbuf), "pcap_read: %s", nosup);
-       return (-1);
-}
-
 pcap_t *
-pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
-    char *ebuf)
+pcap_create_interface(const char *device _U_, char *ebuf)
 {
        (void)strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE);
        return (NULL);
@@ -57,5 +45,9 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
 int
 pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
 {
+       /*
+        * There are no interfaces on which we can capture.
+        */
+       *alldevsp = NULL;
        return (0);
 }