Kasper Laudrup
fa79582b89
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.
2018-03-28 21:05:01 -07:00
Matias Fontanini
544aa1b339
Don't assume IPv6 uses ICMPv6 underneath
2018-03-18 12:56:12 -07:00
Matias Fontanini
f29566d6d9
Implement IPv6::recv_response
2018-02-25 10:42:16 -08:00
Matias Fontanini
8f85a6e557
Append padding to IPv6 options
...
Relates to #270
2017-12-12 10:33:17 -03:00
Matias Fontanini
a6817528bc
Use absolute include paths
...
Fixes #250
2017-09-21 20:48:57 -07:00
Matias Fontanini
d8ead95070
Rename IPv6::add_ext_header to IPv6::add_header (deprecate former)
2017-05-14 10:33:04 -07:00
Matias Fontanini
5404e9f004
Fix next header handling on IPv6
...
This was broken by design. Each header held the next header's
type, which made iterating through them very tricky (you'd have
to look at the previous header's next header value to know the
current one while doing so).
Now each header contains its own value and the next header
value is computed during serialization and then reverted back
after that.
2017-05-14 10:25:59 -07:00
Matias Fontanini
f0aaec98f3
Calculate IPv6 headers size on demand
2017-05-14 09:04:58 -07:00
Matias Fontanini
60b5f3e6e4
Remove inclusion of algorithm almost everywhere
2017-04-30 18:51:55 -07:00
Matias Fontanini
19ae1f366b
Remove useless includes
2017-04-30 17:34:02 -07:00
Matias Fontanini
a20f9d3e81
Move internals' PDU helpers into their own files
2017-04-30 13:49:50 -07:00
Matias Fontanini
c06787ca22
Update license date to 2017
2017-04-29 09:56:26 -07:00
Matias Fontanini
15a353c123
Remove parent parameter from write_serialization
...
This is no longer needed as each PDU knows its parent PDU already
2017-04-29 09:53:33 -07:00
Matias Fontanini
7607610cf9
Merge branch 'develop'
2017-01-31 21:37:41 -08:00
Kyle Fazzari
a71a3d29ff
Fix -Wextra compiler warnings. ( #184 )
...
* Fix -Wextra compiler warnings.
Fix #183 .
Signed-off-by: Kyle Fazzari <github@status.e4ward.com >
* Comment out unused parameters.
This is done everywhere possible instead of using Internals::unused().
Note that this involved moving some implementations into the
corresponding .cpp file.
Signed-off-by: Kyle Fazzari <github@status.e4ward.com >
* Fix warnings in tests as well.
Signed-off-by: Kyle Fazzari <github@status.e4ward.com >
* Leave IPv4Reassembler alone, it's growing.
Signed-off-by: Kyle Fazzari <github@status.e4ward.com >
2017-01-25 13:26:11 -08:00
Ed Catmur
9051197603
Use actual payload length to construct inner PDU. ( #179 )
...
Fixes #178
2017-01-16 09:36:33 -08:00
Matias Fontanini
2847039ffe
Set last next protocol to 0 if no inner_pdu on IPv6
2016-09-29 07:37:46 -07:00
Matias Fontanini
bf70a94921
Build layer 5 as RawPDU if IPv6 has fragment header
2016-02-22 20:37:48 -08:00
Matias Fontanini
17da10d76e
Add extract_metadata to main PDU classes
2016-02-20 22:19:12 -08:00
Matias Fontanini
fb4e5086fd
Update copyright notice
2016-01-31 20:03:49 -08:00
Matias Fontanini
d84f10cf08
Code cleanup and use same syntax on the entire project
...
Initial code cleanup
More code cleanup
Cleanup more code
Cleanup Dot11 code
Fix OSX build issue
Cleanup examples
Fix ref and pointer declaration syntax
Fix braces
2016-01-09 10:01:58 -08:00
Matias Fontanini
2c16aaaecd
Fix IPv6 extension headers parsing/serialization
2016-01-01 14:39:09 -08:00
Matias Fontanini
38239be472
Remove unused cassert header inclusions
2015-12-27 04:38:31 -08:00
Matias Fontanini
02e2b278de
Add OutputMemoryStream and port most classes to use it
2015-12-26 06:30:00 -08:00
Matias Fontanini
9750f46c6d
Port all PDUs to use InputMemoryStream on constructors from buffer
2015-12-25 06:30:27 -08:00
Matias Fontanini
c42cd0114f
Fix compilation warnings on Windows x64.
2015-05-17 17:30:54 -07:00
Matias Fontanini
a607ab380c
Replace WIN32 macro with _WIN32.
2015-05-02 16:25:59 -07:00
Matias Fontanini
2dff95700f
Updated copyright notice.
2014-07-13 11:04:29 -03:00
Matias Fontanini
93ab8d3b91
Removed useless include directives from ip.cpp and ipv6.cpp.
2013-11-04 23:31:46 -03:00
Matias Fontanini
5345b29f8c
Added support for IPSec.
2013-11-04 23:05:00 -03:00
Matias Fontanini
6d329424f1
Created an overload of Internals::pdu_from_flag for transport layer PDUs.
2013-11-04 13:46:25 -03:00
Matias Fontanini
5f2c923c48
Added PDUAllocator class, which makes extending PDUs easier.
2013-08-29 23:31:10 -03:00
Matias Fontanini
5064a9255b
Fixed BSD notice. Updated AUTHORS file.
2013-04-23 20:33:00 -03:00
Matias Fontanini
66ff604580
assert() is only called when TINS_DEBUG is defined.
2013-04-22 18:45:56 -03:00
Matias Fontanini
d1b64ec48e
PDU::matches_response is now const.
2013-04-21 20:03:47 -03:00
Matias Fontanini
97f049580b
Link layer PDUs no longer contain a NetworkInterface.
2013-04-21 18:50:08 -03:00
Matias Fontanini
3fd1b3d37d
Added malformed_packet exception. Every class except Dot11* use it.
2013-04-18 00:12:20 -03:00
Matias Fontanini
ae1e1c2ce2
Modified some protocols' internal type names.
2013-04-09 15:40:58 -03:00
Matias Fontanini
20054e6c73
Several classes now use PDUOption::length_field instead of data_size.
2013-04-08 11:58:12 -03:00
Matias Fontanini
f2a5f73337
Implemented matches_response on several PDUs. Added some test cases.
2013-04-02 21:05:53 -03:00
Matias Fontanini
f5ecaa3faa
Added Dot1Q class.
2013-03-17 23:27:34 -03:00
Matias Fontanini
7a86012292
IPv6::send now works on linux. BSD does not support sending IPv6 as the lowest layer.
2012-12-10 20:31:32 -03:00
Matias Fontanini
6d1e96866e
libtins now compiles on windows. A couple of features were disabled and need to be fixed though.
2012-12-02 00:45:10 -03:00
Matias Fontanini
dd9c0b3fd5
Fixed bugs in IPv6 and ICMPv6 when constructing an object from a buffer.
2012-12-01 13:43:19 -03:00
Matias Fontanini
e6e3e8453b
Fixed some bugs in ICMPv6.
2012-11-26 19:47:15 -03:00
Matias Fontanini
443803caf0
Added ICMPv6 class. It's working. Option getters/setters are missing.
2012-11-24 18:50:21 -03:00
Matias Fontanini
a938d2ecfd
Added support for IPv6 extension headers. Specific headers getters and setters are not yet implemented.
2012-11-22 17:18:59 -03:00
Matias Fontanini
8276e7d086
Added IPv6 class. It's working, but there's no support for extension headers yet.
2012-11-21 22:09:58 -03:00