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

1238 Commits

Author SHA1 Message Date
Matias Fontanini
92bda42ac1 Move sniffer callback traits into detail/type_traits.h 2017-06-05 20:44:03 -07:00
Matias Fontanini
730e69463c Include detail/type_traits.h rather than internals.h on pdu_option 2017-06-05 20:44:03 -07:00
Matias Fontanini
07f000f65a Move type traits into a separate file 2017-06-05 20:44:03 -07:00
Matias Fontanini
3e7d30e01c 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-06-05 20:44:03 -07:00
Matias Fontanini
22c72955f5 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-06-05 20:44:03 -07:00
Matias Fontanini
6f681f6519 Move smart_ptr definition into new file detail/smart_ptr.h 2017-06-05 20:44:03 -07:00
Matias Fontanini
c7273ddd30 Add PDU iterator class 2017-06-05 20:44:03 -07:00
Matias Fontanini
2c6ef2a5c0 Update license date to 2017 2017-06-05 20:44:03 -07:00
Matias Fontanini
4eb4dfe5fa Remove parent parameter from write_serialization
This is no longer needed as each PDU knows its parent PDU already
2017-06-05 20:44:03 -07:00
Matias Fontanini
8838ddf921 Add parent PDU member to PDU class
Now this is a bidirectional list of PDUs
2017-06-05 20:44:03 -07:00
Matias Fontanini
6b3875ae39 Bump version to 4.0
Next release will be a major one
2017-06-05 20:44:03 -07:00
Grégoire Péan
ab763f25a4 Add CMake options LIBTINS_BUILD_EXAMPLES/TESTS 2017-06-05 20:44:03 -07:00
Matias Fontanini
550eea98b1 Merge remote-tracking branch 'origin/master' into develop
Conflicts:
	CMakeLists.txt
2017-06-03 10:37:51 -07:00
Matias Fontanini
ecfed8db44 Add support for XChannel field on RadioTap 2017-06-03 09:17:29 -07:00
Matias Fontanini
fe6e575158 Add missing radiotap parsing fields 2017-06-03 08:55:08 -07:00
Matias Fontanini
d0b4383a0d Fix some big endian issues 2017-05-31 19:42:22 -07:00
Matias Fontanini
83e2c8dc47 Add support for DLT_RAW on BaseSniffer
Fixes #210
2017-05-30 21:17:55 -07:00
Matias Fontanini
57787649d7 Don't dereference vector if empty on RadioTapWriter 2017-05-30 19:45:20 -07:00
Matias Fontanini
c9e7237184 Add back RadioTap::TSTF 2017-05-29 20:50:45 -07:00
Matias Fontanini
52be4b0e8a Keep current flags as member in RadioTapParser 2017-05-29 20:48:05 -07:00
Matias Fontanini
e1571e19a8 Use RadioTapParser/Writer in RadioTap 2017-05-25 07:56:23 -07:00
Matias Fontanini
8c7bf7d779 Add RadioTapWriter class 2017-05-23 20:55:18 -07:00
Matias Fontanini
406e458c3a Add some useful member functions to RadioTapParser 2017-05-23 19:07:49 -07:00
Matias Fontanini
3f26974563 Allow constructing RadioTapParser from an empty buffer 2017-05-21 13:09:53 -07:00
Matias Fontanini
988f2382c4 Make RadioTapParser work using only the options buffer 2017-05-21 12:56:22 -07:00
Matias Fontanini
b983fe0bb3 Add RadioTapParser class 2017-05-21 10:06:13 -07:00
Matias Fontanini
5a3f3e43a6 Fix C++03 build issues on PDU option 2017-05-21 09:16:41 -07:00
Matias Fontanini
49d6e42324 Add overload of Sniffer ctor taking only the device 2017-05-20 13:43:16 -07:00
Matias Fontanini
d7a7877bfe Use the right checks to consider an interface up on Windows
Fixes #182

Thanks @gvanem!
2017-05-14 15:01:36 -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
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