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
348371e43c
Improve DNS class performance slightly
2017-05-13 19:44:57 -07:00
Matias Fontanini
4763486523
Fix build issue on VS
2017-05-13 17:48:22 -07:00
Matias Fontanini
7250c7a03d
Performance improvements
...
* Remove option size memers on IP/TCP and instead calculate
these when they're needed
* Reorder members on IP/TCP so as to remove/decrease padding
* Move most memory helpers impl into header file so they
can be inlined
* Make PDUOption's move ctor/assignment operator noexcept
2017-05-13 16:21:18 -07:00
Matias Fontanini
cedd127e8f
Use vector instead of lists everywhere
2017-05-13 11:14:11 -07:00
Matias Fontanini
fcad90b5e9
Use TINS_DEPRECATED on old Sniffer constructors
2017-05-13 11:04:05 -07:00
Matias Fontanini
64778f5412
Use custom exceptions everywhere
2017-05-13 10:59:15 -07:00
Matias Fontanini
a5766a19c2
Remove useless includes
2017-05-13 10:43:29 -07:00
Matias Fontanini
c6f4e816aa
Split pdu_option.h into a source file as well
2017-05-13 10:22:24 -07:00
Matias Fontanini
ce6ef3186b
Only call memcpy in PDUOption if size > 0
2017-05-10 19:13:55 -07:00
Matias Fontanini
6a66008153
Don't dereference iterator in memory helpers if size == 0
2017-05-10 18:44:55 -07:00
Matias Fontanini
6c6b345ba0
Use TINS_IS_CXX11 macro properly
2017-05-09 08:09:41 -07:00
Matias Fontanini
734b874dab
Include iterator in network_interface
2017-05-08 22:23:45 -07:00
Matias Fontanini
6d573d8327
Fix undefined std::min use in PPPoE
2017-05-08 22:22:48 -07:00
Matias Fontanini
11eca1816a
Try to make VC happy with std::hash definition
2017-05-08 22:14:39 -07:00
Matias Fontanini
b0d66a01d2
Fix more build issues on appveyor
2017-05-08 21:51:27 -07:00
Matias Fontanini
bd0db1354e
Fix build issue on appveyor
2017-05-07 13:33:52 -07:00
Matias Fontanini
01475679d1
Add missing stdexcept include in routing_utils.cpp
2017-04-30 20:09:47 -07:00
Matias Fontanini
b2173ffb86
Fix missing include for sstream on packet_sender.cpp
2017-04-30 20:01:30 -07:00
Matias Fontanini
3f2f6438fd
Fix build issues due to std::hash missing
2017-04-30 19:55:23 -07:00
Matias Fontanini
60b5f3e6e4
Remove inclusion of algorithm almost everywhere
2017-04-30 18:51:55 -07:00
Matias Fontanini
82e97addb1
Move memory helpers implementation into a source file
2017-04-30 18:15:50 -07:00
Matias Fontanini
19ae1f366b
Remove useless includes
2017-04-30 17:34:02 -07:00
Matias Fontanini
a9747a349a
Move seq_compare into its own header file
2017-04-30 16:52:59 -07:00
Matias Fontanini
fe38bba477
Move is_dot3 into details/pdu_helpers.h
2017-04-30 16:46:28 -07:00
Matias Fontanini
a20f9d3e81
Move internals' PDU helpers into their own files
2017-04-30 13:49:50 -07:00
Matias Fontanini
39e9f0542d
Move PDU utils into their own file
2017-04-30 13:29:33 -07:00
Matias Fontanini
1c2c5d7dd4
Move resolution utils into their own file
2017-04-30 13:21:13 -07:00
Matias Fontanini
1c2ac61bb0
Move Utils::gateway_from_ip into routing utils files
2017-04-30 13:12:39 -07:00
Matias Fontanini
f764f68e9c
Move routing related functions into their own header file
2017-04-30 12:32:16 -07:00
Matias Fontanini
2453e57436
Use checksum utils on crypto and icmp extension source files
2017-04-30 12:07:06 -07:00
Matias Fontanini
500ef1088b
Move frequency (channel) utils into their own file
2017-04-30 12:06:42 -07:00
Matias Fontanini
c83cff36d8
Remove useless includes for utils.h on tests
2017-04-30 11:59:10 -07:00
Matias Fontanini
589adba798
Move checksum utils into their own file
2017-04-30 11:59:02 -07:00
Matias Fontanini
6e1d1d3dc4
Move ICMP extension helpers into their own file
2017-04-30 10:53:21 -07:00
Matias Fontanini
ec59194232
Remove useless stdexcept includes
2017-04-30 10:31:11 -07:00
Matias Fontanini
7de4474996
Add relative includes on detail headers
2017-04-30 10:30:55 -07:00
Matias Fontanini
95626a867e
Move helpers for address types in internals.h to their own header
2017-04-30 10:21:26 -07:00
Matias Fontanini
c072ffe421
Move functions to parse /proc/net/routes into utils.cpp
2017-04-30 10:13:58 -07:00
Matias Fontanini
ac797a836e
Move internal crypto stuff from the header into the source file
2017-04-30 10:11:04 -07:00
Matias Fontanini
0cda2287a8
Move Internals::byte_array into crypto.cpp
2017-04-30 09:53:11 -07:00
Matias Fontanini
6bfc0c84f0
Move sniffer callback traits into detail/type_traits.h
2017-04-30 09:45:06 -07:00
Matias Fontanini
1bd0cd504e
Include detail/type_traits.h rather than internals.h on pdu_option
2017-04-30 09:40:40 -07:00
Matias Fontanini
a3e863942b
Move type traits into a separate file
2017-04-30 09:36:50 -07:00
Matias Fontanini
f88cf9b025
Don't include heavy STL headers like <algorithm> in header files
...
This provides a considerable compilation time reduction and most
of these were just using std::copy/fill which can be replaced by
memcpy/memset, as all of their uses were applied to POD types
2017-04-30 09:28:00 -07:00
Matias Fontanini
1ad245238f
Remove Storage template parameter from HWAddress, move impl to cpp
...
This is a breaking ABI change. This might break some forward
declarations and hopefully no one was actually using the
Storage type for anything.
2017-04-30 09:25:57 -07:00
Matias Fontanini
4c54a69e64
Move smart_ptr definition into new file detail/smart_ptr.h
2017-04-30 09:25:03 -07:00
Matias Fontanini
77a31ca6b5
Add PDU iterator class
2017-04-29 11:23:15 -07:00