TianoCore EDK2 master
Loading...
Searching...
No Matches
HttpBootDhcp4.h File Reference

Go to the source code of this file.

Data Structures

struct  HTTP_BOOT_DHCP4_OPTION_PARA
 
struct  HTTP_BOOT_DHCP4_OPTION_MAX_MESG_SIZE
 
struct  HTTP_BOOT_DHCP4_OPTION_UNDI
 
struct  HTTP_BOOT_DHCP4_OPTION_MESG
 
struct  HTTP_BOOT_DHCP4_OPTION_ARCH
 
struct  HTTP_BOOT_DHCP4_OPTION_CLID
 
struct  HTTP_BOOT_DHCP4_OPTION_UUID
 
struct  HTTP_BOOT_OPTION_BOOT_ITEM
 
union  HTTP_BOOT_DHCP4_OPTION_ENTRY
 
struct  HTTP_BOOT_VENDOR_OPTION
 
union  HTTP_BOOT_DHCP4_PACKET
 
struct  HTTP_BOOT_URI_CONTENT
 
struct  HTTP_BOOT_DHCP4_PACKET_CACHE
 

Macros

#define HTTP_BOOT_DHCP4_OPTION_MAX_NUM   16
 
#define HTTP_BOOT_DHCP4_OPTION_MAX_SIZE   312
 
#define HTTP_BOOT_DHCP4_PACKET_MAX_SIZE   1472
 
#define HTTP_BOOT_DHCP4_OPCODE_REQUEST   1
 
#define HTTP_BOOT_DHCP4_OPCODE_REPLY   2
 
#define HTTP_BOOT_DHCP4_MSG_TYPE_REQUEST   3
 
#define HTTP_BOOT_DHCP4_MAGIC   0x63538263
 
#define HTTP_BOOT_DHCP4_OVERLOAD_FILE   1
 
#define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME   2
 
#define HTTP_BOOT_DHCP_RETRIES   4
 
#define HTTP_BOOT_OFFER_MAX_NUM   16
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE_LEN   0
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD   1
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_MSG_TYPE   2
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_SERVER_ID   3
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_CLASS_ID   4
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE   5
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER   6
 
#define HTTP_BOOT_DHCP4_TAG_INDEX_MAX   7
 
#define GET_NEXT_DHCP_OPTION(Opt)
 
#define GET_OPTION_BUFFER_LEN(Pkt)    ((Pkt)->Length - sizeof (EFI_DHCP4_HEADER) - 4)
 
#define DEFAULT_CLASS_ID_DATA   "HTTPClient:Arch:xxxxx:UNDI:003000"
 
#define DEFAULT_UNDI_TYPE   1
 
#define DEFAULT_UNDI_MAJOR   3
 
#define DEFAULT_UNDI_MINOR   0
 
#define HTTP_CACHED_DHCP4_PACKET_MAX_SIZE   (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + HTTP_BOOT_DHCP4_PACKET_MAX_SIZE)
 

Enumerations

enum  HTTP_BOOT_OFFER_TYPE {
  HttpOfferTypeDhcpIpUri , HttpOfferTypeDhcpIpUriDns , HttpOfferTypeDhcpNameUriDns , HttpOfferTypeDhcpDns ,
  HttpOfferTypeDhcpOnly , HttpOfferTypeProxyNameUri , HttpOfferTypeProxyIpUri , HttpOfferTypeDhcpNameUri ,
  HttpOfferTypeMax
}
 

Functions

VOID HttpBootSelectDhcpOffer (IN HTTP_BOOT_PRIVATE_DATA *Private)
 
EFI_STATUS HttpBootDhcp4Dora (IN HTTP_BOOT_PRIVATE_DATA *Private)
 
EFI_STATUS HttpBootRegisterIp4Dns (IN HTTP_BOOT_PRIVATE_DATA *Private, IN UINTN DataLength, IN VOID *DnsServerData)
 

Detailed Description

Functions declaration related with DHCPv4 for HTTP boot driver.

Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file HttpBootDhcp4.h.

Macro Definition Documentation

◆ DEFAULT_CLASS_ID_DATA

#define DEFAULT_CLASS_ID_DATA   "HTTPClient:Arch:xxxxx:UNDI:003000"

Definition at line 172 of file HttpBootDhcp4.h.

◆ DEFAULT_UNDI_MAJOR

#define DEFAULT_UNDI_MAJOR   3

Definition at line 174 of file HttpBootDhcp4.h.

◆ DEFAULT_UNDI_MINOR

#define DEFAULT_UNDI_MINOR   0

Definition at line 175 of file HttpBootDhcp4.h.

◆ DEFAULT_UNDI_TYPE

#define DEFAULT_UNDI_TYPE   1

Definition at line 173 of file HttpBootDhcp4.h.

◆ GET_NEXT_DHCP_OPTION

#define GET_NEXT_DHCP_OPTION (   Opt)
Value:
(EFI_DHCP4_PACKET_OPTION *) ((UINT8 *) (Opt) + \
sizeof (EFI_DHCP4_PACKET_OPTION) + (Opt)->Length - 1)

