+ TEST_ASSERT_REL(IP_Checksum(IP_CHECKSUM_START, sizeof(hdr), &hdr), ==, 0);
+
+ TEST_ASSERT_REL(ntohs(hdr.TotalLength), <=, len - ofs);
+ TEST_ASSERT_REL(ntohs(hdr.TotalLength), >, (hdr.VerLen & 0xF) * 4);
+ TEST_ASSERT_REL(ntohs(hdr.FragmentInfo), ==, 0);
+
+ TEST_ASSERT_REL(hdr.TTL, >, 1); // >1 because there's no intervening hops
+ TEST_ASSERT_REL(hdr.Protocol, ==, proto);
+
+ if(Src) TEST_ASSERT( memcmp(hdr.SrcAddr, Src, 4) == 0 );
+ if(Dst) TEST_ASSERT( memcmp(hdr.DstAddr, Dst, 4) == 0 );
+
+ *len_out = ntohs(hdr.TotalLength) - sizeof(hdr);
+ *ofs_out = ofs + (hdr.VerLen & 0xF) * 4;
+ return true;