]> The Tcpdump Group git mirrors - libpcap/commitdiff
Have pcap_platform_finddevs() do all the "find local interfaces" work.
authorGuy Harris <[email protected]>
Sun, 26 Jun 2016 11:18:10 +0000 (04:18 -0700)
committerGuy Harris <[email protected]>
Sun, 26 Jun 2016 11:18:10 +0000 (04:18 -0700)
Rename pcap_findalldevs_interfaces() to pcap_platform_finddevs(), now
that pcap_findalldevs() calls pcap_platform_finddevs() to find *all*
the local interfaces.

pcap-dos.c
pcap-int.h

index 08a16d134266aecc163efb6758cb2e48d959a470..19f69e5da6140193baf428626f19c157852d6c6a 100644 (file)
@@ -542,7 +542,7 @@ int pcap_lookupnet (const char *device, bpf_u_int32 *localnet,
  * The list, as returned through "alldevsp", may be NULL if no interfaces
  * were up and could be opened.
  */
-int pcap_findalldevs_interfaces (pcap_if_t **alldevsp, char *errbuf)
+int pcap_platform_finddevs  (pcap_if_t **alldevsp, char *errbuf)
 {
   struct device     *dev;
   struct sockaddr_in sa_ll_1, sa_ll_2;
@@ -603,18 +603,6 @@ int pcap_findalldevs_interfaces (pcap_if_t **alldevsp, char *errbuf)
   return (ret);
 }
 
-/*
- * platform-dependent routine to add devices or interfaces.
- * We don't have any, so just return 0.
- */
-int pcap_platform_finddevs  (pcap_if_t **alldevsp, char *errbuf)
-{
-  /*
-   * We just return the regular interfaces.
-   */
-  return (pcap_findalldevs_interfaces(alldevsp, errbuf));
-}
-
 /*
  * pcap_assert() is mainly used for debugging
  */
index dad6746362aea2f0f93acfcaf8729306df55a290..5adf25f787903906183c49675ea41d857566656a 100644 (file)
@@ -467,7 +467,7 @@ int pcap_check_activated(pcap_t *);
  * use by various "find interfaces" routines.
  */
 int    pcap_platform_finddevs(pcap_if_t **, char *);
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(MSDOS)
 int    pcap_findalldevs_interfaces(pcap_if_t **, char *);
 #endif
 int    add_addr_to_iflist(pcap_if_t **, const char *, bpf_u_int32,