Lines Matching refs:data
264 def assertValidPingResponse(self, s, data): argument
278 self.assertGreater(len(data), 7, "Not enough data for ping packet")
280 self.assertTrue(data.startswith("\x08\x00"), "Not an IPv4 echo request")
282 self.assertTrue(data.startswith("\x80\x00"), "Not an IPv6 echo request")
306 self.assertEqual(len(data), len(rcvd))
307 self.assertEqual(data[6:].encode("hex"), rcvd[6:].encode("hex"))
346 data = net_test.IPV4_PING + "foobarbaz"
347 s.send(data)
348 self.assertValidPingResponse(s, data)
404 scapy.ICMPv6EchoRequest(id=port, seq=1, data="foobarbaz"))
737 data = net_test.IPV4_PING + 20000 * "a"
738 s.sendto(data, ("127.0.0.1", 987))
739 self.assertValidPingResponse(s, data)
744 data = net_test.IPV6_PING + "\x01" + 19994 * "\x00" + "aaaaa"
745 s.sendto(data, ("::1", 953))
836 data, addr, cmsg = csocket.Recvmsg(s, 4096, 1024, csocket.MSG_ERRQUEUE)
843 data = data[:2] + "\x00\x00" + pkt[4:]
844 self.assertEqual(pkt, data)