1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 20:01:35 +01:00

IP now fills automatically the sender address when no link layer PDU is present. Made some protocols work when using PacketSender::send_recv.

This commit is contained in:
Matias Fontanini
2013-03-25 14:08:59 -03:00
parent b0dc376494
commit 82ef41dd92
16 changed files with 241 additions and 114 deletions

View File

@@ -17,7 +17,7 @@ public:
};
const uint8_t UDPTest::expected_packet[] = {
245, 26, 71, 241, 4, 83, 0, 0
245, 26, 71, 241, 8, 0, 0, 0
};
@@ -121,7 +121,7 @@ TEST_F(UDPTest, ConstructorFromBuffer) {
EXPECT_EQ(buffer.size(), sizeof(expected_packet));
EXPECT_EQ(udp1.dport(), 0x47f1);
EXPECT_EQ(udp1.sport(), 0xf51a);
EXPECT_EQ(udp1.length(), 0x453);
EXPECT_EQ(udp1.length(), 8);
UDP udp2(&buffer[0], buffer.size());
EXPECT_EQ(udp1.dport(), udp2.dport());