summaryrefslogtreecommitdiff
path: root/pcap-libdlpi.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-01-18 13:36:27 -0800
committerGuy Harris <guy@alum.mit.edu>2017-01-18 13:36:27 -0800
commit2a6286aa06b043240dd8c3524668455562d466d8 (patch)
tree062ee1df238c3e113a0451e60bb2b030867ffb17 /pcap-libdlpi.c
parent5fa9ce62e3235688ce3ed5928cbce7754ec6291c (diff)
downloadlibpcap-2a6286aa06b043240dd8c3524668455562d466d8.tar.gz
Have a pcap_if_list_t structure for use by the findalldevs code.
It's not part of the API, but it's an internal structure used by the findalldevs code. Currently, it just has a pointer to the beginning of the list, but it could change in order to speed up the process of adding to the list.
Diffstat (limited to 'pcap-libdlpi.c')
-rw-r--r--pcap-libdlpi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pcap-libdlpi.c b/pcap-libdlpi.c
index 933f2bdc..d004f62e 100644
--- a/pcap-libdlpi.c
+++ b/pcap-libdlpi.c
@@ -282,7 +282,7 @@ is_dlpi_interface(const char *name _U_)
* additional network links present in the system.
*/
int
-pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
+pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf)
{
int retv = 0;
@@ -293,7 +293,8 @@ pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
/*
* Get the list of regular interfaces first.
*/
- if (pcap_findalldevs_interfaces(alldevsp, errbuf, is_dlpi_interface) == -1)
+ if (pcap_findalldevs_interfaces(devlistp, errbuf,
+ is_dlpi_interface) == -1)
return (-1); /* failure */
/* dlpi_walk() for loopback will be added here. */
@@ -320,7 +321,8 @@ pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
* If it isn't already in the list of devices, try to
* add it.
*/
- if (find_or_add_dev(alldevsp, entry->linkname, 0, NULL, errbuf) == NULL)
+ if (find_or_add_dev(devlistp, entry->linkname, 0, NULL,
+ errbuf) == NULL)
retv = -1;
}
done: