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

Add parsing of well known IPv6 extension headers (#287)

* Add parsing of well known IPv6 extension headers

Add classes for IPv6 extension headers defined in the IPv6 protocol
specification (RFC 2460) as well as functions for creating them from
the IPv6 class' ext_header type.

The currently known extension headers are Hop-By-Hop Option,
Destination Routing, Routing and Fragment.

* Cleanup after PR #287 comments

Pull in stuff from the std namespace with "using" instead of
qualifying with std::.

Keep starting braces on the same line.

Avoid potential copy when appending to vector.
This commit is contained in:
Kasper Laudrup
2018-03-29 06:05:01 +02:00
committed by Matias Fontanini
parent 342e2c77a7
commit fa79582b89
4 changed files with 180 additions and 0 deletions

View File

@@ -204,6 +204,15 @@ public:
option_payload_too_large() : exception_base("Option payload too large") { }
};
/**
* \brief Exception thrown when an IPv6 extension header is being
* created from invalid data
*/
class invalid_ipv6_extension_header : public exception_base {
public:
invalid_ipv6_extension_header() : exception_base("Invalid IPv6 extension header") { }
};
/**
* \brief Generic pcap error
*/