1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-24 19:21:35 +01:00

Added Dot1Q class.

This commit is contained in:
Matias Fontanini
2013-03-17 23:27:34 -03:00
parent b5f9f5095e
commit f5ecaa3faa
9 changed files with 430 additions and 9 deletions

View File

@@ -33,6 +33,7 @@
#include "arp.h"
#include "eapol.h"
#include "rawpdu.h"
#include "dot1q.h"
using std::string;
@@ -73,6 +74,8 @@ Tins::PDU *pdu_from_flag(Constants::Ethernet::e flag, const uint8_t *buffer,
return new Tins::ARP(buffer, size);
case Tins::Constants::Ethernet::EAPOL:
return Tins::EAPOL::from_bytes(buffer, size);
case Tins::Constants::Ethernet::VLAN:
return new Tins::Dot1Q(buffer, size);
default:
return rawpdu_on_no_match ? new RawPDU(buffer, size) : 0;
};