Get the flags for an interface
428094
def getFlags (self, ifname):
        """"""
        try:
            result = self._ioctl(self.SIOCGIFFLAGS, self._getifreq(ifname))
        except IOError as msg:
            log.warn(LOG_CHECK,
                 "error getting flags for interface %r: %s", ifname, msg)
            return 0
        # extract the interface's flags from the return value
        flags, = struct.unpack('H', result[16:18])
        # return "UP" bit
        return flags
119544
def get_interfaces_status():
    """"""
    status = {}
    for driverClass in CLASSES:
        try:
            instance = driverClass()
            status[instance.get_name()] = instance.get_status()
        except Exception:
            raise
    return status
459150
private Class<? extends ClassFileDescriptor> getJavaType(int flags) {
        if (hasFlag(flags, Opcodes.ACC_ANNOTATION)) {
            return AnnotationTypeDescriptor.class;
        } else if (hasFlag(flags, Opcodes.ACC_ENUM)) {
            return EnumTypeDescriptor.class;
        } else if (hasFlag(flags, Opcodes.ACC_INTERFACE)) {
            return InterfaceTypeDescriptor.class;
        }
        return ClassTypeDescriptor.class;
    }
897095
def ip_interfaces():
    '''
    
    '''
    # Provides:
    #   ip_interfaces

    if salt.utils.platform.is_proxy():
        return {}

    ret = {}
    ifaces = _get_interfaces()
    for face in ifaces:
        iface_ips = []
        for inet in ifaces[face].get('inet', []):
            if 'address' in inet:
                iface_ips.append(inet['address'])
        for inet in ifaces[face].get('inet6', []):
            if 'address' in inet:
                iface_ips.append(inet['address'])
        for secondary in ifaces[face].get('secondary', []):
            if 'address' in secondary:
                iface_ips.append(secondary['address'])
        ret[face] = iface_ips
    return {'ip_interfaces': ret}
1116679
def getLinkerFlags(self, engineRoot, fmt, includeLibs=True):
		
		components = self.resolveRoot(self.ldFlags, engineRoot)
		if includeLibs == True:
			components.extend(self.prefixedStrings(self.linkerDirPrefix, self.linkDirs, engineRoot))
			components.extend(self.resolveRoot(self.libs, engineRoot))
		
		return Utility.join(fmt.delim, components, fmt.quotes)
180374
function AccessFlags() {
  let funcs = _.clone(FlagMethods);

  funcs.listFlags = (flags) => {
    return _.filter(_.map(FlagMethods, (maskFunc, name) => {
      return maskFunc(flags) ? name.substring(2).toLowerCase() : null;
    }));
  }

  return funcs;
}
214354
private static void getInterfaceMethods(Class<?> cls,
                                            Map<Signature, Method> sigs) {
        Class<?>[] intfs = cls.getInterfaces();
        for (int i=0; i < intfs.length; i++) {
            Class<?> intf = intfs[i];
            boolean done = getInternalPublicMethods(intf, sigs);
            if (!done) {
                getInterfaceMethods(intf, sigs);
            }
        }
    }
139102
def flags(self, index):
        

        if not index.isValid():
            return QtCore.Qt.NoItemFlags

        item = index.internalPointer()

        # return QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable |
        # QtCore.Qt.ItemIsDragEnabled
        return item.getFlags()
518812
def _render_our_module_flags(self, module, output_lines, prefix=''):
    """"""
    flags = self._get_flags_defined_by_module(module)
    if flags:
      self._render_module_flags(module, flags, output_lines, prefix)
391616
def get_by_flags(self, flags):
        """"""
        for reg in self._reg_infos:
            if reg.flags & flags == flags:
                yield reg
1141399
def get_compiler_flags(self):
        
        flags = 0

        for value in self.get_globals().values():
            if isinstance(value, __future__._Feature):
                flags |= value.compiler_flag

        return flags
1280034
def _get_flag(which, flags):
    
    res = [this for this in flags if this.is_equal(which)]
    if len(res) == 0:
        return None
    if len(res) == 1:
        return res[0]
    assert()
426612
function getNetworkInterfaces() {
    const ret = {};
    for (const macinfo of Object.values(macs)) {
        if (!macinfo.self) {
            continue;
        }
        ret[macinfo.net] = objCpy(macinfo);
    }
    return ret;
}
283971
def _getInterfaces(self):
        
        interfaces = {}

        interfacesPath = os.path.join("application", "interface")
        interfaceList = os.listdir(interfacesPath)

        for file in interfaceList:
            interfaceDirectoryPath = os.path.join(interfacesPath, file)
            if not os.path.isdir(interfaceDirectoryPath) or file.startswith("__") or file.startswith("."):
                continue

            interfaceName = ntpath.basename(interfaceDirectoryPath)
            interfacePath = os.path.join(interfaceDirectoryPath, interfaceName) + ".py"

            if not os.path.isfile(interfacePath):
                continue

            # importing interface
            interfaceSpec = importlib.util.spec_from_file_location(
                interfaceName,
                interfacePath
            )
            interface = importlib.util.module_from_spec(interfaceSpec)
            interfaceSpec.loader.exec_module(interface)

            # checking if there is an interface in the file
            if hasattr(interface, "Service"):
                # initializing interface
                interfaceInstance = interface.Service(self)
                interfaces[interfaceName] = interfaceInstance

        return interfaces
598855
def retrieve_flags(flag_dict, flag_filter):
    

    return [(flag, value) for flag, value in list(flag_dict.items()) if
            isinstance(flag, (str, bytes)) and flag.startswith(flag_filter)]
213826
def _get_flags(osm_obj):
    
    flags = []
    if osm_obj.visible:
        flags.append('visible')
    if osm_obj.user:
        flags.append('user: %s' % osm_obj.user)
    if osm_obj.timestamp:
        flags.append('timestamp: %s' % osm_obj.timestamp.isoformat())
    if osm_obj.tags:
        flags.append(', '.join('%s: %s' % (k, v)
                               for k, v in sorted(osm_obj.tags.items())))
    return flags
983666
def _get_interface_info(interface):
    '''
    
    '''
    adapter_mode = _get_adapter_mode_info(interface.name)
    if adapter_mode == 'disabled':
        return _get_base_interface_info(interface)
    elif adapter_mode == 'ethercat':
        return _get_ethercat_interface_info(interface)
    return _get_tcpip_interface_info(interface)