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
Matias Fontanini
552006c876
Set EthernetII payload type to UNKNOWN if no inner_pdu
2016-09-27 07:47:32 -07:00
Matias Fontanini
6b7bc76603
Forward NetworkInterface argument when calling PacketSender::send_l2
2016-05-08 20:46:11 -07:00
Matias Fontanini
17da10d76e
Add extract_metadata to main PDU classes
2016-02-20 22:19:12 -08:00
Matias Fontanini
64b84fa91d
Prefix HAVE_ config.h macros with TINS_
2016-02-20 09:10:48 -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
f5a82b1a17
Correctly serialize PPPoE session packets
2016-01-01 14:49:32 -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
13c05fbdb1
Add input memory stream class and port some PDUs to use it
2015-12-24 15:21:07 -08:00
Matias Fontanini
35d5045db4
Don't set Ethernet type if inner PDU type is unknown
...
Fixes #116
2015-11-27 20:31:12 -08:00
Matias Fontanini
a607ab380c
Replace WIN32 macro with _WIN32.
2015-05-02 16:25:59 -07:00
Matias Fontanini
147c1a4315
Don't allow receiving l2 packets on windows.
2015-04-18 18:56:16 -07:00
Matias Fontanini
621af33a81
Fix more precompiler conditionals.
2015-04-18 18:19:56 -07:00
Matias Fontanini
e2f96123a3
Remove some WIN32-guarded code.
2015-04-18 18:08:22 -07:00
Matias Fontanini
96fc1a3749
Use pcap_sendpacket to send packets if this mode is enabled.
2015-04-18 17:46:14 -07:00
Matias Fontanini
8e6ddfd764
Fixed bug in EthernetII when changing its inner PDU.
2014-08-07 19:38:05 -03:00
Matias Fontanini
2dff95700f
Updated copyright notice.
2014-07-13 11:04:29 -03:00
Matias Fontanini
01b2a9c7b2
Modified some examples fixed some doxygen documentation.
2013-10-06 23:00:20 -03:00
Santiago Alessandri
2a5b64526f
Replaced tabs for spaces in the previous commit
2013-07-14 13:13:38 -03:00
Santiago Alessandri
02d3a14083
Fixed issue related with EthernetII protocol.
...
The Ethernet II protocol forces a minimum length of 60 bytes. It is necessary to add a trailer for padding of null-bytes when the inner_pdu's size does not meet the requirement.
Also EthernetII packets received were being incorrectly parsed due to the existance of this padding.
The issue has been solved and several tests were added. All tests successfully pass.
2013-07-12 20:06:55 -03:00
Matias Fontanini
5064a9255b
Fixed BSD notice. Updated AUTHORS file.
2013-04-23 20:33:00 -03:00
Matias Fontanini
bf604339f0
Removed the PDU* parameter in several PDU's constructors.
2013-04-23 20:03:08 -03:00
Matias Fontanini
fdfb8b0dea
Fixed compilation issues triggered in GNU/kFreeBSD.
2013-04-22 23:48:53 -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
69968cbc5c
Removed deprecated methods/types.
2013-04-21 19:52:39 -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
f2a5f73337
Implemented matches_response on several PDUs. Added some test cases.
2013-04-02 21:05:53 -03:00
Matias Fontanini
dfc0498b70
DNS, RadioTap and Dot1Q work when using PacketSender::send_recv.
2013-03-26 14:54:24 -03:00
Matias Fontanini
1cec099c0e
Dot3::matches_response now works as expected.
2013-03-26 00:25:47 -03:00
Matias Fontanini
8be0c4c23c
Marked PDU::clone_packet as deprecated.
2013-03-24 16:08:09 -03:00
Matias Fontanini
02265061cc
Added SLL pseudo protocol header.
2013-01-16 00:05:28 -03:00
Matias Fontanini
742276c251
libtins compiles and runs under windows. Packets apparently can't be sent yet.
2012-12-02 20:25:05 -03:00
Matias Fontanini
de82dc2322
Link layer protocols can now be sent on BSD.
2012-11-28 16:50:47 -03:00
Matias Fontanini
6696c1b284
Ported almost everything to BSD. Utils::route_entries and sending link layer PDUs still don't work.
2012-11-28 00:11:42 -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
Matias Fontanini
abaa2bf926
PacketSender now throws on error. Fixed the documentation on several header files.
2012-10-19 12:01:34 -03:00
Matias Fontanini
73577c744a
Every test now pass on big endian architectures. Ported about half of the library to windows as well.
2012-10-08 21:14:57 -03:00
Matias Fontanini
1c22dab2dc
libtins now uses a BSD license.
2012-10-07 20:33:45 -03:00
Matias Fontanini
153bcecc35
Removed the useless PDU::flag member. Added a PDU concatenation operator.
2012-10-07 18:51:06 -03:00
Matias Fontanini
7cbd32361a
Modified some PacketSender and BaseSniffer functions to take references instead of pointers.
2012-09-11 08:51:25 -03:00
Matias Fontanini
9981819b71
Added PacketWriter class.
2012-09-06 14:18:07 -03:00
Matias Fontanini
3cb6603151
Improved compile time using forward declarations and removing useless includes.
2012-09-05 11:59:46 -03:00
Matias Fontanini
832a79a1e1
Moved endianness change functions to endianness.h.
2012-09-03 23:58:43 -03:00
Matias Fontanini
da8c77c77e
RAII'd some code. Everything(hopefully) uses IPv4Address now.
2012-08-27 00:16:56 -03:00
Matias Fontanini
e83acc92cc
No code uses net_to_host_* now.
2012-08-16 23:45:50 -03:00
Matias Fontanini
27f6eeccd4
Fixed some bugs in Dot11 and DNS. Most of the code uses host_to_be and be_to_host.
2012-08-16 00:34:18 -03:00