summaryrefslogtreecommitdiff
path: root/pcap-snf.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcap-snf.c')
-rw-r--r--pcap-snf.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/pcap-snf.c b/pcap-snf.c
index a72fdd88..207c4959 100644
--- a/pcap-snf.c
+++ b/pcap-snf.c
@@ -490,3 +490,31 @@ snf_create(const char *device, char *ebuf, int *is_ours)
ps->snf_boardnum = boardnum;
return p;
}
+
+#ifdef SNF_ONLY
+/*
+ * This libpcap build supports only SNF cards, not regular network
+ * interfaces..
+ */
+
+/*
+ * There are no regular interfaces, just DAG interfaces.
+ */
+int
+pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
+{
+ *alldevsp = NULL;
+ return (0);
+}
+
+/*
+ * Attempts to open a regular interface fail.
+ */
+pcap_t *
+pcap_create_interface(const char *device, char *errbuf)
+{
+ pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE,
+ "This version of libpcap only supports SNF cards");
+ return NULL;
+}
+#endif