/** @file\r
Driver Binding functions and Service Binding functions\r
- implementationfor for Dhcp6 Driver.\r
+ implementation for Dhcp6 Driver.\r
\r
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
\r
//\r
// There is a timer for each Dhcp6 instance, which is used to track the\r
- // lease time of Ia and the retransmisson time of all sent packets.\r
+ // lease time of Ia and the retransmission time of all sent packets.\r
//\r
Status = gBS->CreateEvent (\r
EVT_NOTIFY_SIGNAL | EVT_TIMER,\r
DHCP6_SERVICE *Service;\r
\r
//\r
- // Check the Dhcp6 serivce whether already started.\r
+ // Check the Dhcp6 service whether already started.\r
//\r
Status = gBS->OpenProtocol (\r
ControllerHandle,\r
Service = DHCP6_SERVICE_FROM_THIS (ServiceBinding);\r
if (!IsListEmpty (&Service->Child)) {\r
//\r
- // Destroy all the children instances before destory the service.\r
+ // Destroy all the children instances before destroy the service.\r
//\r
List = &Service->Child;\r
Status = NetDestroyLinkList (\r
then a new handle is created. If it is a pointer to an existing\r
UEFI handle, 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 other The child handle was not created.\r
\r
@param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
@param[in] 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
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
- // Check Media Satus.\r
+ // Check Media Status.\r
//\r
MediaStatus = EFI_SUCCESS;\r
NetLibDetectMediaWaitTimeout (Service->Controller, DHCP_CHECK_MEDIA_WAITING_TIME, &MediaStatus);\r
}\r
\r
//\r
- // Poll udp out of the net tpl if synchoronus call.\r
+ // Poll udp out of the net tpl if synchronous call.\r
//\r
if (Instance->Config->IaInfoEvent == NULL) {\r
ASSERT (Udp6 != NULL);\r
}\r
\r
//\r
- // Poll udp out of the net tpl if synchoronus call.\r
+ // Poll udp out of the net tpl if synchronous call.\r
//\r
if (TimeoutEvent == NULL) {\r
\r
gBS->RestoreTPL (OldTpl);\r
\r
//\r
- // Poll udp out of the net tpl if synchoronus call.\r
+ // Poll udp out of the net tpl if synchronous call.\r
//\r
if (Instance->Config->IaInfoEvent == NULL) {\r
\r
gBS->RestoreTPL (OldTpl);\r
\r
//\r
- // Poll udp out of the net tpl if synchoronus call.\r
+ // Poll udp out of the net tpl if synchronous call.\r
//\r
if (Instance->Config->IaInfoEvent == NULL) {\r
\r
gBS->RestoreTPL (OldTpl);\r
\r
//\r
- // Poll udp out of the net tpl if synchoronus call.\r
+ // Poll udp out of the net tpl if synchronous call.\r
//\r
if (Instance->Config->IaInfoEvent == NULL) {\r
while (Instance->UdpSts == EFI_ALREADY_STARTED) {\r
TxCb->Elapsed = Elapsed;\r
\r
//\r
- // Calculate the retransmission according to the the message type.\r
+ // Calculate the retransmission according to the message type.\r
//\r
switch (Packet->Dhcp6.Header.MessageType) {\r
case Dhcp6MsgSolicit:\r
\r
ASSERT (Instance->Config != NULL);\r
//\r
- // If the reply was received in reponse to a solicit with rapid commit option,\r
+ // If the reply was received in response to a solicit with rapid commit option,\r
// request, renew or rebind message, the client updates the information it has\r
// recorded about IAs from the IA options contained in the reply message:\r
// 1. record the T1 and T2 times\r
// 2. add any new addresses in the IA\r
// 3. discard any addresses from the IA, that have a valid lifetime of 0\r
- // 4. update lifetimes for any addresses that alread recorded\r
+ // 4. update lifetimes for any addresses that already recorded\r
// 5. leave unchanged any information about addresses\r
//\r
// See details in the section-18.1.8 of rfc-3315.\r
}\r
\r
//\r
- // Create the Dhcp6 packet and initialize commone fields.\r
+ // Create the Dhcp6 packet and initialize common fields.\r
//\r
Packet = AllocateZeroPool (DHCP6_BASE_PACKET_SIZE + UserLen);\r
if (Packet == NULL) {\r
}\r
\r
//\r
- // Create the Dhcp6 packet and initialize commone fields.\r
+ // Create the Dhcp6 packet and initialize common fields.\r
//\r
Packet = AllocateZeroPool (DHCP6_BASE_PACKET_SIZE + UserLen);\r
if (Packet == NULL) {\r
ServerId = (EFI_DHCP6_DUID *) (Option + 2);\r
\r
//\r
- // Create the Dhcp6 packet and initialize commone fields.\r
+ // Create the Dhcp6 packet and initialize common fields.\r
//\r
Packet = AllocateZeroPool (DHCP6_BASE_PACKET_SIZE);\r
if (Packet == NULL) {\r
ServerId = (EFI_DHCP6_DUID *) (Option + 2);\r
\r
//\r
- // Create the Dhcp6 packet and initialize commone fields.\r
+ // Create the Dhcp6 packet and initialize common fields.\r
//\r
Packet = AllocateZeroPool (DHCP6_BASE_PACKET_SIZE);\r
if (Packet == NULL) {\r
}\r
\r
//\r
- // Create the Dhcp6 packet and initialize commone fields.\r
+ // Create the Dhcp6 packet and initialize common fields.\r
//\r
Packet = AllocateZeroPool (DHCP6_BASE_PACKET_SIZE + UserLen);\r
if (Packet == NULL) {\r
}\r
\r
//\r
- // Create the Dhcp6 packet and initialize commone fields.\r
+ // Create the Dhcp6 packet and initialize common fields.\r
//\r
Packet = AllocateZeroPool (DHCP6_BASE_PACKET_SIZE + UserLen);\r
if (Packet == NULL) {\r
Instance->UdpSts = EFI_SUCCESS;\r
\r
//\r
- // For async, signal the Ia event to inform Ia infomation update.\r
+ // For async, signal the Ia event to inform Ia information update.\r
//\r
if (Instance->Config->IaInfoEvent != NULL) {\r
gBS->SignalEvent (Instance->Config->IaInfoEvent);\r
\r
//\r
// Maybe this is a new round DHCP process due to some reason, such as NotOnLink\r
- // ReplyMsg for ConfirmMsg should triger new round to acquire new address. In that\r
+ // ReplyMsg for ConfirmMsg should trigger new round to acquire new address. In that\r
// case, clear old address.ValidLifetime and append to new address. Therefore, DHCP\r
// consumers can be notified to flush old address.\r
//\r
Dhcp6AppendCacheIa (Instance);\r
\r
//\r
- // For async, signal the Ia event to inform Ia infomation update.\r
+ // For async, signal the Ia event to inform Ia information update.\r
//\r
if (Instance->Config->IaInfoEvent != NULL) {\r
gBS->SignalEvent (Instance->Config->IaInfoEvent);\r
\r
//\r
// If the client does receives a valid reply message that includes a rapid\r
- // commit option since a solicit with rapid commit optioin sent before, select\r
+ // commit option since a solicit with rapid commit option sent before, select\r
// this reply message. Or else, process the advertise messages as normal.\r
// See details in the section-17.1.4 of rfc-3315.\r
//\r
\r
@param[in] Base The base value of the time.\r
@param[in] IsFirstRt If TRUE, it is the first time to calculate expire time.\r
- @param[in] NeedSigned If TRUE, the the signed factor is needed.\r
+ @param[in] NeedSigned If TRUE, the signed factor is needed.\r
\r
@return Expire The calculated result for the new expire time.\r
\r
//\r
// If release all Ia addresses, just copy the configured Ia and then set\r
// its address count as zero.\r
- // We may decline/release part of addresses at the begining. So it's a\r
+ // We may decline/release part of addresses at the beginning. So it's a\r
// forwarding step to update address infor for decline/release, while the\r
// other infor such as Ia state will be updated when receiving reply.\r
//\r
\r
/**\r
Check whether the incoming IPv6 address in IaAddr is one of the maintained\r
- addresses in the IA control blcok.\r
+ addresses in the IA control block.\r
\r
@param[in] IaAddr The pointer to the IA Address to be checked.\r
@param[in] CurrentIa The pointer to the IA in IA control block.\r
}\r
\r
/**\r
- Parse the address option and update the address infomation.\r
+ Parse the address option and update the address information.\r
\r
- @param[in] CurrentIa The pointer to the Ia Address in control blcok.\r
+ @param[in] CurrentIa The pointer to the Ia Address in control block.\r
@param[in] IaInnerOpt The pointer to the buffer.\r
@param[in] IaInnerLen The length to parse.\r
@param[out] AddrNum The number of addresses.\r
\r
\r
/**\r
- Create a control blcok for the Ia according to the corresponding options.\r
+ Create a control block for the Ia according to the corresponding options.\r
\r
@param[in] Instance The pointer to DHCP6 Instance.\r
@param[in] IaInnerOpt The pointer to the inner options in the Ia option.\r
}\r
\r
/**\r
- Append CacheIa to the currrent IA. Meanwhile, clear CacheIa.ValidLifetime to 0.\r
+ Append CacheIa to the current IA. Meanwhile, clear CacheIa.ValidLifetime to 0.\r
\r
@param[in] Instance The pointer to DHCP6 instance.\r
\r
}\r
\r
/**\r
- Calculate the Dhcp6 get mapping timeout by adding additinal delay to the IP6 DAD transmits count.\r
+ Calculate the Dhcp6 get mapping timeout by adding additional delay to the IP6 DAD transmits count.\r
\r
@param[in] Ip6Cfg The pointer to Ip6 config protocol.\r
@param[out] TimeOut The time out value in 100ns units.\r
\r
@param[in] Base The base value of the time.\r
@param[in] IsFirstRt If TRUE, it is the first time to calculate expire time.\r
- @param[in] NeedSigned If TRUE, the the signed factor is needed.\r
+ @param[in] NeedSigned If TRUE, the signed factor is needed.\r
\r
@return Expire The calculated result for the new expire time.\r
\r
\r
@param[in, out] Buf The pointer to buffer.\r
@param[in] OptType The option type.\r
- @param[in] OptLen The lenght of option content.s\r
+ @param[in] OptLen The length of option content.s\r
@param[in] Data The pointer to the option content.\r
\r
@return Buf The position to append the next option.\r
/**\r
Parse the address option and update the address info.\r
\r
- @param[in] CurrentIa The pointer to the Ia Address in control blcok.\r
+ @param[in] CurrentIa The pointer to the Ia Address in control block.\r
@param[in] IaInnerOpt The pointer to the buffer.\r
@param[in] IaInnerLen The length to parse.\r
@param[out] AddrNum The number of addresses.\r
);\r
\r
/**\r
- Create a control blcok for the Ia according to the corresponding options.\r
+ Create a control block for the Ia according to the corresponding options.\r
\r
@param[in] Instance The pointer to DHCP6 Instance.\r
@param[in] IaInnerOpt The pointer to the inner options in the Ia option.\r
\r
\r
/**\r
- Append CacheIa to the currrent IA. Meanwhile, clear CacheIa.ValidLifetime to 0.\r
+ Append CacheIa to the current IA. Meanwhile, clear CacheIa.ValidLifetime to 0.\r
\r
@param[in] Instance The pointer to DHCP6 instance.\r
\r
);\r
\r
/**\r
- Calculate the Dhcp6 get mapping timeout by adding additinal delay to the IP6 DAD transmits count.\r
+ Calculate the Dhcp6 get mapping timeout by adding additional delay to the IP6 DAD transmits count.\r
\r
@param[in] Ip6Cfg The pointer to Ip6 config protocol.\r
@param[out] TimeOut The time out value in 100ns units.\r