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

67 Commits

Author SHA1 Message Date
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
Matias Fontanini
e2223bf406 Fixed some bugs. Added a better dependency system for Makefiles. 2012-08-13 00:29:38 -03:00
Matias Fontanini
55be59ee15 Done some minor fixes. 2012-08-09 23:39:32 -03:00
Matias Fontanini
91af0f9cc2 EthernetII, IEEE802_3 and Dot11(and subclasses) now use NetworkInterface and HWAddress. 2012-08-09 12:00:29 -03:00
Matias Fontanini
e64eb11f1c HWAddress class is working. EthernetII now uses this classes instead of raw uint8_t* 2012-08-07 16:12:40 -03:00
Matias Fontanini
c5fce38c3a Refactored several classes. 2012-08-03 13:08:24 -03:00
Matias Fontanini
e6ccdcd75e Fixed/added copy constructor to IP/TCP/UDP/ARP/EthernetII PDUs. 2012-03-24 01:27:22 -03:00
Matias Fontanini
9c2293b2aa Fixed bug in EthernetII::ADDR_SIZE definition. 2011-09-19 01:00:59 -03:00
Santiago Alessandri
8b7f016278 Added test for EthernetII PDU 2011-09-15 12:01:45 -03:00