Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
DhcpClientProcess Class Reference

DhcpClientProcess handles the DHCP client process. More...

Inheritance diagram for DhcpClientProcess:
Process

Public Member Functions

void removePortDataEntry (string)
 Runs DHCP on the specified port. More...
 
void addPortDataEntry (string)
 
bool isPortExisted (string)
 Runs DHCP on the specified port. More...
 
void dhcpRun (string)
 Start dhcp process on the specified port. More...
 
bool dhcpRelease (string)
 Releases the DHCP lease from the specified port. More...
 
bool resetDhcpConfOn (string)
 Resets the DHCP configuration on the specified port. More...
 
void dhcpSucceed (QString, string, ip, ip)
 This event is emitted when the process receives a DHCP acknowledgement packet. More...
 
void dhcpConfigured (QString, string, bool)
 This event is emitted when the process has determined that DHCP is configured. More...
 
void dhcpFailed (QString, string)
 This event is emitted when a DHCP request fails. More...
 
DhcpClientPortData getDataOfPort (string)
 
- Public Member Functions inherited from Process
Device getOwnerDevice ()
 Returns the device for this process. More...
 

Detailed Description

DhcpClientProcess handles the DHCP client process.

Member Function Documentation

◆ addPortDataEntry()

void DhcpClientProcess::addPortDataEntry ( string  )

◆ dhcpConfigured()

void DhcpClientProcess::dhcpConfigured ( QString  ,
string  ,
bool   
)

This event is emitted when the process has determined that DHCP is configured.

  • deviceName, the name of the device.
  • portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
  • isConfigured, true if DHCP is configured, otherwise false.

IPC event.

◆ dhcpFailed()

void DhcpClientProcess::dhcpFailed ( QString  ,
string   
)

This event is emitted when a DHCP request fails.

  • deviceName, the name of the device.
  • portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0

IPC event.

◆ dhcpRelease()

bool DhcpClientProcess::dhcpRelease ( string  )

Releases the DHCP lease from the specified port.

Parameters
portName,portNamecan be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
Returns
bool, true if successful, otherwise false.

◆ dhcpRun()

void DhcpClientProcess::dhcpRun ( string  )

Start dhcp process on the specified port.

Parameters
portName,portNamecan be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0

◆ dhcpSucceed()

void DhcpClientProcess::dhcpSucceed ( QString  ,
string  ,
ip  ,
ip   
)

This event is emitted when the process receives a DHCP acknowledgement packet.

  • deviceName, the name of the device.
  • portName, portName can be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
  • newip, the IP address that was leased.
  • newmask, the subnet mask that was leased.

IPC event.

◆ getDataOfPort()

DhcpClientPortData DhcpClientProcess::getDataOfPort ( string  )

◆ isPortExisted()

bool DhcpClientProcess::isPortExisted ( string  )

Runs DHCP on the specified port.

Parameters
portName,portNamecan be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
Returns
bool, true if successful, otherwise false.

◆ removePortDataEntry()

void DhcpClientProcess::removePortDataEntry ( string  )

Runs DHCP on the specified port.

Parameters
portName,portNamecan be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0

◆ resetDhcpConfOn()

bool DhcpClientProcess::resetDhcpConfOn ( string  )

Resets the DHCP configuration on the specified port.

Parameters
portName,portNamecan be one of the following plus a port number where appropriate: Console, Aux, Ethernet, FastEthernet, GigabitEthernet, Serial, Wireless, Loopback, Vlan, Modem, Coaxial, Rs232, Async. Example: FastEthernet0/0
Returns
bool, true if successful, otherwise false.

The documentation for this class was generated from the following file: