def get(self, iface):
    ret = {}
    entry = dnet_intf_entry()
    entry.intf_name = iface.encode('ascii')
    entry.intf_len = sizeof(entry)
    r = dnet_intf_get(self.intf, byref(entry))
    if r < 0:
      return {}
    ret['addr6'] = []
    for i in range(entry.intf_alias_num):
      if entry.intf_alias_addrs[i].addr_type == ADDR_TYPE_IP6:
        ret['addr6'].append(bytes(entry.intf_alias_addrs[i].data8[:16]))
    ret['type'] = entry.intf_type
    ret['addr'] = bytes(entry.intf_addr.data8[:4])
    ret['link_addr'] = bytes(entry.intf_link_addr.data8[:6])
    return ret
dataset/ETHPy150Open phaethon/scapy/scapy/arch/cdnet.py/dnet_intf.get/original