Functions | |
EFI_DHCP6_DUID * | Dhcp6GenerateClientId (IN EFI_SIMPLE_NETWORK_MODE *Mode) |
EFI_STATUS | Dhcp6CopyConfigData (IN EFI_DHCP6_CONFIG_DATA *DstCfg, IN EFI_DHCP6_CONFIG_DATA *SorCfg) |
VOID | Dhcp6CleanupConfigData (IN OUT EFI_DHCP6_CONFIG_DATA *CfgData) |
VOID | Dhcp6CleanupModeData (IN OUT EFI_DHCP6_MODE_DATA *ModeData) |
UINT32 | Dhcp6CalculateExpireTime (IN UINT32 Base, IN BOOLEAN IsFirstRt, IN BOOLEAN NeedSigned) |
VOID | Dhcp6CalculateLeaseTime (IN DHCP6_IA_CB *IaCb) |
EFI_STATUS | Dhcp6CheckAddress (IN EFI_DHCP6_IA *Ia, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses) |
EFI_DHCP6_IA * | Dhcp6DepriveAddress (IN EFI_DHCP6_IA *Ia, IN UINT32 AddressCount, IN EFI_IPv6_ADDRESS *Addresses) |
VOID EFIAPI | Dhcp6DummyExtFree (IN VOID *Arg) |
VOID EFIAPI | Dhcp6OnTransmitted (IN NET_BUF *Wrap, IN UDP_END_POINT *EndPoint, IN EFI_STATUS IoStatus, IN VOID *Context) |
UINT8 * | Dhcp6AppendOption (IN OUT UINT8 *Buf, IN UINT16 OptType, IN UINT16 OptLen, IN UINT8 *Data) |
UINT8 * | Dhcp6AppendIaAddrOption (IN OUT UINT8 *Buf, IN EFI_DHCP6_IA_ADDRESS *IaAddr, IN UINT32 MessageType) |
UINT8 * | Dhcp6AppendIaOption (IN OUT UINT8 *Buf, IN EFI_DHCP6_IA *Ia, IN UINT32 T1, IN UINT32 T2, IN UINT32 MessageType) |
UINT8 * | Dhcp6AppendETOption (IN OUT UINT8 *Buf, IN DHCP6_INSTANCE *Instance, OUT UINT16 **Elapsed) |
VOID | SetElapsedTime (IN UINT16 *Elapsed, IN DHCP6_INSTANCE *Instance) |
UINT8 * | Dhcp6SeekOption (IN UINT8 *Buf, IN UINT32 SeekLen, IN UINT16 OptType) |
UINT8 * | Dhcp6SeekIaOption (IN UINT8 *Buf, IN UINT32 SeekLen, IN EFI_DHCP6_IA_DESCRIPTOR *IaDesc) |
BOOLEAN | Dhcp6AddrIsInCurrentIa (IN EFI_DHCP6_IA_ADDRESS *IaAddr, IN EFI_DHCP6_IA *CurrentIa) |
VOID | Dhcp6ParseAddrOption (IN EFI_DHCP6_IA *CurrentIa, IN UINT8 *IaInnerOpt, IN UINT16 IaInnerLen, OUT UINT32 *AddrNum, IN OUT EFI_DHCP6_IA_ADDRESS *AddrBuf) |
EFI_STATUS | Dhcp6GenerateIaCb (IN DHCP6_INSTANCE *Instance, IN UINT8 *IaInnerOpt, IN UINT16 IaInnerLen, IN UINT32 T1, IN UINT32 T2) |
EFI_STATUS | Dhcp6CacheIa (IN DHCP6_INSTANCE *Instance) |
VOID | Dhcp6AppendCacheIa (IN DHCP6_INSTANCE *Instance) |
EFI_STATUS | Dhcp6GetMappingTimeOut (IN EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg, OUT UINTN *TimeOut) |
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
BOOLEAN Dhcp6AddrIsInCurrentIa | ( | IN EFI_DHCP6_IA_ADDRESS * | IaAddr, | |
IN EFI_DHCP6_IA * | CurrentIa | |||
) |
Check whether the incoming IPv6 address in IaAddr is one of the maintained addresses in the IA control blcok.
[in] | IaAddr | The pointer to the IA Address to be checked. |
[in] | CurrentIa | The pointer to the IA in IA control block. |
TRUE | Yes, this Address is already in IA control block. | |
FALSE | No, this Address is NOT in IA control block. |
Referenced by Dhcp6ParseAddrOption().
VOID Dhcp6AppendCacheIa | ( | IN DHCP6_INSTANCE * | Instance | ) |
Append CacheIa to the currrent IA. Meanwhile, clear CacheIa.ValidLifetime to 0.
[in] | Instance | The pointer to DHCP6 instance. |
Referenced by Dhcp6HandleReplyMsg().
UINT8* Dhcp6AppendETOption | ( | IN OUT UINT8 * | Buf, | |
IN DHCP6_INSTANCE * | Instance, | |||
OUT UINT16 ** | Elapsed | |||
) |
Append the appointed Elapsed time option to Buf, and move Buf to the end.
[in,out] | Buf | The pointer to the position to append. |
[in] | Instance | The pointer to the Dhcp6 instance. |
[out] | Elapsed | The pointer to the elapsed time value in the generated packet. |
References Dhcp6OptElapsedTime.
Referenced by Dhcp6SendConfirmMsg(), Dhcp6SendDeclineMsg(), Dhcp6SendInfoRequestMsg(), Dhcp6SendReleaseMsg(), Dhcp6SendRenewRebindMsg(), Dhcp6SendRequestMsg(), and Dhcp6SendSolicitMsg().
UINT8* Dhcp6AppendIaAddrOption | ( | IN OUT UINT8 * | Buf, | |
IN EFI_DHCP6_IA_ADDRESS * | IaAddr, | |||
IN UINT32 | MessageType | |||
) |
Append the appointed IA Address option to Buf, and move Buf to the end.
[in,out] | Buf | The pointer to the position to append. |
[in] | IaAddr | The pointer to the IA Address. |
[in] | MessageType | Message type of DHCP6 package. |
References Dhcp6MsgConfirm, and Dhcp6OptIaAddr.
Referenced by Dhcp6AppendIaOption().
UINT8* Dhcp6AppendIaOption | ( | IN OUT UINT8 * | Buf, | |
IN EFI_DHCP6_IA * | Ia, | |||
IN UINT32 | T1, | |||
IN UINT32 | T2, | |||
IN UINT32 | MessageType | |||
) |
Append the appointed Ia option to Buf, and move Buf to the end.
[in,out] | Buf | The pointer to the position to append. |
[in] | Ia | The pointer to the Ia. |
[in] | T1 | The time of T1. |
[in] | T2 | The time of T2. |
[in] | MessageType | Message type of DHCP6 package. |
References Dhcp6AppendIaAddrOption(), and Dhcp6OptIana.
Referenced by Dhcp6SendConfirmMsg(), Dhcp6SendDeclineMsg(), Dhcp6SendReleaseMsg(), Dhcp6SendRenewRebindMsg(), Dhcp6SendRequestMsg(), and Dhcp6SendSolicitMsg().
UINT8* Dhcp6AppendOption | ( | IN OUT UINT8 * | Buf, | |
IN UINT16 | OptType, | |||
IN UINT16 | OptLen, | |||
IN UINT8 * | Data | |||
) |
Append the option to Buf, and move Buf to the end.
[in,out] | Buf | The pointer to the buffer. |
[in] | OptType | The option type. |
[in] | OptLen | The length of option contents. |
[in] | Data | The pointer to the option content. |
Referenced by Dhcp6SendConfirmMsg(), Dhcp6SendDeclineMsg(), Dhcp6SendInfoRequestMsg(), Dhcp6SendReleaseMsg(), Dhcp6SendRenewRebindMsg(), Dhcp6SendRequestMsg(), and Dhcp6SendSolicitMsg().
EFI_STATUS Dhcp6CacheIa | ( | IN DHCP6_INSTANCE * | Instance | ) |
Cache the current IA configuration information.
[in] | Instance | The pointer to DHCP6 Instance. |
EFI_SUCCESS | Cache the current IA successfully. | |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Referenced by Dhcp6HandleReplyMsg().
UINT32 Dhcp6CalculateExpireTime | ( | IN UINT32 | Base, | |
IN BOOLEAN | IsFirstRt, | |||
IN BOOLEAN | NeedSigned | |||
) |
Calculate the expire time by the algorithm defined in rfc.
[in] | Base | The base value of the time. |
[in] | IsFirstRt | If TRUE, it is the first time to calculate expire time. |
[in] | NeedSigned | If TRUE, the the signed factor is needed. |
References DHCP6_10_BIT_MASK.
Referenced by Dhcp6EnqueueRetry(), and Dhcp6OnTimerTick().
VOID Dhcp6CalculateLeaseTime | ( | IN DHCP6_IA_CB * | IaCb | ) |
Calculate the lease time by the algorithm defined in rfc.
[in] | IaCb | The pointer to the Ia control block. |
Referenced by Dhcp6GenerateIaCb().
EFI_STATUS Dhcp6CheckAddress | ( | IN EFI_DHCP6_IA * | Ia, | |
IN UINT32 | AddressCount, | |||
IN EFI_IPv6_ADDRESS * | Addresses | |||
) |
Check whether the addresses are all included by the configured Ia.
[in] | Ia | The pointer to the Ia. |
[in] | AddressCount | The number of addresses. |
[in] | Addresses | The pointer to the addresses buffer. |
EFI_SUCCESS | The addresses are all included by the configured IA. | |
EFI_NOT_FOUND | The addresses are not included by the configured IA. |
Referenced by EfiDhcp6Decline(), and EfiDhcp6Release().
VOID Dhcp6CleanupConfigData | ( | IN OUT EFI_DHCP6_CONFIG_DATA * | CfgData | ) |
Clean up the configure data.
[in,out] | CfgData | The pointer to the configure data. |
Referenced by Dhcp6DestroyInstance(), EfiDhcp6Configure(), and EfiDhcp6GetModeData().
VOID Dhcp6CleanupModeData | ( | IN OUT EFI_DHCP6_MODE_DATA * | ModeData | ) |
Clean up the mode data.
[in,out] | ModeData | The pointer to the mode data. |
Referenced by EfiDhcp6GetModeData().
EFI_STATUS Dhcp6CopyConfigData | ( | IN EFI_DHCP6_CONFIG_DATA * | DstCfg, | |
IN EFI_DHCP6_CONFIG_DATA * | SorCfg | |||
) |
Copy the Dhcp6 configure data.
[in] | DstCfg | The pointer to the destination configure data. |
[in] | SorCfg | The pointer to the source configure data. |
EFI_SUCCESS | Copy the content from SorCfg from DstCfg successfully. | |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. |
Referenced by EfiDhcp6Configure(), and EfiDhcp6GetModeData().
EFI_DHCP6_IA* Dhcp6DepriveAddress | ( | IN EFI_DHCP6_IA * | Ia, | |
IN UINT32 | AddressCount, | |||
IN EFI_IPv6_ADDRESS * | Addresses | |||
) |
Deprive the addresses from current Ia, and generate another eliminated Ia.
[in] | Ia | The pointer to the Ia. |
[in] | AddressCount | The number of addresses. |
[in] | Addresses | The pointer to the addresses buffer. |
NULL | If it failed to generate the deprived Ia. | |
others | The pointer to the deprived Ia. |
Referenced by EfiDhcp6Decline(), and EfiDhcp6Release().
VOID EFIAPI Dhcp6DummyExtFree | ( | IN VOID * | Arg | ) |
The dummy ext buffer free callback routine.
[in] | Arg | The pointer to the parameter. |
Referenced by Dhcp6TransmitPacket().
EFI_DHCP6_DUID* Dhcp6GenerateClientId | ( | IN EFI_SIMPLE_NETWORK_MODE * | Mode | ) |
Generate client Duid in the format of Duid-llt.
[in] | Mode | The pointer to the mode of SNP. |
NULL | If it failed to generate a client Id. | |
others | The pointer to the new client id. |
References Dhcp6DuidTypeLlt, and Dhcp6DuidTypeUuid.
Referenced by Dhcp6CreateService().
EFI_STATUS Dhcp6GenerateIaCb | ( | IN DHCP6_INSTANCE * | Instance, | |
IN UINT8 * | IaInnerOpt, | |||
IN UINT16 | IaInnerLen, | |||
IN UINT32 | T1, | |||
IN UINT32 | T2 | |||
) |
Create a control blcok for the Ia according to the corresponding options.
[in] | Instance | The pointer to DHCP6 Instance. |
[in] | IaInnerOpt | The pointer to the inner options in the Ia option. |
[in] | IaInnerLen | The length of all the inner options in the Ia option. |
[in] | T1 | T1 time in the Ia option. |
[in] | T2 | T2 time in the Ia option. |
EFI_NOT_FOUND | No valid IA option is found. | |
EFI_SUCCESS | Create an IA control block successfully. | |
EFI_OUT_OF_RESOURCES | Required system resources could not be allocated. | |
EFI_DEVICE_ERROR | An unexpected error. |
References Dhcp6CalculateLeaseTime(), and Dhcp6ParseAddrOption().
Referenced by Dhcp6UpdateIaInfo().
EFI_STATUS Dhcp6GetMappingTimeOut | ( | IN EFI_IP6_CONFIG_PROTOCOL * | Ip6Cfg, | |
OUT UINTN * | TimeOut | |||
) |
Calculate the Dhcp6 get mapping timeout by adding additinal delay to the IP6 DAD transmits count.
[in] | Ip6Cfg | The pointer to Ip6 config protocol. |
[out] | TimeOut | The time out value in 100ns units. |
EFI_INVALID_PARAMETER | Input parameters are invalid. | |
EFI_SUCCESS | Calculate the time out value successfully. |
References DHCP6_DAD_ADDITIONAL_DELAY.
Referenced by EfiDhcp6InfoRequest().
VOID EFIAPI Dhcp6OnTransmitted | ( | IN NET_BUF * | Wrap, | |
IN UDP_END_POINT * | EndPoint, | |||
IN EFI_STATUS | IoStatus, | |||
IN VOID * | Context | |||
) |
The callback routine once message transmitted.
[in] | Wrap | The pointer to the received net buffer. |
[in] | EndPoint | The pointer to the udp end point. |
[in] | IoStatus | The return status from udp io. |
[in] | Context | The opaque parameter to the function. |
Referenced by Dhcp6TransmitPacket().
VOID Dhcp6ParseAddrOption | ( | IN EFI_DHCP6_IA * | CurrentIa, | |
IN UINT8 * | IaInnerOpt, | |||
IN UINT16 | IaInnerLen, | |||
OUT UINT32 * | AddrNum, | |||
IN OUT EFI_DHCP6_IA_ADDRESS * | AddrBuf | |||
) |
Parse the address option and update the address infomation.
[in] | CurrentIa | The pointer to the Ia Address in control blcok. |
[in] | IaInnerOpt | The pointer to the buffer. |
[in] | IaInnerLen | The length to parse. |
[out] | AddrNum | The number of addresses. |
[in,out] | AddrBuf | The pointer to the address buffer. |
References Dhcp6AddrIsInCurrentIa(), and Dhcp6OptIaAddr.
Referenced by Dhcp6GenerateIaCb().
UINT8* Dhcp6SeekIaOption | ( | IN UINT8 * | Buf, | |
IN UINT32 | SeekLen, | |||
IN EFI_DHCP6_IA_DESCRIPTOR * | IaDesc | |||
) |
Seek the address of the first byte of the Ia option header.
[in] | Buf | The pointer to the buffer. |
[in] | SeekLen | The length to seek. |
[in] | IaDesc | The pointer to the Ia descriptor. |
NULL | If it failed to seek the Ia option. | |
others | The position to the Ia option. |
Referenced by Dhcp6HandleReplyMsg(), Dhcp6SeekStsOption(), and Dhcp6UpdateIaInfo().
UINT8* Dhcp6SeekOption | ( | IN UINT8 * | Buf, | |
IN UINT32 | SeekLen, | |||
IN UINT16 | OptType | |||
) |
Seek the address of the first byte of the option header.
[in] | Buf | The pointer to the buffer. |
[in] | SeekLen | The length to seek. |
[in] | OptType | The option type. |
NULL | If it failed to seek the option. | |
others | The position to the option. |
Referenced by Dhcp6HandleAdvertiseMsg(), Dhcp6HandleReplyMsg(), Dhcp6HandleStateful(), Dhcp6HandleStateless(), Dhcp6SeekStsOption(), Dhcp6SelectAdvertiseMsg(), Dhcp6SendDeclineMsg(), Dhcp6SendReleaseMsg(), Dhcp6SendRenewRebindMsg(), Dhcp6SendRequestMsg(), and Dhcp6UpdateIaInfo().
VOID SetElapsedTime | ( | IN UINT16 * | Elapsed, | |
IN DHCP6_INSTANCE * | Instance | |||
) |
Set the elapsed time based on the given instance and the pointer to the elapsed time option.
[in] | Elapsed | The pointer to the position to append. |
[in] | Instance | The pointer to the Dhcp6 instance. |
Referenced by Dhcp6TransmitPacket().