byteblowerll.byteblower.DHCPv4Protocol

class byteblowerll.byteblower.DHCPv4Protocol(*args, **kwargs)

The DHCPv4Protocol is the entry point to configure the DHCP client behavior of a ByteBlowerPort.

A ByteBlowerPort can perform DHCP the get an IP address, gateway and netmask. Currently, no other options are supported but this will change in the future.

Users can configure the timing parameters used in the different stages of the DHCP protocol: - Discover

During the discover stage the ByteBlower port will broadcast discover messages.
  • Request

    Once one or more offers are received the ByteBlower port will broadcast its request message. If acknowledge the ByteBlower port will start using this address.

  • Renew

    When half of the lease time received in the acknowledge message of the request has passed, a ByteBlowerPort will sent a renew message to the server to extend its lease.

Although DHCP allows clients to use unicast messages in the Request stage, ByteBlower currently only supports broadcast messages in this stage.

A DHCPv4Protocol object also supports different retransmission strategies:

Fixed
This policy will use the same timeout value for each timeout.
RFCSuggested
This policy implements the policy described in :rfc:2131.
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

BroadcastFlagEnable(inValue) Enables the DHCP broadcast flag
BroadcastFlagIsEnabled() Returns whether or not the broadcast flag is enabled.
DHCPv4SessionInfoGet() Returns the sessionInfo object for this DHCP Session.
DescriptionGet(*args) Gets a textual description for the current object
DiscoverInitialTimeoutGet() Returns the current <InitialTimeout> for the DHCP discover stage.
DiscoverInitialTimeoutSet(inValue) Sets the <InitialTimeout> for the DHCP discover stage.
DiscoverMaxRetriesGet() Returns the current maximum retries for the DHCP discover stage.
DiscoverMaxRetriesSet(inValue) Sets the maximum retries for the DHCP discover stage.
ParentGet() Returns the parent object.
Perform() Start DHCP and wait for the result.
PerformAsync() Will start DHCP and return immediately.
Refresh() Retrieves the latest data from the server for this object.
Release() Release the DHCP lease.
ReleaseEnable(inValue) Enable/disable sending DHCP release during destruction.
ReleaseIsEnabled() Return whether sending DHCP release during destruction is enabled.
RequestInitialTimeoutGet() Returns the current <InitialTimeout> for the DHCP request stage.
RequestInitialTimeoutSet(inTime) Sets the <InitialTimeout> for the DHCP request stage.
RequestMaxRetriesGet() Returns the current maximum retries for the DHCP Request stage.
RequestMaxRetriesSet(inValue) Sets the maximum retries for the DHCP Request stage.
RetransmissionPolicyGet()

Deprecated since version TODO.

RetransmissionPolicySet(policy)

Deprecated since version TODO.

__init__(*args, **kwargs) Initialize self.

Attributes

thisown The membership flag