/kernel/tests/net/test/ |
D | multinetwork_base.py | 127 def UidRangeForNetid(cls, netid): argument 129 cls.UID_RANGE_SIZE * netid, 130 cls.UID_RANGE_SIZE * (netid + 1) - 1 134 def UidForNetid(cls, netid): argument 135 if not netid: 137 return random.randint(*cls.UidRangeForNetid(netid)) 140 def _TableForNetid(cls, netid): argument 141 if cls.AUTOCONF_TABLE_OFFSET and netid in cls.ifindices: 142 return cls.ifindices[netid] + (-cls.AUTOCONF_TABLE_OFFSET) 144 return netid [all …]
|
D | anycast_test.py | 69 def AnycastSetsockopt(self, s, is_add, netid, addr): argument 70 ifindex = self.ifindices[netid] 77 netid = self._TEST_NETID 78 self.assertNotIn(netid, self.tuns) 79 self.tuns[netid] = self.CreateTunInterface(netid) 80 self.SendRA(netid) 81 iface = self.GetInterfaceName(netid) 82 self.ifindices[netid] = net_test.GetInterfaceIndex(iface) 85 addr = self.MyAddress(6, netid) 90 self.AnycastSetsockopt(s, True, netid, addr) [all …]
|
D | forwarding_test.py | 49 def CheckForwardingUdp(self, netid, iface1, iface2): argument 61 self.SetSocketMark(s, netid) 66 myaddr = self.MyAddress(version, netid) 71 self.iproute.DelAddress(myaddr, 64, self.ifindices[netid]) 82 self.SendRA(netid) 97 def CheckForwardingCrashTcp(self, netid, iface1, iface2): argument 100 self.SetSocketMark(listensocket, netid) 104 myaddr = self.MyAddress(version, netid) 109 reply = self._ReceiveAndExpectResponse(netid, syn, synack, msg) 112 self.ReceivePacketOn(netid, establishing_ack) [all …]
|
D | tcp_fastopen_test.py | 40 def TFOClientSocket(self, version, netid): argument 43 self.SelectInterface(s, netid, "mark") 53 def clearTcpMetrics(self, version, netid): argument 54 saddr = self.MyAddress(version, netid) 60 def assertNoTcpMetrics(self, version, netid): argument 61 saddr = self.MyAddress(version, netid) 68 netid = self.RandomNetid() 69 s = self.TFOClientSocket(version, netid) 71 self.clearTcpMetrics(version, netid) 80 myaddr = self.MyAddress(version, netid) [all …]
|
D | tcp_repair_test.py | 71 def createConnectedSocket(self, version, netid): argument 74 self.SelectInterface(s, netid, "mark") 81 myaddr = self.MyAddress(version, netid) 87 syn = self.ExpectPacketOn(netid, msg, expect_syn) 91 self.ReceivePacketOn(netid, synack) 94 ack = self.ExpectPacketOn(netid, msg, ack) 99 def receiveFin(self, netid, version, sock): argument 102 myaddr = self.MyAddress(version, netid) 104 self.ReceivePacketOn(netid, fin) 107 def sendData(self, netid, version, sock, payload): argument [all …]
|
D | tcp_test.py | 48 def OpenListenSocket(self, version, netid): argument 53 self.SelectInterface(s, netid, "mark") 57 def _ReceiveAndExpectResponse(self, netid, packet, reply, msg): argument 58 pkt = super(TcpBaseTest, self)._ReceiveAndExpectResponse(netid, packet, 63 def ReceivePacketOn(self, netid, packet): argument 64 super(TcpBaseTest, self).ReceivePacketOn(netid, packet) 67 def ReceiveRstPacketOn(self, netid): argument 73 super(TcpBaseTest, self).ReceivePacketOn(netid, rst) 84 def IncomingConnection(self, version, end_state, netid): argument 85 self.s = self.OpenListenSocket(version, netid) [all …]
|
D | neighbour_test.py | 66 for netid in cls.tuns: 67 iface = cls.GetInterfaceName(netid) 80 for netid in self.tuns: 83 addr = self._RouterAddress(netid, 6) 84 ifindex = self.ifindices[netid] 88 self.SendRA(netid, 96 self.netid = random.choice(list(self.tuns.keys())) 97 self.ifindex = self.ifindices[self.netid] 104 router = self._RouterAddress(self.netid, 4) 105 macaddr = self.RouterMacAddress(self.netid) [all …]
|
D | xfrm_test.py | 107 netid = self.RandomNetid() 108 self.SelectInterface(s, netid, "mark") 122 self.ExpectPacketOn(netid, "Send after socket, expected %s" % desc, pkt) 160 self._ExpectEspPacketOn(netid, TEST_SPI, 1, expected_length, None, None) 171 self.SelectInterface(s2, netid, "mark") 173 pkts = self.ReadAllPacketsOn(netid) 190 self.ExpectPacketOn(netid, "Send after clear, expected %s" % desc, pkt) 195 self.ExpectPacketOn(netid, "Send after clear 2, expected %s" % desc, pkt) 212 netid = self.RandomNetid() 213 myaddr = self.MyAddress(4, netid) [all …]
|
D | nf_test.py | 50 netid = self.RandomNetid() 51 self.SelectInterface(sock, netid, "mark") 69 netid = self.RandomNetid() 70 self.SelectInterface(sock, netid, "mark")
|
D | qtaguid_test.py | 123 def SendRSTOnClosedSocket(self, version, netid, expect_rst): argument 124 self.IncomingConnection(version, tcp_test.TCP_ESTABLISHED, netid) 129 self.ExpectPacketOn(netid, "Closing FIN_WAIT1 socket", fin) 132 self.ReceivePacketOn(netid, finack) 134 self.ExpectPacketOn(netid, "Closing FIN_WAIT1 socket", fin) 141 self.ExpectPacketOn(netid, msg, rst) 144 self.ExpectNoPacketsOn(netid, msg) 157 for netid in self.NETIDS: 158 self.SendRSTOnClosedSocket(version, netid, not invert_gid) 208 for netid in self.NETIDS: [all …]
|
D | resilient_rs_test.py | 87 def makeTunInterface(self, netid): argument 91 tun = self.CreateTunInterface(netid) 115 netid = self._TEST_NETID 116 tun = self.makeTunInterface(netid) 128 iface = self.GetInterfaceName(netid)
|
D | sock_diag_test.py | 537 netid = random.choice(list(self.tuns.keys())) 538 self.IncomingConnection(5, tcp_test.TCP_SYN_RECV, netid) 568 def checkInitRwndSize(self, version, netid): argument 569 self.IncomingConnection(version, tcp_test.TCP_ESTABLISHED, netid) 574 "Expect: %d, actual: %d" % (netid, version, self.RWND_SIZE, 577 def checkSynPacketWindowSize(self, version, netid): argument 578 s = self.BuildSocket(version, net_test.TCPSocket, netid, "mark") 579 myaddr = self.MyAddress(version, netid) 586 version, desc, self.GetInterfaceName(netid)) 587 syn = self.ExpectPacketOn(netid, msg, expected) [all …]
|
D | ping6_test.py | 224 for netid in cls.NETIDS: 241 for netid in cls.NETIDS: 242 cls.reply_threads[netid] = PingReplyThread( 243 cls.tuns[netid], 244 cls.MyMacAddress(netid), 245 cls.RouterMacAddress(netid), 246 cls._RouterAddress(netid, 6)) 247 cls.reply_threads[netid].start() 249 cls.netid = random.choice(cls.NETIDS) 250 cls.SetDefaultNetwork(cls.netid) [all …]
|
D | xfrm_algorithm_test.py | 231 netid = self.RandomNetid() 233 local_addr = self.MyAddress(version, netid) 308 self.SelectInterface(sock_left, netid, "mark") 312 self.SelectInterface(sock_right, netid, "mark") 383 with TapTwister(fd=self.tuns[netid].fileno(), validator=AssertEncrypted):
|