Lines Matching refs:version
71 def createConnectedSocket(self, version, netid): argument
72 s = net_test.TCPSocket(net_test.GetAddressFamily(version))
76 remotesockaddr = self.GetRemoteSocketAddress(version)
77 remoteaddr = self.GetRemoteAddress(version)
81 myaddr = self.MyAddress(version, netid)
85 desc, expect_syn = packets.SYN(TEST_PORT, version, myaddr, remoteaddr, port, seq=None)
88 synack_desc, synack = packets.SYNACK(version, remoteaddr, myaddr, syn)
92 desc, ack = packets.ACK(version, myaddr, remoteaddr, synack)
99 def receiveFin(self, netid, version, sock): argument
101 remoteaddr = self.GetRemoteAddress(version)
102 myaddr = self.MyAddress(version, netid)
103 desc, fin = packets.FIN(version, remoteaddr, myaddr, self.last_sent)
107 def sendData(self, netid, version, sock, payload): argument
110 remoteaddr = self.GetRemoteAddress(version)
111 myaddr = self.MyAddress(version, netid)
112 desc, send = packets.ACK(version, myaddr, remoteaddr,
116 def receiveData(self, netid, version, payload): argument
117 remoteaddr = self.GetRemoteAddress(version)
118 myaddr = self.MyAddress(version, netid)
120 desc, received = packets.ACK(version, remoteaddr, myaddr,
122 ack_desc, ack = packets.ACK(version, myaddr, remoteaddr, received)
132 for version in [4, 5, 6]:
133 self.tcpRepairInNoQueueTest(version)
135 def tcpRepairInNoQueueTest(self, version): argument
137 sock = self.createConnectedSocket(version, netid)
145 self.receiveData(netid, version, TEST_RECEIVED)
158 for version in [4, 5, 6]:
159 self.GetSequenceNumberTest(version)
161 def GetSequenceNumberTest(self, version): argument
163 sock = self.createConnectedSocket(version, netid)
165 sequence_before = self.GetWriteSequenceNumber(version, sock)
169 self.sendData(netid, version, sock, TEST_SEND)
170 sequence_after = self.GetWriteSequenceNumber(version, sock)
174 sequence_before = self.GetReadSequenceNumber(version, sock)
178 self.receiveData(netid, version, TEST_READ)
179 sequence_after = self.GetReadSequenceNumber(version, sock)
183 def GetWriteSequenceNumber(self, version, sock): argument
191 def GetReadSequenceNumber(self, version, sock): argument
202 for version in [4, 5, 6]:
203 self.PollWhenShutdownTest(version)
204 self.PollWhenReceiveFinTest(version)
206 def PollRepairSocketInMultipleThreads(self, netid, version, expected): argument
207 sock = self.createConnectedSocket(version, netid)
227 def PollWhenShutdownTest(self, version): argument
230 sock, multiThreads = self.PollRepairSocketInMultipleThreads(netid, version, expected)
237 sock, multiThreads = self.PollRepairSocketInMultipleThreads(netid, version, expected)
244 sock, multiThreads = self.PollRepairSocketInMultipleThreads(netid, version, expected)
250 def PollWhenReceiveFinTest(self, version): argument
253 sock, multiThreads = self.PollRepairSocketInMultipleThreads(netid, version, expected)
254 self.receiveFin(netid, version, sock)
260 for version in [4, 5, 6]:
261 self.readQueueIdleTest(version)
262 self.writeQueueIdleTest(version)
264 def readQueueIdleTest(self, version): argument
266 sock = self.createConnectedSocket(version, netid)
273 self.receiveData(netid, version, TEST_RECV_PAYLOAD)
278 def writeQueueIdleTest(self, version): argument
281 sock = self.createConnectedSocket(version, netid)
289 self.sendData(netid, version, sock, TEST_SEND_PAYLOAD)
296 sock = self.createConnectedSocket(version, netid)
298 self.sendData(netid, version, sock, TEST_SEND_PAYLOAD)
302 remoteaddr = self.GetRemoteAddress(version)
303 myaddr = self.MyAddress(version, netid)
304 desc_ack, ack = packets.ACK(version, remoteaddr, myaddr, self.last_sent)