/kernel/tests/net/test/ |
D | csocket_test.py | 39 def _BuildSocket(self, family, addr): argument 40 s = socket.socket(family, SOCK_DGRAM, 0) 44 def CheckRecvfrom(self, family, addr): argument 45 s = self._BuildSocket(family, addr) 59 def CheckRecvmsg(self, family, addr): argument 60 s = self._BuildSocket(family, addr) 62 if family == AF_INET: 70 elif family == AF_INET6:
|
D | tcp_metrics.py | 62 self.family = ctrl.GetFamily(TCP_METRICS_GENL_NAME) 93 family = AF_INET 96 family = AF_INET6 98 return self._NlAttrIPAddress(nla_type, family, address) 102 family = net_test.GetAddressFamily(version) 108 return self._NlAttrIPAddress(nla_type, family, address) 118 return self._Dump(self.family, TCP_METRICS_CMD_GET, 1) 123 self._SendCommand(self.family, TCP_METRICS_CMD_GET, 1, data, 131 self._SendCommand(self.family, TCP_METRICS_CMD_DEL, 1, data,
|
D | sock_diag.py | 119 if msg.family == AF_INET or msg.family == AF_INET6: 152 if addr.family == AF_INET: 154 elif addr.family == AF_INET6: 229 family = AF_INET6 if ":" in addr else AF_INET 230 addr = inet_pton(family, addr) 231 arg = InetDiagHostcond((family, prefixlen, port)).Pack() + addr 278 if cond.family == 0: 281 addrlen = 4 if cond.family == AF_INET else 16 283 addr = inet_ntop(cond.family, addr) 316 for family in [AF_INET, AF_INET6]: [all …]
|
D | net_test.py | 118 level = {AF_INET: SOL_IP, AF_INET6: SOL_IPV6}[s.family] 119 option = {AF_INET: IP_TOS, AF_INET6: IPV6_TCLASS}[s.family] 129 def Socket(family, sock_type, protocol): argument 130 s = socket(family, sock_type, protocol) 135 def PingSocket(family): argument 136 proto = {AF_INET: IPPROTO_ICMP, AF_INET6: IPPROTO_ICMPV6}[family] 137 return Socket(family, SOCK_DGRAM, proto) 148 def TCPSocket(family): argument 149 s = Socket(family, SOCK_STREAM, IPPROTO_TCP) 162 def UDPSocket(family): argument [all …]
|
D | tcp_nuke_addr_test.py | 46 family, _, _, _, _ = getaddrinfo(addr, None, AF_UNSPEC, SOCK_DGRAM, 0, 48 if family == AF_INET6: 51 elif family == AF_INET: 56 raise ValueError('Address family %r not supported.' % family) 57 datagram_socket = socket(family, SOCK_DGRAM)
|
D | xfrm_test.py | 105 family = net_test.GetAddressFamily(version) 106 s = socket(family, SOCK_DGRAM, 0) 170 s2 = socket(family, SOCK_DGRAM, 0) 188 xfrm_base.SetPolicySockopt(s, family, None) 193 xfrm_base.SetPolicySockopt(s, family, None) 199 xfrm_base.SetPolicySockopt(s, family, None) 450 family = net_test.GetAddressFamily(version) 452 s = socket(family, SOCK_DGRAM, 0) 461 xfrm_base.ApplySocketPolicy(s, family, xfrm.XFRM_POLICY_OUT, 471 family = net_test.GetAddressFamily(version) [all …]
|
D | genetlink.py | 60 def _SendCommand(self, family, command, version, data, flags): argument 62 self._SendNlRequest(family, genlmsghdr.Pack() + data, flags) 64 def _Dump(self, family, command, version): argument 66 return super(GenericNetlink, self)._Dump(family, msg, Genlmsghdr, "")
|
D | xfrm.py | 238 family = AF_INET6 if ":" in addr else AF_INET 239 return inet_pton(family, addr) 253 def EmptySelector(family): argument 255 return XfrmSelector(family=family) 266 family = net_test.GetAddressFamily(srcver) 268 prefixlen_s=prefixlen, prefixlen_d=prefixlen, family=family) 292 def UserTemplate(family, spi, reqid, tun_addrs): argument 318 family=family, 517 family = AF_INET6 if ":" in dst else AF_INET 566 cur, stats, seq, reqid, family, mode, replay, flags)) [all …]
|
D | csocket.py | 114 family = socket.AF_INET6 119 addr = socket.inet_pton(family, addr) 120 return SockaddrIn6((family, socket.ntohs(port), socket.ntohl(flowinfo), 123 family = socket.AF_INET 125 addr = socket.inet_pton(family, addr) 126 return SockaddrIn((family, socket.ntohs(port), addr)) 285 elif alen == len(SockaddrIn) and SockaddrIn(addr).family == socket.AF_INET: 287 elif alen == len(SockaddrIn6) and SockaddrIn6(addr).family == socket.AF_INET6:
|
D | xfrm_algorithm_test.py | 232 family = net_test.GetAddressFamily(version) 305 sock_left = socket(family, proto, 0) 309 sock_right = socket(family, proto, 0) 321 xfrm_base.ApplySocketPolicy(sock_left, family, xfrm.XFRM_POLICY_OUT, 324 xfrm_base.ApplySocketPolicy(sock_right, family, xfrm.XFRM_POLICY_IN, 327 xfrm_base.ApplySocketPolicy(sock_right, family, xfrm.XFRM_POLICY_OUT, 330 xfrm_base.ApplySocketPolicy(sock_left, family, xfrm.XFRM_POLICY_IN,
|
D | sock_diag_test.py | 109 family, addr = random.choice([ 113 socketpair = net_test.CreateSocketPair(family, socktype, addr) 134 family = s.getsockopt(net_test.SOL_SOCKET, net_test.SO_DOMAIN) 135 self.assertEqual(diag_msg.family, family) 340 self.assertTrue(all(d.family == AF_INET for d, _ in v4socks)) 345 self.assertTrue(all(d.family == AF_INET6 for d, _ in v6socks)) 409 family = net_test.GetAddressFamily(version) 410 s = socket(family, SOCK_DGRAM, 0) 791 family = {4: AF_INET, 5: AF_INET6, 6: AF_INET6}[version] 792 s = net_test.Socket(family, SOCK_STREAM, IPPROTO_TCP) [all …]
|
D | qtaguid_test.py | 84 family = {4: AF_INET, 6: AF_INET6}[version] 85 s = socket(family, SOCK_DGRAM, 0) 101 family = {4: AF_INET, 6: AF_INET6}[version] 102 s = socket(family, SOCK_DGRAM, 0) 112 s2 = socket(family, SOCK_DGRAM, 0)
|
D | bpf_test.py | 130 family = {4: socket.AF_INET, 6: socket.AF_INET6}[version] 131 sock = socket.socket(family, socket.SOCK_DGRAM, 0) 561 def checkSocketCreate(self, family, socktype, success): argument 563 sock = socket.socket(family, socktype, 0) 568 (family, socktype, os.strerror(e.errno))) 572 % (family, socktype)) 575 for family in [socket.AF_INET, socket.AF_INET6]: 577 self.checkSocketCreate(family, socktype, success)
|
D | pf_key_test.py | 53 state4, attrs4 = [(s, a) for s, a in sainfos if s.family == AF_INET][0] 54 state6, attrs6 = [(s, a) for s, a in sainfos if s.family == AF_INET6][0]
|
D | tcp_test.py | 49 family = {4: AF_INET, 5: AF_INET6, 6: AF_INET6}[version] 51 s = net_test.Socket(family, SOCK_STREAM, IPPROTO_TCP)
|
D | ping6_test.py | 265 family = s.family 274 family = AF_INET 279 if family == AF_INET: 281 elif family == AF_INET6: 284 self.fail("Unknown socket address family %d" * s.family) 287 if family == AF_INET: 568 sockaddr.family = AF_UNSPEC 574 sockaddr.family = AF_UNSPEC 580 sockaddr.family = AF_UNSPEC
|
D | multinetwork_base.py | 67 family = {4: AF_INET, 6: AF_INET6}[version] 71 addr = inet_pton(family, addr) 468 if s.family == AF_INET6:
|
D | pf_key.py | 233 prefixlen = {AF_INET: 32, AF_INET6: 128}[addr.family]
|