Lines Matching refs:s
116 def SetSocketTos(s, tos): argument
117 level = {AF_INET: SOL_IP, AF_INET6: SOL_IPV6}[s.family]
118 option = {AF_INET: IP_TOS, AF_INET6: IPV6_TCLASS}[s.family]
119 s.setsockopt(level, option, tos)
129 s = socket(family, sock_type, protocol)
130 csocket.SetSocketTimeout(s, 5000)
131 return s
148 s = Socket(family, SOCK_STREAM, IPPROTO_TCP)
149 SetNonBlocking(s.fileno())
150 return s
166 s = Socket(family, SOCK_RAW, IPPROTO_GRE)
167 return s
210 s = UDPSocket(AF_INET)
212 ifr = fcntl.ioctl(s, scapy.SIOCGIFINDEX, ifr)
217 s = UDPSocket(AF_INET)
223 fcntl.ioctl(s, SIOCSIFHWADDR, ifr)
227 s = UDPSocket(AF_INET)
229 ifr = fcntl.ioctl(s, scapy.SIOCGIFFLAGS, ifr)
236 ifr = fcntl.ioctl(s, scapy.SIOCSIFFLAGS, ifr)
276 address = [s for s in address.strip().split(" ") if s]
289 route = [s for s in route.strip().split(" ") if s]
298 route = [s for s in route.strip().split("\t") if s]
337 def SetFlowLabel(s, addr, label): argument
339 s.setsockopt(SOL_IPV6, IPV6_FLOWLABEL_MGR, opt)