1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-22 18:25:57 +01:00
Files
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
..
2017-04-29 09:56:26 -07:00
2017-04-29 09:56:26 -07:00
2016-02-21 18:28:59 -08:00
2017-04-29 09:56:26 -07:00
2017-04-29 09:56:26 -07:00
2017-04-29 09:56:26 -07:00
2017-04-29 09:56:26 -07:00