Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::wnettools::Interface::StartDHCP (   self  )  [inherited]

Start the DHCP client to obtain an IP address.

Returns:
A string representing the result of the DHCP command.  See
_check_dhcp_result for the possible values.

Definition at line 479 of file wnettools.py.

00479                        :
        """ Start the DHCP client to obtain an IP address.
        
        Returns:
        A string representing the result of the DHCP command.  See
        _check_dhcp_result for the possible values.
        
        """
        if not self.iface: return False
        
        cmd = self.DHCP_CMD + " " + self.iface
        if self.verbose: print cmd
        pipe = misc.Run(cmd, include_stderr=True, return_pipe=True)
        
        DHCP_CLIENT = self.DHCP_CLIENT        
        if DHCP_CLIENT == misc.DHCLIENT:
            return self._parse_dhclient(pipe)
        elif DHCP_CLIENT == misc.PUMP:
            return self._parse_pump(pipe)
        elif DHCP_CLIENT == misc.DHCPCD:
            return self._parse_dhcpcd(pipe)
    
    def ReleaseDHCP(self):


Generated by  Doxygen 1.6.0   Back to index