1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-22 18:25:57 +01:00

1306 Commits

Author SHA1 Message Date
fflexo
eb7628eca4 add support for libpcap's DLT_RAW link type 2018-09-08 15:11:06 +01:00
Ulf Wetzker
c26e4943c2 Added base class access specifier for socket_close_error (#306) 2018-08-02 09:17:07 -07:00
Christopher Tran
7e90c8be6a add comprehensive list of Element IDs per 802.11-2016 9.4.2/T9-77 2018-07-26 13:29:23 -04:00
Stefan Schmidt
3659d89c25 Rewrote hw_address_to_string to not require a stringstream (#299) 2018-05-31 13:28:06 -07:00
Matias Fontanini
db992d42e5 Set TINS_HAVE_DOT11 as predefined in Doxyfile
Fixes #294
2018-05-18 20:41:40 -07:00
Matias Fontanini
5571a270d4 Make RadioTapParser::skip_to_field check for end of buffer (#296)
Fixes #295
2018-05-16 12:30:16 -07:00
Matias Fontanini
b18c2cefec Remove note regarding develop branch
This was useful at some point but now it's more of a burden to keep up to date. PRs should use `master` as base directly.
2018-05-09 20:33:40 -07:00
Jim Hague
3f204321ce Ensure local include directory comes before system. (#293)
If building (say) libtins 4.0 on a system with 3.4 installed, you need
the libtins include files to come from the repository include, not the
system include directory. The OpenSSL and PCAP includes may be from
the system include, so we need to ensure the libtins include is the
first on the list - which means the last on the before list.
2018-05-09 20:30:58 -07:00
Matias Fontanini
63603b8ac8 Calculate IP option sizes properly
Fixes #288
2018-04-08 08:12:52 -07:00
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
stubbfel
342e2c77a7 Add missing operators to address classes (#275)
* * add or-operator and a simlple unit test for hw_address, ip_address, ipv6_address
* add not-operator and a simlple unit test for hw_address, ip_address, ipv6_address
* add greater-then-operator and a simlple unit test for ipv6_address
* add new constructor and a simlple unit test for network_interface, which use a ipv6_address to find the nic
* add override the function gateway_from_ip for ipv6_address parameter (untested)

* change the ipv6_address in NotMaskAdress_Test, so that the expceted addresses are valid for the winsock api

* Delete CMakeLists.txt.user

* * add  <=, >, >= operator for HWAddress with tests

* add  <=, >, >= operator for IPv4Address with tests
* add  <=,>= operator for IPv6Address with tests

* refactoring the  & , |, ~ operator of ipv6_address to "regular" operator
2018-03-28 20:44:28 -07:00
Matias Fontanini
7848e28b62 Add version macros in config.h
Fixes #286
2018-03-20 18:50:42 -07:00
Matias Fontanini
544aa1b339 Don't assume IPv6 uses ICMPv6 underneath 2018-03-18 12:56:12 -07:00
Matias Fontanini
de4791f0c7 Allow users to specify library install dir
Fixes #273
2018-03-17 15:35:04 -07:00
Matias Fontanini
915f506f3a Use Sleep windows function passing milliseconds as parameter
Fixes #271
2018-03-14 18:47:40 -07:00
Matias Fontanini
f29566d6d9 Implement IPv6::recv_response 2018-02-25 10:42:16 -08:00
Matias Fontanini
e4f747164c Merge remote-tracking branch 'origin/master' into develop 2018-02-21 09:49:44 -08:00
Matias Fontanini
683550b297 Don't use nullptr in non C++11 code 2018-02-21 09:47:09 -08:00
Ed Catmur
971fdf7d1c Ignore (possibly malformed) options after EOL (#281) 2018-02-03 09:33:20 -08:00
Ed Catmur
1038c6f7f3 Don't call &* on PDUIterator 2018-02-03 09:32:43 -08:00
Jeff Ebert
8efc0271f5 Don't include dot11.h in tins.h if it is not configured in the library (#277) 2018-02-03 09:31:24 -08:00
Matias Fontanini
9ac5e597e6 Merge branch 'develop'
Ugh
2017-12-20 07:05:44 -08:00
Matias Fontanini
f7fc5fae1d Update CHANGES.md file using v4.0 changes 2017-12-20 07:04:55 -08:00
Matias Fontanini
f44b253a42 Fix memory leak in PDU's move assignment operator
Fixes #272
2017-12-14 14:42:46 -03:00
Matias Fontanini
8f85a6e557 Append padding to IPv6 options
Relates to #270
2017-12-12 10:33:17 -03:00
Matias Fontanini
8fd25e23a6 Update CHANGES.md file using v4.0 changes v4.0 2017-12-03 16:04:42 -08:00
Matias Fontanini
a3dd057147 Use first IP fragment as base for reassembly
Fixes #225 for good
2017-12-03 13:50:02 -08:00
Matias Fontanini
e16fe46d7a Fix invalid memory accesses when parsing bogus RadioTap 2017-11-25 17:12:30 -08:00
mavrikiy
39f3b24058 Fix dhcpv6::duid_type constructor from duid_ll (#266) 2017-11-06 09:29:57 -08:00
Santiago Alessandri
8e50756afa Add MPLS experimental field (#265)
* Add experimental field to MPLS PDU

See RFC-4950 https://tools.ietf.org/html/rfc4950

* Add tests for MPLS' experimental field
2017-11-04 12:08:34 -07:00
Alex Collins
c07cd40234 Fix #263 - Install only the headers which are enabled. (#264)
* Fix #263 - Install only the headers which are enabled.

* Fix #263 - Install only the headers which are enabled. Fix clumsy typo!
2017-10-28 10:23:09 -07:00
Alex Collins
d2addea9cf Reorders SOURCE includes alphanumerically, and adds HEADERS as source (#260)
* Reorders SOURCE includes alphanumerically, and adds HEADERS as sources to enable code completion in CLion.

* Add forward slash after variable to clarify path.

* Separate out DOT11 headers and sources.

* Reposition some sources as per general alpha sorting.
2017-10-26 16:23:20 -07:00
Alex Collins
f88c024b2f Fix minor typo in comment. (#261) 2017-10-24 14:31:45 -07:00
Ed Catmur
983325bfdf Ensure TCP::OptionTypes has 8-bit range (#259)
When reading TCP packets with esoteric (or corrupt) values for option types, the asan fsanitize=enum will trigger if the read value is not in range of the enum. The range of a classic (pre-C++11) enum with no negative enumerators is determined by the highest bit set in any of its enumerators, so if `TCP::OptionTypes` has highest enumerator `ALTCHK  = 14` it cannot take values above 15.

Define enumerators (per IANA) with bit 7 set to ensure that `TCP::OptionTypes` can take any 8-bit value.

An alternative (C++11 only) would be to give `TCP::OptionTypes` underlying type `uint8_t`.
2017-10-19 10:17:51 -07:00
Matias Fontanini
f4635a696e Fix build issues when disabling Dot11
Fixes #258
2017-10-18 06:40:51 -07:00
Steven
c439eccdf8 Implemented matching for ND protocol related ICMPv6 messages (#257)
- ROUTER_SOLICIT -> ROUTER_ADVERTIST
- NEIGHBOUR_SOLICIT -> NEIGHBOUR_ADVERTIST

Check if code equals zero according to https://tools.ietf.org/html/rfc4861#page-39
2017-10-12 20:03:10 -07:00
Alex Collins
04e29858ee Add RawPDU c'tor for const payload_type&. (#253)
* Add RawPDU c'tor for const payload_type &.

* Correct indentation.
2017-10-12 20:02:28 -07:00
Alex Collins
ab2850e22e Fix header install location. (#256) 2017-10-11 13:37:23 -07:00
Alex Collins
6429dcd03f Correct "promiscuous" spelling in comments (#254) 2017-10-09 14:25:21 -07:00
juno0812
b43d2f74e4 Add getter/setter for more data field in Dot11Base (#252) 2017-10-04 07:03:17 -07:00
Matias Fontanini
2aab4cf126 Fix warnings in tests 2017-10-01 20:47:52 -07:00
Matias Fontanini
f2766db829 Add IPv4/6Address::size member function 2017-10-01 20:38:54 -07:00
Matias Fontanini
db0fb7f20d Don't convert IPv6Address to string when hashing 2017-10-01 20:33:06 -07:00
Matias Fontanini
a6817528bc Use absolute include paths
Fixes #250
2017-09-21 20:48:57 -07:00
solvingj
a7dd867503 Fix hash<IPv4/6Address> build issues in VC
* fixed compile failure due to macro

* add functional to cxxstd.h to try to fix mac

* clang bug identified, moving functional include to later

* last step, move hash def to header

* avoid allocation on hash

* set ipv6 back to string hash
2017-09-19 19:00:28 -07:00
solvingj
e48f64daac Remove include directories CMakeLists files
* simply consolidate 6 files into 6 lines

* narrowed glob on inc and simplified
2017-09-14 09:32:27 -07:00
Matias Fontanini
171067eb22 Keep first fragment during IPv4 reassembly
Fixes #225
2017-09-10 16:39:15 -07:00
Matias Fontanini
78b94fa350 Serialize Loopback on Windows and use proper flag for IPv6 2017-08-13 10:46:36 -07:00
Matias Fontanini
c84652af40 Add IPv6 layer parsing on Loopback packets 2017-08-13 10:35:24 -07:00
Matias Fontanini
19fd9a7c1d Don't skip inner PDU parsing on LLC when building on Windows
Relates to issue #236
2017-08-13 10:34:41 -07:00