/*
* Now open up all the specified interfaces
*/
final StringBuilder errbuf = new StringBuilder();
for (int i = 0; i < captureDevice.length; i++) {
LiveCaptureDevice device = captureDevice[i];
pcaps[i] =
Pcap.openLive(device.getName(), snaplen, (promiscuous ? 1 : 0),
DEFAULT_BREAK_LOOP_CHECK, errbuf);
if (pcaps[i] == null) {
throw new IOException("Unable to open capture device "
+ device.getName() + ". Error: " + errbuf.toString());
}
}
this.factory =
ProtocolRegistry.getPacketFactory(LivePacketFactory.class,