/kernel/tests/net/test/ |
D | netlink.py | 69 def _NlAttr(self, nla_type, data): argument 70 datalen = len(data) 74 return NLAttr((nla_len, nla_type)).Pack() + data + padding 94 def _ParseAttributes(self, command, msg, data): argument 112 while data: 114 nla, data = cstruct.Read(data, NLAttr) 119 nla_data, data = data[:datalen], data[padded_len:] 141 def MaybeDebugCommand(self, command, flags, data): argument 151 data = self.sock.recv(self.BUFSIZE) 153 return data [all …]
|
D | csocket.py | 140 msg_level, msg_type, data = opt 141 if isinstance(data, int): 142 data = struct.pack("=I", data) 143 elif not isinstance(data, str): 144 raise TypeError("unknown data type for opt %i: %s" % (i, type(data))) 146 datalen = len(data) 150 msg_control += data + padding 161 data, buf = buf[:datalen], buf[PaddedLength(datalen):] 165 data = InPktinfo(data) 167 data = struct.unpack("@I", data)[0] [all …]
|
D | iproute.py | 264 data = struct.unpack("=I", nla_data)[0] 266 data = struct.unpack("=i", nla_data)[0] 268 data = ord(nla_data) 272 data = socket.inet_ntop(msg.family, nla_data) 275 data = nla_data.strip("\x00") 277 data = self._ParseAttributes(-RTA_METRICS, None, nla_data) 279 data = RTACacheinfo(nla_data) 281 data = IFACacheinfo(nla_data) 283 data = NDACacheinfo(nla_data) 285 data = ":".join(x.encode("hex") for x in nla_data) [all …]
|
D | sock_diag.py | 132 data = ord(nla_data) 134 data = nla_data.strip("\x00") 136 data = InetDiagMeminfo(nla_data) 139 data = TcpInfo(nla_data) 141 data = SkMeminfo(nla_data) 143 data = struct.unpack("=I", nla_data)[0] 145 data = self.DecodeBytecode(nla_data) 147 data = [] 157 data.append(addr) 159 data = nla_data [all …]
|
D | cstruct.py | 134 def _Parse(self, data): argument 135 data = data[:self._length] 136 values = list(struct.unpack(self._format, data)) 221 def Read(data, struct_type): argument 223 return struct_type(data), data[length:]
|
D | tcp_nuke_addr_test.py | 89 data = "foo" 91 self.assertEquals(len(data), s1.send(data)) 92 self.assertEquals(data, s2.recv(4096))
|
D | xfrm.py | 209 def MaybeDebugCommand(self, command, flags, data): argument 225 print "%s %s" % (cmdname, str(self._ParseNLMsg(data, struct_type))) 234 data = cstruct.Read(nla_data, XfrmAlgo)[0] 236 data = cstruct.Read(nla_data, XfrmAlgoAuth)[0] 238 data = cstruct.Read(nla_data, XfrmEncapTmpl)[0] 240 data = nla_data 242 return name, data
|
D | csocket_test.py | 41 data, addr = csocket.Recvfrom(s, 4096, 0) 42 self.assertEqual("foo", data) 73 data, addr, cmsg = csocket.Recvmsg(s, 4096, 1024, 0) 74 self.assertEqual("foo", data)
|
D | xfrm_test.py | 140 data = info.Pack() + tmpl.Pack() 141 s.setsockopt(IPPROTO_IPV6, xfrm.IPV6_XFRM_POLICY, data) 235 data = info.Pack() + usertmpl.Pack() 236 s.setsockopt(IPPROTO_IP, xfrm.IP_XFRM_POLICY, data) 288 data = info.Pack() + usertmpl.Pack() 289 twisted_socket.setsockopt(IPPROTO_IP, xfrm.IP_XFRM_POLICY, data) 310 data, src = twisted_socket.recvfrom(4096) 311 self.assertEquals("foo", data)
|
D | ping6_test.py | 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")) 330 data = net_test.IPV4_PING + "foobarbaz" 331 s.send(data) 332 self.assertValidPingResponse(s, data) 388 scapy.ICMPv6EchoRequest(id=port, seq=1, data="foobarbaz")) [all …]
|
D | leak_test.py | 45 data, addr = csocket.Recvfrom(s, 4096) 46 self.assertEqual("", data)
|
D | bpf_test.py | 80 data, addr = csocket.Recvfrom(sock, 4096, 0) 81 self.assertEqual("foo", data) 145 data, retaddr = csocket.Recvfrom(sock, 4096, 0) 146 self.assertEqual("foo", data)
|
D | tcp_test.py | 108 desc, data = packets.ACK(version, myaddr, remoteaddr, establishing_ack, 111 self.ExpectPacketOn(netid, msg + ": expecting %s" % desc, data) 113 desc, fin = packets.FIN(version, remoteaddr, myaddr, data)
|
D | multinetwork_test.py | 474 desc, data = packets.ACK(version, myaddr, remoteaddr, establishing_ack, 477 self.ExpectPacketOn(netid, msg + ": expecting %s" % desc, data) 481 ack = packets.ACK(version, remoteaddr, myaddr, data)[1]
|