Get all Lan interfaces
@return models\LAN\LanInterface
334005
public function getBrowsableInterfaces(){
        $rest = $this->getService( self::API_LAN_BROWSER_INTERFACES);
        $rest->GET();

        return $rest->getResultAsArray( models\LAN\LanInterface::class);
    }
488884
public function getHostsFromInterfaceName( $lanInterfaceId){
        $service = sprintf( self::API_LAN_BROWSER_INTERFACE, $lanInterfaceId);
        $rest = $this->getService( $service);
        $rest->GET();

        return $rest->getResultAsArray( models\LAN\LanHost::class);
    }
772300
public function getAllServices()
    {
        $result = array();
        foreach ($this->getExtensions() as $handle) {
            $result[$handle] = $this->getService($handle);
        }

        return $result;
    }
1250087
public function getOwnInterfaces()
    {
        $parent = $this->getParentClass();
        if ($parent !== false) {
            return array_diff_key($this->getInterfaces(), $parent->getInterfaces());
        } else {
            return $this->getInterfaces();
        }
    }
201517
def get_dns_servers(interface='Local Area Connection'):
    '''
    
    '''
    # remove any escape characters
    interface = interface.split('\\')
    interface = ''.join(interface)

    with salt.utils.winapi.Com():
        c = wmi.WMI()
        for iface in c.Win32_NetworkAdapter(NetEnabled=True):
            if interface == iface.NetConnectionID:
                iface_config = c.Win32_NetworkAdapterConfiguration(Index=iface.Index).pop()
                try:
                    return list(iface_config.DNSServerSearchOrder)
                except TypeError:
                    return []
    log.debug('Interface "%s" not found', interface)
    return False
33312
public static List<NetworkInterface> getNetworkInterfaces() {
        List<NetworkInterface> networkInterfaces = new LinkedList<NetworkInterface>();

        List<String> macs = getItems(EC2_METADATA_ROOT + "/network/interfaces/macs/");
        if (macs != null) {
            for (String mac : macs) {
                String key = mac.trim();
                if (key.endsWith("/")) {
                    key = key.substring(0, key.length() - 1);
                }
                networkInterfaces.add(new NetworkInterface(key));
            }
        }
        return networkInterfaces;
    }
1013741
protected function getConnectionData()
	{
		return [$this->associativeLocal => $this->model->getPkValue(), $this->shifter => strtolower($this->model->getModelName())];
	}
189319
def GetEnabledInterfaces():
  
  interfaces = []
  show_args = ['/c', 'netsh', 'show', 'interface']
  # pylint: disable=undefined-variable
  res = client_utils_common.Execute(
      'cmd', show_args, time_limit=-1, bypass_whitelist=True)
  pattern = re.compile(r'\s*')
  for line in res[0].split('\r\n'):  # res[0] is stdout.
    interface_info = pattern.split(line)
    if 'Enabled' in interface_info:
      interfaces.extend(interface_info[-1:])
  return interfaces
271859
function &interfaces()
    {
        $interfaces = NULL;
        foreach ($this->_classes as $name => $interface) {
            if ($interface->isInterface()) {
                $interfaces[$name] =& $this->_classes[$name];
            }
        }

        return $interfaces;
    }
865209
def get_interfaces(self):
        
        interfaces = self.xml.find('devices').iter('interface')
        iobjs = []
        for interface in interfaces:
            _type = interface.attrib['type']
            mac = interface.find('mac').attrib['address']
            source = interface.find('source').attrib[_type]
            model = interface.find('model').attrib['type']
            iobjs.append(NetworkInterface(_type, mac, source, model))
        return iobjs
1206996
def get_interfaces(zone, permanent=True):
    '''
    
    '''
    cmd = '--zone={0} --list-interfaces'.format(zone)

    if permanent:
        cmd += ' --permanent'

    return __firewall_cmd(cmd).split()
1070562
public function getConnections()
    {
        $connections = [];
        foreach ($this->getConnectionNames() as $name) {
            $connections[$name] = $this->getConnection($name);
        }

        return $connections;
    }
1222485
public function getDependencies()
    {
        $dependencies = [];
        if ($this->extendsClassDefinition && $this->extendsClassDefinition instanceof self) {
            $dependencies[] = $this->extendsClassDefinition;
        }

        foreach ($this->implementedInterfaceDefinitions as $interfaceDefinition) {
            if ($interfaceDefinition instanceof self) {
                $dependencies[] = $interfaceDefinition;
            }
        }

        return $dependencies;
    }
163642
public static Collection<NetworkInterface> getNetworkInterfaces() {
		Enumeration<NetworkInterface> networkInterfaces = null;
		try {
			networkInterfaces = NetworkInterface.getNetworkInterfaces();
		} catch (SocketException e) {
			return null;
		}

		return CollectionUtil.addAll(new ArrayList<NetworkInterface>(), networkInterfaces);
	}
185839
public function getAllIPAddresses()
    {
        list($start_ip, $end_ip) = $this->getIPAddressRangeAsInts();

        for ($ip = $start_ip; $ip <= $end_ip; $ip++) {
            yield long2ip($ip);
        }
    }
1354833
public function getAll() {
        $rest = $this->getService( self::API_WIFI_BSS);
        $rest->GET();

        return $rest->getResultAsArray( models\WiFi\Bss\Bss::class);
    }
115439
def interfaces():
    

    results = []
    if not sys.platform.startswith("win"):
        net_if_addrs = psutil.net_if_addrs()
        for interface in sorted(net_if_addrs.keys()):
            ip_address = ""
            mac_address = ""
            netmask = ""
            interface_type = "ethernet"
            for addr in net_if_addrs[interface]:
                # get the first available IPv4 address only
                if addr.family == socket.AF_INET:
                    ip_address = addr.address
                    netmask = addr.netmask
                if addr.family == psutil.AF_LINK:
                    mac_address = addr.address
            if interface.startswith("tap"):
                # found no way to reliably detect a TAP interface
                interface_type = "tap"
            results.append({"id": interface,
                            "name": interface,
                            "ip_address": ip_address,
                            "netmask": netmask,
                            "mac_address": mac_address,
                            "type": interface_type})
    else:
        try:
            service_installed = True
            if not _check_windows_service("npf") and not _check_windows_service("npcap"):
                service_installed = False
            else:
                results = get_windows_interfaces()
        except ImportError:
            message = "pywin32 module is not installed, please install it on the server to get the available interface names"
            raise aiohttp.web.HTTPInternalServerError(text=message)
        except Exception as e:
            log.error("uncaught exception {type}".format(type=type(e)), exc_info=1)
            raise aiohttp.web.HTTPInternalServerError(text="uncaught exception: {}".format(e))

        if service_installed is False:
            raise aiohttp.web.HTTPInternalServerError(text="The Winpcap or Npcap is not installed or running")

    # This interface have special behavior
    for result in results:
        result["special"] = False
        for special_interface in ("lo", "vmnet", "vboxnet", "docker", "lxcbr",
                                  "virbr", "ovs-system", "veth", "fw", "p2p",
                                  "bridge", "vmware", "virtualbox", "gns3"):
            if result["name"].lower().startswith(special_interface):
                result["special"] = True
        for special_interface in ("-nic"):
            if result["name"].lower().endswith(special_interface):
                result["special"] = True
    return results