/* dlpi_walk() for loopback will be added here. */
+ /*
+ * Find all DLPI devices in the current zone.
+ *
+ * XXX - will pcap_findalldevs_interfaces() find any devices
+ * outside the current zone? If not, the only reason to call
+ * it would be to get the interface addresses.
+ */
dlpi_walk(list_interfaces, &lw, 0);
if (lw.lw_err != 0) {
/* Add linkname if it does not exist on the list. */
for (entry = lw.lw_list; entry != NULL; entry = entry->lnl_next) {
- if (pcap_add_if(alldevsp, entry->linkname, 0, NULL, errbuf) < 0)
+ /*
+ * 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)
retv = -1;
}
done: