1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 13:04:28 +01:00

BaseSniffer::next_packet now loops until either a valid packet is found or pcap_next fails.

This commit is contained in:
Matias Fontanini
2013-07-24 22:27:53 -03:00
parent 3b349471ea
commit fb8fb92ee6
2 changed files with 21 additions and 19 deletions

View File

@@ -302,7 +302,6 @@ namespace Tins {
LoopData<Functor> *data = reinterpret_cast<LoopData<Functor>*>(args);
PCapLoopBreaker _(ret_val, data->handle);
try {
Internals::smart_ptr<PDU>::type pdu;
if(data->iface_type == DLT_EN10MB) {
ret_val = is_dot3((const uint8_t*)packet, header->caplen) ?
call_functor<Tins::Dot3>(data, packet, header) :