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

Added PPI PDU.

This commit is contained in:
Matias Fontanini
2013-09-05 00:49:11 -03:00
parent de0ec914cc
commit 7d4222fb17
8 changed files with 41 additions and 11 deletions

View File

@@ -71,7 +71,7 @@ PtrPacket BaseSniffer::next_packet() {
if(content) {
try {
if(iface_type == DLT_EN10MB) {
if(is_dot3((const uint8_t*)content, header.caplen))
if(Internals::is_dot3((const uint8_t*)content, header.caplen))
ret = new Dot3((const uint8_t*)content, header.caplen);
else
ret = new EthernetII((const uint8_t*)content, header.caplen);
@@ -84,6 +84,10 @@ PtrPacket BaseSniffer::next_packet() {
ret = new Tins::Loopback((const uint8_t*)content, header.caplen);
else if(iface_type == DLT_LINUX_SLL)
ret = new Tins::SLL((const uint8_t*)content, header.caplen);
else if(iface_type == DLT_PPI)
ret = new Tins::PPI((const uint8_t*)content, header.caplen);
else
throw unknown_link_type();
}
catch(malformed_packet&) {}
}