1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-25 19:51:34 +01:00

Added SLL pseudo protocol header.

This commit is contained in:
Matias Fontanini
2013-01-16 00:05:28 -03:00
parent a13d7d0cb1
commit 02265061cc
16 changed files with 492 additions and 2023 deletions

View File

@@ -38,6 +38,7 @@
#include "arp.h"
#include "ip.h"
#include "eapol.h"
#include "internals.h"
Tins::SNAP::SNAP(PDU *child) : PDU(child)
@@ -55,7 +56,7 @@ Tins::SNAP::SNAP(const uint8_t *buffer, uint32_t total_sz)
buffer += sizeof(_snap);
total_sz -= sizeof(_snap);
if(total_sz) {
switch(eth_type()) {
/*switch(eth_type()) {
case Tins::Constants::Ethernet::IP:
inner_pdu(new Tins::IP(buffer, total_sz));
break;
@@ -65,7 +66,14 @@ Tins::SNAP::SNAP(const uint8_t *buffer, uint32_t total_sz)
case Tins::Constants::Ethernet::EAPOL:
inner_pdu(Tins::EAPOL::from_bytes(buffer, total_sz));
break;
};
};*/
inner_pdu(
Internals::pdu_from_flag(
(Constants::Ethernet::e)eth_type(),
buffer,
total_sz
)
);
}
}