Lines Matching refs:total_length
290 size_t total_length, pos = 0; in reassemble_packet() local
342 total_length = headersize; in reassemble_packet()
348 total_length += payload_length; in reassemble_packet()
349 ASSERT_LT(total_length, *reassembled_len) << msg << ": Reassembly buffer too small\n"; in reassemble_packet()
356 ASSERT_EQ(total_length, pos) << msg << ": Reassembled packet length incorrect\n"; in reassemble_packet()
359 ip->tot_len = htons(total_length); in reassemble_packet()
366 ip6->ip6_plen = htons(total_length - sizeof(*ip6)); in reassemble_packet()
371 *reassembled_len = total_length; in reassemble_packet()
775 size_t total_length = sizeof(reassembled); in TEST_F() local
777 reassembled, &total_length, "Reassembly sanity check"); in TEST_F()
778 check_packet(reassembled, total_length, "IPv4 Reassembled packet is valid"); in TEST_F()
779 ASSERT_EQ(sizeof(kReassembledIPv4), total_length) << "IPv4 reassembly sanity check: length\n"; in TEST_F()
782 check_data_matches(kReassembledIPv4, reassembled, total_length, "IPv4 reassembly sanity check"); in TEST_F()
784 total_length = sizeof(reassembled); in TEST_F()
786 reassembled, &total_length, "IPv6 reassembly sanity check"); in TEST_F()
787 ASSERT_TRUE(!is_ipv6_fragment((struct ip6_hdr *) reassembled, total_length)) in TEST_F()
789 check_packet(reassembled, total_length, "IPv6 Reassembled packet is valid"); in TEST_F()