TianoCore EDK2 master
|
#include "HttpBootDxe.h"
Go to the source code of this file.
Functions implementation related with DHCPv6 for HTTP boot driver.
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HttpBootDhcp6.c.
UINT32 HttpBootBuildDhcp6Options | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private, |
OUT EFI_DHCP6_PACKET_OPTION ** | OptList, | ||
IN UINT8 * | Buffer | ||
) |
Build the options buffer for the DHCPv6 request packet.
[in] | Private | The pointer to HTTP BOOT driver private data. |
[out] | OptList | The pointer to the option pointer array. |
[in] | Buffer | The pointer to the buffer to contain the option list. |
Definition at line 23 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootCacheDhcp6Offer | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private, |
IN EFI_DHCP6_PACKET * | RcvdOffer | ||
) |
Cache all the received DHCPv6 offers, and set OfferIndex and OfferCount.
[in] | Private | The pointer to HTTP_BOOT_PRIVATE_DATA. |
[in] | RcvdOffer | The pointer to the received offer packet. |
EFI_SUCCESS | Cache and parse the packet successfully. |
Others | Operation failed. |
Definition at line 355 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootCacheDhcp6Packet | ( | IN EFI_DHCP6_PACKET * | Dst, |
IN EFI_DHCP6_PACKET * | Src | ||
) |
Cache the DHCPv6 packet.
[in] | Dst | The pointer to the cache buffer for DHCPv6 packet. |
[in] | Src | The pointer to the DHCPv6 packet to be cached. |
EFI_SUCCESS | Packet is copied. |
EFI_BUFFER_TOO_SMALL | Cache buffer is not big enough to hold the packet. |
Definition at line 329 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootCheckRouteTable | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private, |
IN UINTN | TimeOutInSecond, | ||
OUT EFI_IPv6_ADDRESS * | GatewayAddr | ||
) |
Check whether IP driver could route the message which will be sent to ServerIp address.
This function will check the IP6 route table every 1 seconds until specified timeout is expired, if a valid route is found in IP6 route table, the address will be filed in GatewayAddr and return.
[in] | Private | The pointer to HTTP_BOOT_PRIVATE_DATA. |
[in] | TimeOutInSecond | Timeout value in seconds. |
[out] | GatewayAddr | Pointer to store the gateway IP address. |
EFI_SUCCESS | Found a valid gateway address successfully. |
EFI_TIMEOUT | The operation is time out. |
Other | Unexpected error happened. |
Definition at line 524 of file HttpBootDhcp6.c.
EFI_STATUS EFIAPI HttpBootDhcp6CallBack | ( | IN EFI_DHCP6_PROTOCOL * | This, |
IN VOID * | Context, | ||
IN EFI_DHCP6_STATE | CurrentState, | ||
IN EFI_DHCP6_EVENT | Dhcp6Event, | ||
IN EFI_DHCP6_PACKET * | Packet, | ||
OUT EFI_DHCP6_PACKET **NewPacket | OPTIONAL | ||
) |
EFI_DHCP6_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol driver to intercept events that occurred in the configuration process.
[in] | This | The pointer to the EFI DHCPv6 Protocol. |
[in] | Context | The pointer to the context set by EFI_DHCP6_PROTOCOL.Configure(). |
[in] | CurrentState | The current operational state of the EFI DHCPv Protocol driver. |
[in] | Dhcp6Event | The event that occurs in the current state, which usually means a state transition. |
[in] | Packet | The DHCPv6 packet that is going to be sent or was already received. |
[out] | NewPacket | The packet that is used to replace the Packet above. |
EFI_SUCCESS | Told the EFI DHCPv6 Protocol driver to continue the DHCP process. |
EFI_NOT_READY | Only used in the Dhcp6Selecting state. The EFI DHCPv6 Protocol driver will continue to wait for more packets. |
EFI_ABORTED | Told the EFI DHCPv6 Protocol driver to abort the current process. |
EFI_OUT_OF_RESOURCES | There are not enough resources. |
Definition at line 417 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootDhcp6Sarr | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
Start the S.A.R.R DHCPv6 process to acquire the IPv6 address and other Http boot information.
[in] | Private | Pointer to HTTP_BOOT private data. |
EFI_SUCCESS | The S.A.R.R process successfully finished. |
Others | Failed to finish the S.A.R.R process. |
Definition at line 943 of file HttpBootDhcp6.c.
EFI_DHCP6_PACKET_OPTION * HttpBootParseDhcp6Options | ( | IN UINT8 * | Buffer, |
IN UINT32 | Length, | ||
IN UINT16 | OptTag | ||
) |
Parse out a DHCPv6 option by OptTag, and find the position in buffer.
[in] | Buffer | The pointer to the option buffer. |
[in] | Length | Length of the option buffer. |
[in] | OptTag | The required option tag. |
NULL | Failed to parse the required option. |
Others | The position of the required option in buffer. |
Definition at line 134 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootParseDhcp6Packet | ( | IN HTTP_BOOT_DHCP6_PACKET_CACHE * | Cache6 | ) |
Parse the cached DHCPv6 packet, including all the options.
[in] | Cache6 | The pointer to a cached DHCPv6 packet. |
EFI_SUCCESS | Parsed the DHCPv6 packet successfully. |
EFI_DEVICE_ERROR | Failed to parse and invalid the packet. |
Definition at line 171 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootSetIp6Address | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
This function will register the station IP address.
[in] | Private | The pointer to HTTP_BOOT_PRIVATE_DATA. |
EFI_SUCCESS | The new IP address has been configured successfully. |
Others | Failed to configure the address. |
Definition at line 767 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootSetIp6Dns | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private, |
IN UINTN | DataLength, | ||
IN VOID * | DnsServerData | ||
) |
This function will register the default DNS addresses to the network device.
[in] | Private | The pointer to HTTP_BOOT_PRIVATE_DATA. |
[in] | DataLength | Size of the buffer pointed to by DnsServerData in bytes. |
[in] | DnsServerData | Point a list of DNS server address in an array of EFI_IPv6_ADDRESS instances. |
EFI_SUCCESS | The DNS configuration has been configured successfully. |
Others | Failed to configure the address. |
Definition at line 699 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootSetIp6Gateway | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
This function will register the IPv6 gateway address to the network device.
[in] | Private | The pointer to HTTP_BOOT_PRIVATE_DATA. |
EFI_SUCCESS | The new IP configuration has been configured successfully. |
Others | Failed to configure the address. |
Definition at line 729 of file HttpBootDhcp6.c.
EFI_STATUS HttpBootSetIp6Policy | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
Set the IP6 policy to Automatic.
[in] | Private | The pointer to HTTP_BOOT_PRIVATE_DATA. |
EFI_SUCCESS | Switch the IP policy successfully. |
Others | Unexpected error happened. |
Definition at line 645 of file HttpBootDhcp6.c.