TianoCore EDK2 master
|
#include "HttpBootDxe.h"
Go to the source code of this file.
Variables | |
UINT8 | mInterestedDhcp4Tags [HTTP_BOOT_DHCP4_TAG_INDEX_MAX] |
UINT32 | mHttpDhcpTimeout [4] = { 4, 8, 16, 32 } |
Functions implementation related with DHCPv4 for HTTP boot driver.
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HttpBootDhcp4.c.
UINT32 HttpBootBuildDhcp4Options | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private, |
OUT EFI_DHCP4_PACKET_OPTION ** | OptList, | ||
IN UINT8 * | Buffer | ||
) |
Build the options buffer for the DHCPv4 request packet.
[in] | Private | Pointer to HTTP boot driver private data. |
[out] | OptList | Pointer to the option pointer array. |
[in] | Buffer | Pointer to the buffer to contain the option list. |
Definition at line 40 of file HttpBootDhcp4.c.
EFI_STATUS HttpBootCacheDhcp4Offer | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private, |
IN EFI_DHCP4_PACKET * | RcvdOffer | ||
) |
Cache all the received DHCPv4 offers, and set OfferIndex and OfferCount.
[in] | Private | Pointer to HTTP boot driver private data. |
[in] | RcvdOffer | Pointer to the received offer packet. |
EFI_SUCCESS | Cache and parse the packet successfully. |
Others | Operation failed. |
Definition at line 443 of file HttpBootDhcp4.c.
EFI_STATUS HttpBootCacheDhcp4Packet | ( | IN EFI_DHCP4_PACKET * | Dst, |
IN EFI_DHCP4_PACKET * | Src | ||
) |
Cache the DHCPv4 packet.
[in] | Dst | Pointer to the cache buffer for DHCPv4 packet. |
[in] | Src | Pointer to the DHCPv4 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 222 of file HttpBootDhcp4.c.
EFI_STATUS EFIAPI HttpBootDhcp4CallBack | ( | IN EFI_DHCP4_PROTOCOL * | This, |
IN VOID * | Context, | ||
IN EFI_DHCP4_STATE | CurrentState, | ||
IN EFI_DHCP4_EVENT | Dhcp4Event, | ||
IN EFI_DHCP4_PACKET *Packet | OPTIONAL, | ||
OUT EFI_DHCP4_PACKET **NewPacket | OPTIONAL | ||
) |
EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver to intercept events that occurred in the configuration process.
[in] | This | Pointer to the EFI DHCPv4 Protocol. |
[in] | Context | Pointer to the context set by EFI_DHCP4_PROTOCOL.Configure(). |
[in] | CurrentState | The current operational state of the EFI DHCPv4 Protocol driver. |
[in] | Dhcp4Event | The event that occurs in the current state, which usually means a state transition. |
[in] | Packet | The DHCPv4 packet that is going to be sent or already received. |
[out] | NewPacket | The packet that is used to replace the above Packet. |
EFI_SUCCESS | Tells the EFI DHCPv4 Protocol driver to continue the DHCP process. |
EFI_NOT_READY | Only used in the Dhcp4Selecting state. The EFI DHCPv4 Protocol driver will continue to wait for more DHCPOFFER packets until the retry timeout expires. |
EFI_ABORTED | Tells the EFI DHCPv4 Protocol driver to abort the current process and return to the Dhcp4Init or Dhcp4InitReboot state. |
Definition at line 579 of file HttpBootDhcp4.c.
EFI_STATUS HttpBootDhcp4Dora | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
Start the D.O.R.A DHCPv4 process to acquire the IPv4 address and other Http boot information.
[in] | Private | Pointer to HTTP boot driver private data. |
EFI_SUCCESS | The D.O.R.A process successfully finished. |
Others | Failed to finish the D.O.R.A process. |
Definition at line 809 of file HttpBootDhcp4.c.
EFI_DHCP4_PACKET_OPTION * HttpBootParseDhcp4Options | ( | IN UINT8 * | Buffer, |
IN UINT32 | Length, | ||
IN UINT8 | OptTag | ||
) |
Parse a certain dhcp4 option by OptTag in Buffer, and return with start pointer.
[in] | Buffer | Pointer to the option buffer. |
[in] | Length | Length of the option buffer. |
[in] | OptTag | Tag of the required option. |
NULL | Failed to find the required option. |
Others | The position of the required option. |
Definition at line 176 of file HttpBootDhcp4.c.
EFI_STATUS HttpBootParseDhcp4Packet | ( | IN HTTP_BOOT_DHCP4_PACKET_CACHE * | Cache4 | ) |
Parse the cached DHCPv4 packet, including all the options.
[in] | Cache4 | Pointer to cached DHCPv4 packet. |
EFI_SUCCESS | Parsed the DHCPv4 packet successfully. |
EFI_DEVICE_ERROR | Failed to parse an invalid packet. |
Definition at line 247 of file HttpBootDhcp4.c.
EFI_STATUS HttpBootRegisterIp4Dns | ( | 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_IPv4_ADDRESS instances. |
EFI_SUCCESS | The DNS configuration has been configured successfully. |
Others | Failed to configure the address. |
Definition at line 731 of file HttpBootDhcp4.c.
EFI_STATUS HttpBootRegisterIp4Gateway | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
This function will register the IPv4 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 689 of file HttpBootDhcp4.c.
VOID HttpBootSelectDhcpOffer | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
Select an DHCPv4 or DHCP6 offer, and record SelectIndex and SelectProxyType.
[in] | Private | Pointer to HTTP boot driver private data. |
Definition at line 492 of file HttpBootDhcp4.c.
EFI_STATUS HttpBootSetIp4Policy | ( | IN HTTP_BOOT_PRIVATE_DATA * | Private | ) |
This function will switch the IP4 configuration policy to Static.
[in] | Private | Pointer to HTTP boot driver private data. |
EFI_SUCCESS | The policy is already configured to static. |
Others | Other error as indicated.. |
Definition at line 761 of file HttpBootDhcp4.c.
UINT32 mHttpDhcpTimeout[4] = { 4, 8, 16, 32 } |
Definition at line 27 of file HttpBootDhcp4.c.
UINT8 mInterestedDhcp4Tags[HTTP_BOOT_DHCP4_TAG_INDEX_MAX] |
Definition at line 14 of file HttpBootDhcp4.c.