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

Refactored code related to stream/flow initialization. (#170)

- Removed client_flow().process_packet() in Stream constructor, in favor of processing on SYN in stream follower.
- Moved +1 to seq on SYN/ACK.
This commit is contained in:
Patrick Michel
2016-09-28 16:30:16 +02:00
committed by Matias Fontanini
parent e82b72e931
commit 838a4a5cb9
4 changed files with 35 additions and 39 deletions

View File

@@ -354,7 +354,7 @@ TEST_F(FlowTest, StreamFollower_ThreeWayHandshake) {
EXPECT_EQ(Flow::ESTABLISHED, stream.client_flow().state());
EXPECT_EQ(Flow::SYN_SENT, stream.server_flow().state());
EXPECT_EQ(30U, stream.client_flow().sequence_number());
EXPECT_EQ(60U, stream.server_flow().sequence_number());
EXPECT_EQ(61U, stream.server_flow().sequence_number());
EXPECT_EQ(IPv4Address("4.3.2.1"), stream.client_flow().dst_addr_v4());
EXPECT_EQ(25, stream.client_flow().dport());
EXPECT_EQ(IPv4Address("1.2.3.4"), stream.server_flow().dst_addr_v4());