Lukáš Karas
22b4435c81
simplify tcp flag checks, fix stream_follower ( #334 )
...
* simplify tcp flag checks, fix stream_follower
On various places was used simple comparison for checking state of flags.
tcp.flags() == (TCP::SYN | TCP::ACK)
This is not what you want usually, because this check is false
in case that another flag is set also. Correct check for syn-ack
packet should be:
(tcp.flags() & (TCP::SYN | TCP::ACK)) == (TCP::SYN | TCP::ACK)
To simplify this kind of check, add new has_flags method:
bool TCP::has_flags(small_uint<12> check_flags) const
* remove duplicate TCP::SYN flag check
2019-03-14 18:18:12 -07:00
Matias Fontanini
c06787ca22
Update license date to 2017
2017-04-29 09:56:26 -07: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
8fcfd57125
Fixed portscan example.
2014-09-20 15:11:39 -03:00
Santiago Alessandri
039b41cb76
Updated the examples to work with the new Sniffer constructor using the SnifferConfiguration object.
2014-08-29 18:20:15 -07: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
Matias Fontanini
7f6e4446b4
Fixed the examples.
2013-04-24 12:07:52 -03:00
Matias Fontanini
97f049580b
Link layer PDUs no longer contain a NetworkInterface.
2013-04-21 18:50:08 -03:00
Matias Fontanini
836dbd8955
Fixed compilation issue in 2 examples.
2013-02-01 13:55:29 -03:00
Matias Fontanini
cd9d29f354
Added BSD notice to the code examples.
2012-10-17 18:49:43 -03:00
Matias Fontanini
e8151724c4
Removed PDU::clone_packet and renamed PDU::clone_pdu to PDU::clone.
2012-09-11 16:54:14 -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
2aa4e10b91
Added TCPStreamFollower class. It seems to be working right.
2012-09-04 23:20:32 -03:00
Matias Fontanini
68ab7b094a
Modified IPv4Address interface and fixed some tests.
2012-08-15 08:36:59 -03:00
Matias Fontanini
a49ac24972
Fixed bug in Utils::pseudoheader_checksum.
2012-03-06 09:16:31 -03:00
Matias Fontanini
3e2168f6fc
Added DHCP and BootP constructors from uint8_t buffer. Normalized IP destination and source address getters/setters.
2011-08-19 10:13:35 -03:00
Matias Fontanini
3a751848a8
Added a portscan example. It's kind of nasty, but works.
2011-08-19 00:07:41 -03:00