* @throws PcapNativeException
*/
public static
List<PcapNetworkInterface> findAllDevs() throws PcapNativeException {
PointerByReference alldevsPP = new PointerByReference();
PcapErrbuf errbuf = new PcapErrbuf();
int rc = NativeMappings.pcap_findalldevs(alldevsPP, errbuf);
if (rc != 0) {
StringBuilder sb = new StringBuilder(50);
sb.append("Return code: ")
.append(rc)
.append(", Message: ")
.append(errbuf);
throw new PcapNativeException(sb.toString(), rc);
}
if (errbuf.length() != 0) {
logger.warn("{}", errbuf);
}
Pointer alldevsp = alldevsPP.getValue();
if (alldevsp == null) {