}\r
\r
//\r
- // Install the Dhcp4ServiceBinding Protocol onto ControlerHandle\r
+ // Install the Dhcp4ServiceBinding Protocol onto ControllerHandle\r
//\r
Status = gBS->InstallMultipleProtocolInterfaces (\r
&ControllerHandle,\r
DhcpSb = DHCP_SERVICE_FROM_THIS (ServiceBinding);\r
if (!IsListEmpty (&DhcpSb->Children)) {\r
//\r
- // Destroy all the children instances before destory the service.\r
+ // Destroy all the children instances before destroy the service.\r
//\r
List = &DhcpSb->Children;\r
Status = NetDestroyLinkList (\r
then a new handle is created. If it is a pointer to an existing UEFI handle,\r
then the protocol is added to the existing UEFI handle.\r
\r
- @retval EFI_SUCCES The protocol was added to ChildHandle.\r
+ @retval EFI_SUCCESS The protocol was added to ChildHandle.\r
@retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r
the child\r
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
@param ChildHandle Handle of the child to destroy\r
\r
- @retval EFI_SUCCES The protocol was removed from ChildHandle.\r
+ @retval EFI_SUCCESS The protocol was removed from ChildHandle.\r
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r
@retval EFI_INVALID_PARAMETER Child handle is NULL.\r
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r
then a new handle is created. If it is a pointer to an existing UEFI handle,\r
then the protocol is added to the existing UEFI handle.\r
\r
- @retval EFI_SUCCES The protocol was added to ChildHandle.\r
+ @retval EFI_SUCCESS The protocol was added to ChildHandle.\r
@retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r
the child\r
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
@param ChildHandle Handle of the child to destroy\r
\r
- @retval EFI_SUCCES The protocol was removed from ChildHandle.\r
+ @retval EFI_SUCCESS The protocol was removed from ChildHandle.\r
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed.\r
@retval EFI_INVALID_PARAMETER Child handle is NULL.\r
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle\r
not NULL. Otherwise, the state was left unchanged.\r
@retval EFI_ACCESS_DENIED This instance of the EFI DHCPv4 Protocol driver was not in the\r
Dhcp4Stopped, Dhcp4Init, Dhcp4InitReboot, or Dhcp4Bound state;\r
- Or onother instance of this EFI DHCPv4 Protocol driver is already\r
+ Or another instance of this EFI DHCPv4 Protocol driver is already\r
in a valid configured state.\r
@retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
not NULL. Otherwise, the state was left unchanged.\r
@retval EFI_ACCESS_DENIED This instance of the EFI DHCPv4 Protocol driver was not in the\r
Dhcp4Stopped, Dhcp4Init, Dhcp4InitReboot, or Dhcp4Bound state;\r
- Or onother instance of this EFI DHCPv4 Protocol driver is already\r
+ Or another instance of this EFI DHCPv4 Protocol driver is already\r
in a valid configured state.\r
@retval EFI_INVALID_PARAMETER Some parameter is NULL.\r
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
}\r
\r
//\r
- // Check Media Satus.\r
+ // Check Media Status.\r
//\r
MediaStatus = EFI_SUCCESS;\r
NetLibDetectMediaWaitTimeout (DhcpSb->Controller, DHCP_CHECK_MEDIA_WAITING_TIME, &MediaStatus);\r
is, all the option value that we care.\r
\r
@retval EFI_SUCCESS The packet is successfully processed.\r
- @retval Others Some error occured.\r
+ @retval Others Some error occurred.\r
\r
**/\r
EFI_STATUS\r
\r
//\r
// Call the user's callback. The action according to the return is as:\r
- // 1. EFI_SUCESS: stop waiting for more offers, select the offer now\r
+ // 1. EFI_SUCCESS: stop waiting for more offers, select the offer now\r
// 2. EFI_NOT_READY: wait for more offers\r
// 3. EFI_ABORTED: abort the address acquiring.\r
//\r
is, all the option value that we care.\r
\r
@retval EFI_SUCCESS The packet is successfully processed.\r
- @retval Others Some error occured.\r
+ @retval Others Some error occurred.\r
\r
**/\r
EFI_STATUS\r
is, all the option value that we care.\r
\r
@retval EFI_SUCCESS The packet is successfully processed.\r
- @retval Others Some error occured.\r
+ @retval Others Some error occurred.\r
\r
**/\r
EFI_STATUS\r
is, all the option value that we care.\r
\r
@retval EFI_SUCCESS The packet is successfully processed.\r
- @retval Others Some error occured.\r
+ @retval Others Some error occurred.\r
\r
**/\r
EFI_STATUS\r
/**\r
Each DHCP service has three timer. Two of them are count down timer.\r
One for the packet retransmission. The other is to collect the offers.\r
- The third timer increaments the lease life which is compared to T1, T2,\r
+ The third timer increments the lease life which is compared to T1, T2,\r
and lease to determine the time to renew and rebind the lease.\r
DhcpOnTimerTick will be called once every second.\r
\r
/**\r
Each DHCP service has three timer. Two of them are count down timer.\r
One for the packet retransmission. The other is to collect the offers.\r
- The third timer increaments the lease life which is compared to T1, T2,\r
+ The third timer increments the lease life which is compared to T1, T2,\r
and lease to determine the time to renew and rebind the lease.\r
DhcpOnTimerTick will be called once every second.\r
\r
}\r
\r
//\r
- // Validate the occurance of the option unit is with in [MinOccur, MaxOccur]\r
+ // Validate the occurrence of the option unit is with in [MinOccur, MaxOccur]\r
//\r
Occur = Len / Unit;\r
\r
@param[out] Para The variable to save the interested parameter\r
\r
@retval EFI_SUCCESS The DHCP option is successfully extracted.\r
- @retval EFI_INVALID_PARAMETER The DHCP option is malformatted\r
+ @retval EFI_INVALID_PARAMETER The DHCP option is mal-formatted\r
\r
**/\r
EFI_STATUS\r
option.\r
\r
@retval EFI_SUCCESS All the options are valid\r
- @retval EFI_INVALID_PARAMETER The options are malformatted.\r
+ @retval EFI_INVALID_PARAMETER The options are mal-formatted.\r
\r
**/\r
EFI_STATUS\r
found\r
@param[in] Context The opaque parameter for Check\r
\r
- @retval EFI_SUCCESS The DHCP packet's options are well formated\r
- @retval EFI_INVALID_PARAMETER The DHCP packet's options are not well formated\r
+ @retval EFI_SUCCESS The DHCP packet's options are well formatted\r
+ @retval EFI_INVALID_PARAMETER The DHCP packet's options are not well formatted\r
\r
**/\r
EFI_STATUS\r
\r
/**\r
Call back function to DhcpIterateOptions to compute each option's\r
- length. It just adds the data length of all the occurances of this\r
+ length. It just adds the data length of all the occurrences of this\r
Tag. Context is an array of 256 DHCP_OPTION_COUNT.\r
\r
@param[in] Tag The current option to check\r
\r
@param[in] Tag The option to consolidate its data\r
@param[in] Len The length of option data\r
- @param[in] Data The data of the option's current occurance\r
+ @param[in] Data The data of the option's current occurrence\r
@param[in] Context The context, which is DHCP_OPTION_CONTEXT. This\r
array is just a wrap to pass THREE parameters.\r
\r
/**\r
Parse the options of a DHCP packet. It supports RFC 3396: Encoding\r
Long Options in DHCP. That is, it will combine all the option value\r
- of all the occurances of each option.\r
- A little bit of implemenation:\r
+ of all the occurrences of each option.\r
+ A little bit of implementation:\r
It adopts the "Key indexed counting" algorithm. First, it allocates\r
an array of 256 DHCP_OPTION_COUNTs because DHCP option tag is encoded\r
as a UINT8. It then iterates the DHCP packet to get data length of\r
\r
@retval EFI_NOT_FOUND Cannot find any option.\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.\r
- @retval EFI_INVALID_PARAMETER The options are malformatted\r
+ @retval EFI_INVALID_PARAMETER The options are mal-formatted\r
@retval EFI_SUCCESS The options are parsed into OptionPoint\r
\r
**/\r
@param[out] Para The variable to save the DHCP parameters.\r
\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to validate the packet.\r
- @retval EFI_INVALID_PARAMETER The options are malformatted\r
+ @retval EFI_INVALID_PARAMETER The options are mal-formatted\r
@retval EFI_SUCCESS The options are parsed into OptionPoint\r
\r
**/\r
function.\r
\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory\r
- @retval EFI_INVALID_PARAMETER The options in SeekPacket are malformatted\r
+ @retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formatted\r
@retval EFI_SUCCESS The packet is build.\r
\r
**/\r
UINT8 *Buf;\r
\r
//\r
- // Use an array of DHCP_OPTION to mark the existance\r
+ // Use an array of DHCP_OPTION to mark the existence\r
// and position of each valid options.\r
//\r
Mark = AllocatePool (sizeof (DHCP_OPTION) * DHCP_MAX_OPTIONS);\r
///\r
/// Structure used to describe and validate the format of DHCP options.\r
/// Type is the options' data type, such as DHCP_OPTION_INT8. MinOccur\r
-/// is the minium occurance of this data type. MaxOccur is defined\r
+/// is the minimum occurrence of this data type. MaxOccur is defined\r
/// similarly. If MaxOccur is -1, it means that there is no limit on the\r
-/// maximum occurance. Alert tells whether DHCP client should further\r
+/// maximum occurrence. Alert tells whether DHCP client should further\r
/// inspect the option to parse DHCP_PARAMETER.\r
///\r
typedef struct {\r
found\r
@param[in] Context The opaque parameter for Check\r
\r
- @retval EFI_SUCCESS The DHCP packet's options are well formated\r
- @retval EFI_INVALID_PARAMETER The DHCP packet's options are not well formated\r
+ @retval EFI_SUCCESS The DHCP packet's options are well formatted\r
+ @retval EFI_INVALID_PARAMETER The DHCP packet's options are not well formatted\r
\r
**/\r
EFI_STATUS\r
@param[out] Para The variable to save the DHCP parameters.\r
\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to validate the packet.\r
- @retval EFI_INVALID_PARAMETER The options are malformatted\r
+ @retval EFI_INVALID_PARAMETER The options are mal-formatted\r
@retval EFI_SUCCESS The options are parsed into OptionPoint\r
\r
**/\r
/**\r
Parse the options of a DHCP packet. It supports RFC 3396: Encoding\r
Long Options in DHCP. That is, it will combine all the option value\r
- of all the occurances of each option.\r
- A little bit of implemenation:\r
+ of all the occurrences of each option.\r
+ A little bit of implementation:\r
It adopts the "Key indexed counting" algorithm. First, it allocates\r
an array of 256 DHCP_OPTION_COUNTs because DHCP option tag is encoded\r
as a UINT8. It then iterates the DHCP packet to get data length of\r
\r
@retval EFI_NOT_FOUND Cannot find any option.\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory to parse the packet.\r
- @retval EFI_INVALID_PARAMETER The options are malformatted\r
+ @retval EFI_INVALID_PARAMETER The options are mal-formatted\r
@retval EFI_SUCCESS The options are parsed into OptionPoint\r
\r
**/\r
function.\r
\r
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory\r
- @retval EFI_INVALID_PARAMETER The options in SeekPacket are malformatted\r
+ @retval EFI_INVALID_PARAMETER The options in SeekPacket are mal-formatted\r
@retval EFI_SUCCESS The packet is build.\r
\r
**/\r