components/cronet/tools/android_rndis_forwarder.py
def _FindDeviceRndisInterface(self):
    """Returns the name of the RNDIS network interface if present."""
    config = self._device.RunShellCommand(
        ['ip', '-o', 'link', 'show'], check_return=True)
    interfaces = [line.split(':')[1].strip() for line in config]
    candidates = [iface for iface in interfaces if re.match('rndis|usb', iface)]
    if candidates:
      candidates.sort()
      if len(candidates) == 2 and candidates[0].startswith('rndis') and \
          candidates[1].startswith('usb'):
        return candidates[0]
      assert len(candidates) == 1, 'Found more than one rndis device!'
      return candidates[0]
Returns the name of the RNDIS network interface if present.
Returns the name of the RNDIS network interface if present.
Returns the name of the RNDIS network interface if present .
def _FindDeviceRndisInterface(self):
    config = self._device.RunShellCommand(
        ['ip', '-o', 'link', 'show'], check_return=True)
    interfaces = [line.split(':')[1].strip() for line in config]
    candidates = [iface for iface in interfaces if re.match('rndis|usb', iface)]
    if candidates:
      candidates.sort()
      if len(candidates) == 2 and candidates[0].startswith('rndis') and \
          candidates[1].startswith('usb'):
        return candidates[0]
      assert len(candidates) == 1, 'Found more than one rndis device!'
      return candidates[0]
def _FindDeviceRndisInterface ( self ) : config = self . _device . RunShellCommand ( [ 'ip' , '-o' , 'link' , 'show' ] , check_return = True ) interfaces = [ line . split ( ':' ) [ 1 ] . strip ( ) for line in config ] candidates = [ iface for iface in interfaces if re . match ( 'rndis|usb' , iface ) ] if candidates : candidates . sort ( ) if len ( candidates ) == 2 and candidates [ 0 ] . startswith ( 'rndis' ) and candidates [ 1 ] . startswith ( 'usb' ) : return candidates [ 0 ] assert len ( candidates ) == 1 , 'Found more than one rndis device!' return candidates [ 0 ]
Returns the name of the RNDIS network interface if present.
Returns the name of the RNDIS network interface if present .
"""Returns the name of the RNDIS network interface if present."""
self