• Home
  • Raw
  • Download

Lines Matching refs:s

58     s = self.BuildSocket(version, net_test.PingSocket, netid, routing_mode)
62 s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
63 s.bind((mysockaddr, packets.PING_IDENT))
64 net_test.SetSocketTos(s, packets.PING_TOS)
72 s.sendto(packet + packets.PING_PAYLOAD, (dstsockaddr, 19321))
77 s = self.BuildSocket(version, net_test.TCPSocket, netid, routing_mode)
87 self.assertRaisesErrno(errno.EINPROGRESS, s.connect, (dstsockaddr, 53))
91 s.close()
94 s = self.BuildSocket(version, net_test.UDPSocket, netid, routing_mode)
104 s.sendto(UDP_PAYLOAD, (dstsockaddr, 53))
109 s.connect((dstsockaddr, 53))
110 s.send(UDP_PAYLOAD)
112 s.close()
115 s = self.BuildSocket(version, net_test.RawGRESocket, netid, routing_mode)
128 s.sendto(packet, (dstaddr, IPPROTO_GRE))
184 s = net_test.UDPSocket(self.GetProtocolFamily(version))
187 sport = net_test.BindRandomPort(version, s)
196 self.SelectInterface(s, netid, mode)
197 s.connect((dstaddr, 53))
212 self.SelectInterface(s, netid, mode)
221 s.send(UDP_PAYLOAD)
223 s.sendto(UDP_PAYLOAD, (dstaddr, 53))
236 self.SelectInterface(s, None, mode)
252 s = net_test.UDPSocket(AF_INET6)
255 net_test.SetFlowLabel(s, net_test.IPV6_ADDR, 0xdead)
256 s.setsockopt(net_test.SOL_IPV6, net_test.IPV6_FLOWINFO_SEND, 1)
266 s.setsockopt(net_test.SOL_IPV6, IPV6_DSTOPTS, dstopts)
267 s.setsockopt(net_test.SOL_IPV6, IPV6_UNICAST_HOPS, 255)
272 s.setsockopt(net_test.SOL_IPV6, IPV6_PKTINFO, pktinfo)
275 s.sendto(UDP_PAYLOAD, (net_test.IPV6_ADDR, 53, 0xdead, 0))
277 sport = s.getsockname()[1]
295 s = net_test.UDPSocket(family)
299 net_test.SetFlowLabel(s, net_test.IPV6_ADDR, 0xbeef)
314 s.setsockopt(net_test.SOL_IP, IP_TTL, 39)
315 s.setsockopt(net_test.SOL_IP, IP_TOS, 0x83)
318 self.SendOnNetid(version, s, dstaddr, 53, netid, UDP_PAYLOAD, cmsgs)
320 sport = s.getsockname()[1]
436 s, _ = listensocket.accept()
442 s.send(UDP_PAYLOAD)
451 mark = self.GetSocketMark(s)
454 s.close()
785 s = net_test.UDPSocket(AF_INET6)
786 self.SetSocketMark(s, netid)
788 self.assertTrue(s.sendto(UDP_PAYLOAD, (net_test.IPV6_ADDR, 1234)))
790 self.assertRaisesErrno(errno.ENETUNREACH, s.sendto, UDP_PAYLOAD,
808 s = net_test.UDPSocket(AF_INET6)
810 self.BindToDevice(s, iface)
815 s.sendto(UDP_PAYLOAD, (dstaddr, 53))
836 sport = s.getsockname()[1]
864 def GetSocketMTU(self, version, s): argument
866 ip6_mtuinfo = s.getsockopt(net_test.SOL_IPV6, csocket.IPV6_PATHMTU, 32)
870 return s.getsockopt(net_test.SOL_IP, csocket.IP_MTU)
872 def DisableFragmentationAndReportErrors(self, version, s): argument
874 s.setsockopt(net_test.SOL_IP, csocket.IP_MTU_DISCOVER,
876 s.setsockopt(net_test.SOL_IP, net_test.IP_RECVERR, 1)
878 s.setsockopt(net_test.SOL_IPV6, csocket.IPV6_DONTFRAG, 1)
879 s.setsockopt(net_test.SOL_IPV6, net_test.IPV6_RECVERR, 1)
883 def SendBigPacket(version, s, dstaddr, netid, payload): argument
885 s.send(payload)
887 self.SendOnNetid(version, s, dstaddr, 1234, netid, payload, [])
891 s = self.BuildSocket(version, net_test.UDPSocket, netid, mode)
892 self.DisableFragmentationAndReportErrors(version, s)
910 s.connect((dstaddr, 1234))
915 SendBigPacket(version, s, dstaddr, netid, payload)
926 SendBigPacket, version, s, dstaddr, netid, payload)
931 self.assertEquals(packets.PTB_MTU, self.GetSocketMTU(version, s))
933 s.close()
1182 s = socket(AF_INET6, SOCK_DGRAM, 0)
1186 s.sendto, "foo", (remoteaddr, 53))
1188 self.assertEquals(len("foo"), s.sendto("foo", (remoteaddr, 53)))
1194 os.fchown(s.fileno(), uid, -1)
1196 os.fchown(s.fileno(), -1, -1)
1198 os.fchown(s.fileno(), -1, 12345)
1200 os.fchmod(s.fileno(), 0777)
1202 os.fchown(s.fileno(), 0, -1)