components/cronet/tools/android_rndis_forwarder.py
def _CheckEnableRndis(self, force):
    """Enables the RNDIS network interface, retrying if necessary.
    Args:
      force: Disable RNDIS first, even if it appears already enabled.
    Returns:
      device_iface: RNDIS interface name on the device
      host_iface: corresponding interface name on the host
    """
    for _ in range(3):
      if not force:
        device_iface = self._FindDeviceRndisInterface()
        if device_iface:
          device_mac_address = self._FindDeviceRndisMacAddress(device_iface)
          host_iface = self._FindHostRndisInterface(device_mac_address)
          if host_iface:
            return device_iface, host_iface
      self._DisableRndis()
      self._EnableRndis()
      force = False
    raise Exception('Could not enable RNDIS, giving up.')
Enables the RNDIS network interface, retrying if necessary.
    Args:
      force: Disable RNDIS first, even if it appears already enabled.
    Returns:
      device_iface: RNDIS interface name on the device
      host_iface: corresponding interface name on the host
    
Enables the RNDIS network interface, retrying if necessary.
Enables the RNDIS network interface retrying if necessary .
def _CheckEnableRndis(self, force):
    for _ in range(3):
      if not force:
        device_iface = self._FindDeviceRndisInterface()
        if device_iface:
          device_mac_address = self._FindDeviceRndisMacAddress(device_iface)
          host_iface = self._FindHostRndisInterface(device_mac_address)
          if host_iface:
            return device_iface, host_iface
      self._DisableRndis()
      self._EnableRndis()
      force = False
    raise Exception('Could not enable RNDIS, giving up.')
def _CheckEnableRndis ( self , force ) : for _ in range ( 3 ) : if not force : device_iface = self . _FindDeviceRndisInterface ( ) if device_iface : device_mac_address = self . _FindDeviceRndisMacAddress ( device_iface ) host_iface = self . _FindHostRndisInterface ( device_mac_address ) if host_iface : return device_iface , host_iface self . _DisableRndis ( ) self . _EnableRndis ( ) force = False raise Exception ( 'Could not enable RNDIS, giving up.' )
Enables the RNDIS network interface, retrying if necessary.
Enables the RNDIS network interface retrying if necessary .
"""Enables the RNDIS network interface, retrying if necessary.
    Args:
      force: Disable RNDIS first, even if it appears already enabled.
    Returns:
      device_iface: RNDIS interface name on the device
      host_iface: corresponding interface name on the host
    """
RNDIS interface name on the device
host_iface: corresponding interface name on the host
RNDIS interface name on the device host_iface : corresponding interface name on the host
device_iface
self
force
Disable RNDIS first, even if it appears already enabled.
Disable RNDIS first even if it appears already enabled .