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

Go to the source code of this file.

Data Structures

struct  HTTP_BOOT_ENTITY_DATA
 
struct  HTTP_BOOT_CACHE_CONTENT
 
struct  HTTP_BOOT_CALLBACK_DATA
 

Macros

#define HTTP_BOOT_BLOCK_SIZE   32000
 
#define HTTP_USER_AGENT_EFI_HTTP_BOOT   "UefiHttpBoot/1.0"
 
#define HTTP_BOOT_AUTHENTICATION_INFO_MAX_LEN   255
 

Functions

EFI_STATUS HttpBootDiscoverBootInfo (IN OUT HTTP_BOOT_PRIVATE_DATA *Private)
 
EFI_STATUS HttpBootCreateHttpIo (IN HTTP_BOOT_PRIVATE_DATA *Private)
 
EFI_STATUS HttpBootGetBootFile (IN HTTP_BOOT_PRIVATE_DATA *Private, IN BOOLEAN HeaderOnly, IN OUT UINTN *BufferSize, OUT UINT8 *Buffer, OUT HTTP_BOOT_IMAGE_TYPE *ImageType)
 
VOID HttpBootFreeCacheList (IN HTTP_BOOT_PRIVATE_DATA *Private)
 

Detailed Description

Declaration of the boot file download function.

Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file HttpBootClient.h.

Macro Definition Documentation

◆ HTTP_BOOT_AUTHENTICATION_INFO_MAX_LEN

#define HTTP_BOOT_AUTHENTICATION_INFO_MAX_LEN   255

Definition at line 15 of file HttpBootClient.h.

◆ HTTP_BOOT_BLOCK_SIZE

#define HTTP_BOOT_BLOCK_SIZE   32000

Definition at line 13 of file HttpBootClient.h.

◆ HTTP_USER_AGENT_EFI_HTTP_BOOT

#define HTTP_USER_AGENT_EFI_HTTP_BOOT   "UefiHttpBoot/1.0"

Definition at line 14 of file HttpBootClient.h.

Function Documentation

◆ HttpBootCreateHttpIo()

EFI_STATUS HttpBootCreateHttpIo ( IN HTTP_BOOT_PRIVATE_DATA Private)

Create a HttpIo instance for the file download.

Parameters
[in]PrivateThe pointer to the driver's private data.
Return values
EFI_SUCCESSSuccessfully created.
OthersFailed to create HttpIo.

Definition at line 609 of file HttpBootClient.c.

◆ HttpBootDiscoverBootInfo()

EFI_STATUS HttpBootDiscoverBootInfo ( IN OUT HTTP_BOOT_PRIVATE_DATA Private)

Discover all the boot information for boot file.

Parameters
[in,out]PrivateThe pointer to the driver's private data.
Return values
EFI_SUCCESSSuccessfully obtained all the boot information .
OthersFailed to retrieve the boot information.

Definition at line 539 of file HttpBootClient.c.

◆ HttpBootFreeCacheList()

VOID HttpBootFreeCacheList ( IN HTTP_BOOT_PRIVATE_DATA Private)

Clean up all cached data.

Parameters
[in]PrivateThe pointer to the driver's private data.

Definition at line 722 of file HttpBootClient.c.

◆ HttpBootGetBootFile()

EFI_STATUS HttpBootGetBootFile ( IN HTTP_BOOT_PRIVATE_DATA Private,
IN BOOLEAN  HeaderOnly,
IN OUT UINTN BufferSize,
OUT UINT8 *  Buffer,
OUT HTTP_BOOT_IMAGE_TYPE *  ImageType 
)

This function download the boot file by using UEFI HTTP protocol.

Parameters
[in]PrivateThe pointer to the driver's private data.
[in]HeaderOnlyOnly request the response header, it could save a lot of time if the caller only want to know the size of the requested file.
[in,out]BufferSizeOn input the size of Buffer in bytes. On output with a return code of EFI_SUCCESS, the amount of data transferred to Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of Buffer required to retrieve the requested file.
[out]BufferThe memory buffer to transfer the file to. IF Buffer is NULL, then the size of the requested file is returned in BufferSize.
[out]ImageTypeThe image type of the downloaded file.
Return values
EFI_SUCCESSThe file was loaded.
EFI_INVALID_PARAMETERBufferSize is NULL or Buffer Size is not NULL but Buffer is NULL.
EFI_OUT_OF_RESOURCESCould not allocate needed resources
EFI_BUFFER_TOO_SMALLThe BufferSize is too small to read the current directory entry. BufferSize has been updated with the size needed to complete the request.
EFI_ACCESS_DENIEDThe server needs to authenticate the client.
EFI_UNSUPPORTEDSome HTTP response header is not supported.
OthersUnexpected error happened.

This function download the boot file by using UEFI HTTP protocol.

Parameters
[in]PrivateThe pointer to the driver's private data.
[in]HeaderOnlyOnly request the response header, it could save a lot of time if the caller only want to know the size of the requested file.
[in,out]BufferSizeOn input the size of Buffer in bytes. On output with a return code of EFI_SUCCESS, the amount of data transferred to Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL, the size of Buffer required to retrieve the requested file.
[out]BufferThe memory buffer to transfer the file to. IF Buffer is NULL, then the size of the requested file is returned in BufferSize.
[out]ImageTypeThe image type of the downloaded file.
Return values
EFI_SUCCESSThe file was loaded.
EFI_INVALID_PARAMETERBufferSize is NULL or Buffer Size is not NULL but Buffer is NULL.
EFI_OUT_OF_RESOURCESCould not allocate needed resources
EFI_BUFFER_TOO_SMALLThe BufferSize is too small to read the current directory entry. BufferSize has been updated with the size needed to complete the request.
EFI_ACCESS_DENIEDThe server needs to authenticate the client.
EFI_NOT_READYData transfer has timed-out, call HttpBootGetBootFile again to resume the download operation using HTTP Range headers.
EFI_UNSUPPORTEDSome HTTP response header is not supported.
OthersUnexpected error happened.

Definition at line 933 of file HttpBootClient.c.