Matias Fontanini
ea6638c163
IP now uses PDUOption::to<>. Started porting ICMPv6 to do so as well.
2013-12-16 15:50:17 -03:00
Matias Fontanini
0acb0fee3e
IP packets sent using PacketSender::send_recv now match ICMP responses.
2013-12-14 12:48:56 -03:00
Matias Fontanini
2ddec368c3
Fixed bug on IP when serializing fragmented packets.
...
The original protocol id was being overwritten with 0xff(unknown)
when the inner_pdu was a RawPDU, even if it was just a fragment of
a transport layer PDU. The protocol id is now kept if the packet
is fragmented.
2013-12-04 10:56:48 -03:00
Matias Fontanini
6355aff3cd
Added IPv4Reassembler class.
2013-11-17 15:32:24 -03:00
Matias Fontanini
a6655191d4
Fragmented IP packet's inner_pdu PDUs are not decoded now.
2013-11-16 19:40:08 -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
01b2a9c7b2
Modified some examples fixed some doxygen documentation.
2013-10-06 23:00:20 -03:00
Matias Fontanini
5f2c923c48
Added PDUAllocator class, which makes extending PDUs easier.
2013-08-29 23:31:10 -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
0f2bc45059
Moved definitions inside TINS_IS_CXX11 into header files.
2013-04-23 13:04:57 -03:00
Matias Fontanini
fdfb8b0dea
Fixed compilation issues triggered in GNU/kFreeBSD.
2013-04-22 23:48:53 -03:00
Matias Fontanini
9be4f0ca37
Removed IP, UDP and IP checksum setters. Added some checksum tests.
2013-04-22 20:06:35 -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
3f4c48ad9f
Fixed bug triggered when parsing EOL and NOP options in IP.
2013-04-15 00:23:29 -03:00
Matias Fontanini
f4522acd44
IP and TCP now calculate checksums always inside write_serialization.
2013-04-11 00:57:36 -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
f7f5a9bc9a
Added PPPoE.
2013-04-07 20:57:43 -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
b32586e739
Fixed compilation error on IP and TCP.
2013-03-25 15:17:26 -03:00
Matias Fontanini
82ef41dd92
IP now fills automatically the sender address when no link layer PDU is present. Made some protocols work when using PacketSender::send_recv.
2013-03-25 14:08:59 -03:00
Matias Fontanini
8be0c4c23c
Marked PDU::clone_packet as deprecated.
2013-03-24 16:08:09 -03:00
Matias Fontanini
d7dd1e131f
Added an overload of add_option that takes an rvalue-ref in IP, TCP, DHCP, ICMPv6 and Dot11.
2013-03-24 00:08:53 -03:00
Matias Fontanini
356fe00aad
Fixed compilation error in OSX. Fixed bug when sending IP PDUs in BSD.
2012-12-04 16:15:08 -03:00
Matias Fontanini
53fe80d8a7
Added fix for IP::tot_len's endianess in OSX.
2012-12-03 20:34:15 -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
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
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
5fd892c77e
Fixed some bugs. Added documentation.
2012-10-20 11:12:59 -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
16a81c0589
Fixed bugs on IP+big endian architecture.
2012-10-03 00:35:16 -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
c49fbe9929
Added a generic PDUOption class. TCP, IP, DHCP and Dot11* now use this class to store their options.
2012-09-10 00:11:54 -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
958edcc74a
Added small_uint class.
2012-09-02 18:24:59 -03:00
Matias Fontanini
da8c77c77e
RAII'd some code. Everything(hopefully) uses IPv4Address now.
2012-08-27 00:16:56 -03:00