diff options
Diffstat (limited to 'pcap-snf.c')
-rw-r--r-- | pcap-snf.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -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 |