]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-null.c
From Paolo Abeni and me: split pcap_open_live() into a "get a pcap_t
[libpcap] / pcap-null.c
index 7831632782fe694e8d9c92f5dcb73a54ce80d487..f72a0c3c4e09d0920a860d22fbd9aa0e1ca2b9b7 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 #ifndef lint
-static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.7.1.1 1999-10-07 23:46:40 mcr Exp $ (LBL)";
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.21.4.1 2008-04-04 19:39:06 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
 #endif
 
 #include <sys/param.h>                 /* optionally get BSD define */
 
 #include <string.h>
 
-#include "gnuc.h"
 #ifdef HAVE_OS_PROTO_H
 #include "os-proto.h"
 #endif
@@ -36,38 +39,15 @@ static const char rcsid[] =
 
 static char nosup[] = "live packet capture not supported on this system";
 
-int
-pcap_stats(pcap_t *p, struct pcap_stat *ps)
-{
-
-       (void)sprintf(p->errbuf, "pcap_stats: %s", nosup);
-       return (-1);
-}
-
-int
-pcap_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
-{
-
-       (void)sprintf(p->errbuf, "pcap_read: %s", nosup);
-       return (-1);
-}
-
 pcap_t *
-pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf)
+pcap_activate(pcap_t *p)
 {
-
-       (void)strcpy(ebuf, nosup);
+       (void)strlcpy(p->errbuf, nosup, PCAP_ERRBUF_SIZE);
        return (NULL);
 }
 
 int
-pcap_setfilter(pcap_t *p, struct bpf_program *fp)
+pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
 {
-
-       if (p->sf.rfile == NULL) {
-               (void)sprintf(p->errbuf, "pcap_setfilter: %s", nosup);
-               return (-1);
-       }
-       p->fcode = *fp;
        return (0);
 }