components/cronet/tools/android_rndis_forwarder.py
def _GetCurrentDns(self):
    """Returns current gateway, dns1, and dns2."""
    routes = self._device.RunShellCommand(
        ['cat', '/proc/net/route'], check_return=True)[1:]
    routes = [route.split() for route in routes]
    default_routes = [route[0] for route in routes if route[1] == '00000000']
    return (
      default_routes[0] if default_routes else None,
      self._device.GetProp('net.dns1'),
      self._device.GetProp('net.dns2'),
    )
Returns current gateway, dns1, and dns2.
Returns current gateway, dns1, and dns2.
Returns current gateway dns1 and dns2 .
def _GetCurrentDns(self):
    routes = self._device.RunShellCommand(
        ['cat', '/proc/net/route'], check_return=True)[1:]
    routes = [route.split() for route in routes]
    default_routes = [route[0] for route in routes if route[1] == '00000000']
    return (
      default_routes[0] if default_routes else None,
      self._device.GetProp('net.dns1'),
      self._device.GetProp('net.dns2'),
    )
def _GetCurrentDns ( self ) : routes = self . _device . RunShellCommand ( [ 'cat' , '/proc/net/route' ] , check_return = True ) [ 1 : ] routes = [ route . split ( ) for route in routes ] default_routes = [ route [ 0 ] for route in routes if route [ 1 ] == '00000000' ] return ( default_routes [ 0 ] if default_routes else None , self . _device . GetProp ( 'net.dns1' ) , self . _device . GetProp ( 'net.dns2' ) , )
Returns current gateway, dns1, and dns2.
Returns current gateway dns1 and dns2 .
"""Returns current gateway, dns1, and dns2."""
self