Definition at line 165 of file HttpBootDhcp4.h.

◆ GET_OPTION_BUFFER_LEN

#define GET_OPTION_BUFFER_LEN (   Pkt)     ((Pkt)->Length - sizeof (EFI_DHCP4_HEADER) - 4)

Definition at line 169 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_MAGIC

#define HTTP_BOOT_DHCP4_MAGIC   0x63538263

Definition at line 21 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_MSG_TYPE_REQUEST

#define HTTP_BOOT_DHCP4_MSG_TYPE_REQUEST   3

Definition at line 20 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_OPCODE_REPLY

#define HTTP_BOOT_DHCP4_OPCODE_REPLY   2

Definition at line 19 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_OPCODE_REQUEST

#define HTTP_BOOT_DHCP4_OPCODE_REQUEST   1

Definition at line 18 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_OPTION_MAX_NUM

#define HTTP_BOOT_DHCP4_OPTION_MAX_NUM   16

Definition at line 14 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_OPTION_MAX_SIZE

#define HTTP_BOOT_DHCP4_OPTION_MAX_SIZE   312

Definition at line 15 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_OVERLOAD_FILE

#define HTTP_BOOT_DHCP4_OVERLOAD_FILE   1

Definition at line 23 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME

#define HTTP_BOOT_DHCP4_OVERLOAD_SERVER_NAME   2

Definition at line 24 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_PACKET_MAX_SIZE

#define HTTP_BOOT_DHCP4_PACKET_MAX_SIZE   1472

Definition at line 16 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE

#define HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE   5

Definition at line 104 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE_LEN

#define HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE_LEN   0

Definition at line 99 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_CLASS_ID

#define HTTP_BOOT_DHCP4_TAG_INDEX_CLASS_ID   4

Definition at line 103 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER

#define HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER   6

Definition at line 105 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_MAX

#define HTTP_BOOT_DHCP4_TAG_INDEX_MAX   7

Definition at line 106 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_MSG_TYPE

#define HTTP_BOOT_DHCP4_TAG_INDEX_MSG_TYPE   2

Definition at line 101 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD

#define HTTP_BOOT_DHCP4_TAG_INDEX_OVERLOAD   1

Definition at line 100 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP4_TAG_INDEX_SERVER_ID

#define HTTP_BOOT_DHCP4_TAG_INDEX_SERVER_ID   3

Definition at line 102 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_DHCP_RETRIES

#define HTTP_BOOT_DHCP_RETRIES   4

Definition at line 94 of file HttpBootDhcp4.h.

◆ HTTP_BOOT_OFFER_MAX_NUM

#define HTTP_BOOT_OFFER_MAX_NUM   16

Definition at line 95 of file HttpBootDhcp4.h.

◆ HTTP_CACHED_DHCP4_PACKET_MAX_SIZE

#define HTTP_CACHED_DHCP4_PACKET_MAX_SIZE   (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + HTTP_BOOT_DHCP4_PACKET_MAX_SIZE)

Definition at line 181 of file HttpBootDhcp4.h.

Enumeration Type Documentation

◆ HTTP_BOOT_OFFER_TYPE

HTTP Tag definition that identifies the processor and programming environment of the client system. These identifiers are defined by IETF: http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml DHCP offer types among HTTP boot. Dhcp4 and Dhcp6 share this definition, and corresponding relationship is as follows: Dhcp4Discover <> Dhcp6Solicit Dhcp4Offer <> Dhcp6Advertise Dhcp4Request <> Dhcp6Request Dhcp4Ack <> DHcp6Reply

Definition at line 56 of file HttpBootDhcp4.h.

Function Documentation

◆ HttpBootDhcp4Dora()

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.

Parameters
[in]PrivatePointer to HTTP_BOOT private data.
Return values
EFI_SUCCESSThe D.O.R.A process successfully finished.
OthersFailed to finish the D.O.R.A process.

Start the D.O.R.A DHCPv4 process to acquire the IPv4 address and other Http boot information.

Parameters
[in]PrivatePointer to HTTP boot driver private data.
Return values
EFI_SUCCESSThe D.O.R.A process successfully finished.
OthersFailed to finish the D.O.R.A process.

Definition at line 809 of file HttpBootDhcp4.c.

◆ HttpBootRegisterIp4Dns()

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.

Parameters
[in]PrivateThe pointer to HTTP_BOOT_PRIVATE_DATA.
[in]DataLengthSize of the buffer pointed to by DnsServerData in bytes.
[in]DnsServerDataPoint a list of DNS server address in an array of EFI_IPv4_ADDRESS instances.
Return values
EFI_SUCCESSThe DNS configuration has been configured successfully.
OthersFailed to configure the address.

Definition at line 731 of file HttpBootDhcp4.c.

◆ HttpBootSelectDhcpOffer()

VOID HttpBootSelectDhcpOffer ( IN HTTP_BOOT_PRIVATE_DATA Private)

Select an DHCPv4 or DHCP6 offer, and record SelectIndex and SelectProxyType.

Parameters
[in]PrivatePointer to HTTP boot driver private data.

Definition at line 492 of file HttpBootDhcp4.c.