1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Add extensions for ICMPv6

This commit is contained in:
Matias Fontanini
2015-12-21 12:33:52 -08:00
parent 530cc56922
commit 6d90b0ce32
11 changed files with 779 additions and 474 deletions

View File

@@ -47,6 +47,7 @@
namespace Tins {
class IPv4Address;
class IPv6Address;
class ICMPExtensionsStructure;
namespace Internals {
template<size_t n>
@@ -124,6 +125,10 @@ PDU *pdu_from_flag(PDU::PDUType type, const uint8_t *buffer, uint32_t size);
Constants::Ethernet::e pdu_flag_to_ether_type(PDU::PDUType flag);
Constants::IP::e pdu_flag_to_ip_type(PDU::PDUType flag);
uint32_t get_padded_icmp_inner_pdu_size(const PDU* inner_pdu, uint32_t pad_alignment);
void try_parse_icmp_extensions(const uint8_t* buffer, uint32_t& total_sz,
uint32_t payload_length, ICMPExtensionsStructure& extensions);
template<typename T>
bool increment_buffer(T &addr) {
typename T::iterator it = addr.end() - 1;