} EFI_DHCP4_EVENT;\r
\r
/**\r
- Callback routine\r
+ Callback routine.\r
+ \r
+ EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver\r
+ to intercept events that occurred in the configuration process. This structure\r
+ provides advanced control of each state transition of the DHCP process. The\r
+ returned status code determines the behavior of the EFI DHCPv4 Protocol driver.\r
+ There are three possible returned values, which are described in the following\r
+ table.\r
\r
@param This Pointer to the EFI DHCPv4 Protocol instance that is used to\r
configure this callback function.\r
\r
/**\r
Returns the current operating mode and cached data packet for the EFI DHCPv4 Protocol driver.\r
+ \r
+ The GetModeData() function returns the current operating mode and cached data\r
+ packet for the EFI DHCPv4 Protocol driver.\r
\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
@param Dhcp4ModeData Pointer to storage for the EFI_DHCP4_MODE_DATA structure.\r
/**\r
Initializes, changes, or resets the operational settings for the EFI DHCPv4 Protocol driver.\r
\r
+ The Configure() function is used to initialize, change, or reset the operational\r
+ settings of the EFI DHCPv4 Protocol driver for the communication device on which\r
+ the EFI DHCPv4 Service Binding Protocol is installed. This function can be\r
+ successfully called only if both of the following are true:\r
+ * This instance of the EFI DHCPv4 Protocol driver is in the Dhcp4Stopped, Dhcp4Init,\r
+ Dhcp4InitReboot, or Dhcp4Bound states.\r
+ * No other EFI DHCPv4 Protocol driver instance that is controlled by this EFI\r
+ DHCPv4 Service Binding Protocol driver instance has configured this EFI DHCPv4\r
+ Protocol driver.\r
+ When this driver is in the Dhcp4Stopped state, it can transfer into one of the\r
+ following two possible initial states:\r
+ * Dhcp4Init\r
+ * Dhcp4InitReboot\r
+ The driver can transfer into these states by calling Configure() with a non-NULL\r
+ Dhcp4CfgData. The driver will transfer into the appropriate state based on the\r
+ supplied client network address in the ClientAddress parameter and DHCP options\r
+ in the OptionList parameter as described in RFC 2131.\r
+ When Configure() is called successfully while Dhcp4CfgData is set to NULL, the\r
+ default configuring data will be reset in the EFI DHCPv4 Protocol driver and\r
+ the state of the EFI DHCPv4 Protocol driver will not be changed. If one instance\r
+ wants to make it possible for another instance to configure the EFI DHCPv4 Protocol\r
+ driver, it must call this function with Dhcp4CfgData set to NULL.\r
+\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
@param Dhcp4CfgData Pointer to the EFI_DHCP4_CONFIG_DATA.\r
\r
/**\r
Starts the DHCP configuration process.\r
\r
+ The Start() function starts the DHCP configuration process. This function can\r
+ be called only when the EFI DHCPv4 Protocol driver is in the Dhcp4Init or\r
+ Dhcp4InitReboot state.\r
+ If the DHCP process completes successfully, the state of the EFI DHCPv4 Protocol\r
+ driver will be transferred through Dhcp4Selecting and Dhcp4Requesting to the\r
+ Dhcp4Bound state. The CompletionEvent will then be signaled if it is not NULL.\r
+ If the process aborts, either by the user or by some unexpected network error,\r
+ the state is restored to the Dhcp4Init state. The Start() function can be called\r
+ again to restart the process.\r
+ Refer to RFC 2131 for precise state transitions during this process. At the\r
+ time when each event occurs in this process, the callback function that was set\r
+ by EFI_DHCP4_PROTOCOL.Configure() will be called and the user can take this\r
+ opportunity to control the process.\r
+ \r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
@param CompletionEvent If not NULL, indicates the event that will be signaled when the\r
EFI DHCPv4 Protocol driver is transferred into the\r
\r
/**\r
Extends the lease time by sending a request packet.\r
+ \r
+ The RenewRebind() function is used to manually extend the lease time when the\r
+ EFI DHCPv4 Protocol driver is in the Dhcp4Bound state and the lease time has\r
+ not expired yet. This function will send a request packet to the previously\r
+ found server (or to any server when RebindRequest is TRUE) and transfer the\r
+ state into the Dhcp4Renewing state (or Dhcp4Rebinding when RebindingRequest is\r
+ TRUE). When a response is received, the state is returned to Dhcp4Bound.\r
+ If no response is received before the try count is exceeded (the RequestTryCount\r
+ field that is specified in EFI_DHCP4_CONFIG_DATA) but before the lease time that\r
+ was issued by the previous server expires, the driver will return to the Dhcp4Bound\r
+ state and the previous configuration is restored. The outgoing and incoming packets\r
+ can be captured by the EFI_DHCP4_CALLBACK function.\r
\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
@param RebindRequest If TRUE, this function broadcasts the request packets and enters\r
/**\r
Releases the current address configuration.\r
\r
+ The Release() function releases the current configured IP address by doing either\r
+ of the following:\r
+ * Sending a DHCPRELEASE packet when the EFI DHCPv4 Protocol driver is in the\r
+ Dhcp4Bound state\r
+ * Setting the previously assigned IP address that was provided with the\r
+ EFI_DHCP4_PROTOCOL.Configure() function to 0.0.0.0 when the driver is in\r
+ Dhcp4InitReboot state\r
+ After a successful call to this function, the EFI DHCPv4 Protocol driver returns\r
+ to the Dhcp4Init state and any subsequent incoming packets will be discarded silently.\r
+\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
\r
@retval EFI_SUCCESS The EFI DHCPv4 Protocol driver is now in the Dhcp4Init phase.\r
\r
/**\r
Stops the current address configuration.\r
+ \r
+ The Stop() function is used to stop the DHCP configuration process. After this\r
+ function is called successfully, the EFI DHCPv4 Protocol driver is transferred\r
+ into the Dhcp4Stopped state. EFI_DHCP4_PROTOCOL.Configure() needs to be called\r
+ before DHCP configuration process can be started again. This function can be\r
+ called when the EFI DHCPv4 Protocol driver is in any state.\r
\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
\r
/**\r
Builds a DHCP packet, given the options to be appended or deleted or replaced.\r
\r
+ The Build() function is used to assemble a new packet from the original packet\r
+ by replacing or deleting existing options or appending new options. This function\r
+ does not change any state of the EFI DHCPv4 Protocol driver and can be used at\r
+ any time.\r
+\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
@param SeedPacket Initial packet to be used as a base for building new packet.\r
@param DeleteCount Number of opcodes in the DeleteList.\r
IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,\r
OUT EFI_DHCP4_PACKET **NewPacket\r
);\r
+\r
+\r
/**\r
Transmits a DHCP formatted packet and optionally waits for responses.\r
+ \r
+ The TransmitReceive() function is used to transmit a DHCP packet and optionally\r
+ wait for the response from servers. This function does not change the state of\r
+ the EFI DHCPv4 Protocol driver and thus can be used at any time.\r
\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
@param Token Pointer to the EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN structure.\r
\r
/**\r
Parses the packed DHCP option data.\r
+ \r
+ The Parse() function is used to retrieve the option list from a DHCP packet.\r
+ If *OptionCount isn’t zero, and there is enough space for all the DHCP options\r
+ in the Packet, each element of PacketOptionList is set to point to somewhere in\r
+ the Packet->Dhcp4.Option where a new DHCP option begins. If RFC3396 is supported,\r
+ the caller should reassemble the parsed DHCP options to get the finial result.\r
+ If *OptionCount is zero or there isn’t enough space for all of them, the number\r
+ of DHCP options in the Packet is returned in OptionCount.\r
\r
@param This Pointer to the EFI_DHCP4_PROTOCOL instance.\r
@param Packet Pointer to packet to be parsed.\r