mirror of
https://github.com/mfontanini/libtins
synced 2026-01-25 19:51:34 +01:00
Added IPv6 class. It's working, but there's no support for extension headers yet.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "packet_sender.h"
|
||||
#include "rawpdu.h"
|
||||
#include "ip.h"
|
||||
#include "ipv6.h"
|
||||
#include "arp.h"
|
||||
#include "constants.h"
|
||||
|
||||
@@ -72,6 +73,9 @@ EthernetII::EthernetII(const uint8_t *buffer, uint32_t total_sz)
|
||||
case Constants::Ethernet::IP:
|
||||
next = new Tins::IP(buffer, total_sz);
|
||||
break;
|
||||
case Constants::Ethernet::IPV6:
|
||||
next = new Tins::IPv6(buffer, total_sz);
|
||||
break;
|
||||
case Constants::Ethernet::ARP:
|
||||
next = new Tins::ARP(buffer, total_sz);
|
||||
break;
|
||||
@@ -143,6 +147,9 @@ void EthernetII::write_serialization(uint8_t *buffer, uint32_t total_sz, const P
|
||||
case PDU::IP:
|
||||
type = Constants::Ethernet::IP;
|
||||
break;
|
||||
case PDU::IPv6:
|
||||
type = Constants::Ethernet::IPV6;
|
||||
break;
|
||||
case PDU::ARP:
|
||||
type = Constants::Ethernet::ARP;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user