components/cronet/tools/android_rndis_forwarder.py
def _GetHostAddresses(self, iface):
    """Returns the IP addresses on host's interfaces, breaking out |iface|."""
    interface_list = self._EnumerateHostInterfaces()
    addresses = []
    iface_address = None
    found_iface = False
    for line in interface_list:
      if not line.startswith((' ', '\t')):
        found_iface = iface in line
      match = re.search(r'(?<=inet )\S+', line)
      if match:
        address = match.group(0)
        if '/' in address:
          address = self._IpPrefix2AddressMask(address)
        else:
          match = re.search(r'(?<=netmask )\S+', line)
          address = self._Ip2Long(address), int(match.group(0), 16)
        if found_iface:
          assert not iface_address, (
            'Found %s twice when parsing host interfaces.' % iface)
          iface_address = address
        else:
          addresses.append(address)
    return addresses, iface_address
Returns the IP addresses on host's interfaces, breaking out |iface|.
Returns the IP addresses on host's interfaces, breaking out |iface|.
Returns the IP addresses on host ' s interfaces breaking out |iface| .
def _GetHostAddresses(self, iface):
    interface_list = self._EnumerateHostInterfaces()
    addresses = []
    iface_address = None
    found_iface = False
    for line in interface_list:
      if not line.startswith((' ', '\t')):
        found_iface = iface in line
      match = re.search(r'(?<=inet )\S+', line)
      if match:
        address = match.group(0)
        if '/' in address:
          address = self._IpPrefix2AddressMask(address)
        else:
          match = re.search(r'(?<=netmask )\S+', line)
          address = self._Ip2Long(address), int(match.group(0), 16)
        if found_iface:
          assert not iface_address, (
            'Found %s twice when parsing host interfaces.' % iface)
          iface_address = address
        else:
          addresses.append(address)
    return addresses, iface_address
def _GetHostAddresses ( self , iface ) : interface_list = self . _EnumerateHostInterfaces ( ) addresses = [ ] iface_address = None found_iface = False for line in interface_list : if not line . startswith ( ( ' ' , '\t' ) ) : found_iface = iface in line match = re . search ( r'(?<=inet )\S+' , line ) if match : address = match . group ( 0 ) if '/' in address : address = self . _IpPrefix2AddressMask ( address ) else : match = re . search ( r'(?<=netmask )\S+' , line ) address = self . _Ip2Long ( address ) , int ( match . group ( 0 ) , 16 ) if found_iface : assert not iface_address , ( 'Found %s twice when parsing host interfaces.' % iface ) iface_address = address else : addresses . append ( address ) return addresses , iface_address
Returns the IP addresses on host's interfaces, breaking out |iface|.
Returns the IP addresses on host ' s interfaces breaking out |iface| .
"""Returns the IP addresses on host's interfaces, breaking out |iface|."""
self
iface