1
0
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:
Matias Fontanini
2012-11-21 22:09:58 -03:00
parent ffdfb160c4
commit 8276e7d086
16 changed files with 636 additions and 15 deletions

View File

@@ -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;