1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 04:11:35 +01:00

Removed the useless PDU::flag member. Added a PDU concatenation operator.

This commit is contained in:
Matias Fontanini
2012-10-07 18:51:06 -03:00
parent da60d99f98
commit 153bcecc35
24 changed files with 169 additions and 89 deletions

View File

@@ -40,7 +40,7 @@ const EthernetII::address_type EthernetII::BROADCAST("ff:ff:ff:ff:ff:ff");
EthernetII::EthernetII(const NetworkInterface& iface,
const address_type &dst_hw_addr, const address_type &src_hw_addr,
PDU* child)
: PDU(ETHERTYPE_IP, child)
: PDU(child)
{
memset(&_eth, 0, sizeof(ethhdr));
dst_addr(dst_hw_addr);
@@ -51,7 +51,6 @@ EthernetII::EthernetII(const NetworkInterface& iface,
}
EthernetII::EthernetII(const uint8_t *buffer, uint32_t total_sz)
: PDU(ETHERTYPE_IP)
{
if(total_sz < sizeof(ethhdr))
throw std::runtime_error("Not enough size for an ethernetII header in the buffer.");