mirror of
https://github.com/mfontanini/libtins
synced 2026-01-27 04:11:35 +01:00
Added a const overload of TCP::get_flag. Added TCP::flags.
This commit is contained in:
@@ -134,6 +134,16 @@ TEST_F(TCPTest, SetFlag) {
|
||||
EXPECT_EQ(tcp.get_flag(TCP::CWR), 0);
|
||||
}
|
||||
|
||||
TEST_F(TCPTest, Flags) {
|
||||
TCP tcp;
|
||||
tcp.set_flag(TCP::SYN, 1);
|
||||
tcp.set_flag(TCP::FIN, 1);
|
||||
|
||||
EXPECT_EQ(tcp.flags(), (TCP::SYN | TCP::FIN));
|
||||
tcp.flags(TCP::PSH | TCP::RST);
|
||||
EXPECT_EQ(tcp.flags(), (TCP::PSH | TCP::RST));
|
||||
}
|
||||
|
||||
TEST_F(TCPTest, MSS) {
|
||||
TCP tcp;
|
||||
tcp.mss(0x456f);
|
||||
|
||||
Reference in New Issue
Block a user