]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-bpf.c
Add Myricom SNF API support as a new pcap device.
[libpcap] / pcap-bpf.c
index 02aeec4b46ad7d5c5ac5bdd8b9948ad30a6db1ca..310256df18f28929ca60ec7396de772f1bdef2b9 100644 (file)
@@ -126,6 +126,10 @@ static int bpf_load(char *errbuf);
 #include "pcap-dag.h"
 #endif /* HAVE_DAG_API */
 
+#ifdef HAVE_SNF_API
+#include "pcap-snf.h"
+#endif /* HAVE_SNF_API */
+
 #ifdef HAVE_OS_PROTO_H
 #include "os-proto.h"
 #endif
@@ -417,6 +421,10 @@ pcap_create(const char *device, char *ebuf)
        if (strstr(device, "dag"))
                return (dag_create(device, ebuf));
 #endif /* HAVE_DAG_API */
+#ifdef HAVE_SNF_API
+       if (strstr(device, "snf"))
+               return (snf_create(device, ebuf));
+#endif /* HAVE_SNF_API */
 
        p = pcap_create_common(device, ebuf);
        if (p == NULL)
@@ -2170,6 +2178,10 @@ pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
        if (dag_platform_finddevs(alldevsp, errbuf) < 0)
                return (-1);
 #endif /* HAVE_DAG_API */
+#ifdef HAVE_SNF_API
+       if (snf_platform_finddevs(alldevsp, errbuf) < 0)
+               return (-1);
+#endif /* HAVE_SNF_API */
 
        return (0);
 }