if (alldevsp == null) {
logger.info("No NIF was found.");
return Collections.<PcapNetworkInterface>emptyList();
}
pcap_if pcapIf = new pcap_if(alldevsp);
List<PcapNetworkInterface> ifList = new ArrayList<PcapNetworkInterface>();
for (pcap_if pif = pcapIf; pif != null; pif = pif.next) {
ifList.add(PcapNetworkInterface.newInstance(pif, true));
}
NativeMappings.pcap_freealldevs(pcapIf.getPointer());
logger.info("{} NIF(s) found.", ifList.size());
return ifList;
}