Lines Matching refs:iff
104 def get_if_raw_hwaddr(iff): argument
105 return struct.unpack("16xh6s8x",get_if(iff,SIOCGIFHWADDR))
107 def get_if_raw_addr(iff): argument
109 return get_if(iff, SIOCGIFADDR)[20:24]
167 def set_promisc(s,iff,val=1): argument
168 mreq = struct.pack("IHH8s", get_if_index(iff), PACKET_MR_PROMISC, 0, b"")
248 iff,dst,gw,flags,x,x,metric,msk,x,x,x = l.split()
255 ifreq = ioctl(s, SIOCGIFADDR,struct.pack("16s16x", iff.encode("utf8")))
263 warning("Interface %s: unkown address family (%i)", iff, addrfamily)
274 tmp_route = get_alias_address(iff, dst_int, gw_str, metric)
278 routes.append((dst_int, msk_int, gw_str, iff, ifaddr, metric))
281 routes.append((dst_int, msk_int, gw_str, iff, ifaddr, metric))
368 def get_if_index(iff): argument
369 return int(struct.unpack("I",get_if(iff, SIOCGIFINDEX)[16:20])[0])
420 self.iff = get_if_list()
422 self.iff = iface
424 self.iff = [iface]
425 for i in self.iff:
432 for i in self.iff:
466 iff,a,gw = x.route()
467 if iff is None:
468 iff = conf.iface
469 sdto = (iff, self.type)
474 sdto = (iff, conf.l3types[type(x)])
577 self.iff = get_if_list()
579 self.iff = iface
581 self.iff = [iface]
583 for i in self.iff:
589 for i in self.iff: