NetworkPkg/HttpBootDxe/HttpBootClient.h File Reference


Data Structures

struct  HTTP_BOOT_ENTITY_DATA
struct  HTTP_BOOT_CACHE_CONTENT
struct  HTTP_BOOT_CALLBACK_DATA

Defines

#define HTTP_BOOT_REQUEST_TIMEOUT   5000
#define HTTP_BOOT_BLOCK_SIZE   1500
#define HTTP_FIELD_NAME_USER_AGENT   "User-Agent"
#define HTTP_FIELD_NAME_HOST   "Host"
#define HTTP_FIELD_NAME_ACCEPT   "Accept"
#define HTTP_USER_AGENT_EFI_HTTP_BOOT   "UefiHttpBoot/1.0"

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)
VOID HttpBootFreeCacheList (IN HTTP_BOOT_PRIVATE_DATA *Private)

Detailed Description

Declaration of the boot file download function.

Copyright (c) 2015, 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 that 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.


Define Documentation

#define HTTP_BOOT_BLOCK_SIZE   1500

Referenced by HttpBootGetBootFile().

#define HTTP_BOOT_REQUEST_TIMEOUT   5000

Referenced by HttpBootCreateHttpIo().

#define HTTP_FIELD_NAME_ACCEPT   "Accept"

Referenced by HttpBootGetBootFile().

#define HTTP_FIELD_NAME_HOST   "Host"

Referenced by HttpBootGetBootFile().

#define HTTP_FIELD_NAME_USER_AGENT   "User-Agent"

Referenced by HttpBootGetBootFile().

#define HTTP_USER_AGENT_EFI_HTTP_BOOT   "UefiHttpBoot/1.0"

Referenced by HttpBootGetBootFile().


Function Documentation

EFI_STATUS HttpBootCreateHttpIo ( IN HTTP_BOOT_PRIVATE_DATA Private  ) 

Create a HttpIo instance for the file download.

Parameters:
[in] Private The pointer to the driver's private data.
Return values:
EFI_SUCCESS Successfully created.
Others Failed to create HttpIo.

References HTTP_IO_CONFIG_DATA::Config4, HTTP_BOOT_REQUEST_TIMEOUT, HttpIoCreateIo(), HTTP4_IO_CONFIG_DATA::HttpVersion, HTTP4_IO_CONFIG_DATA::LocalIp, HTTP4_IO_CONFIG_DATA::RequestTimeOut, and HTTP4_IO_CONFIG_DATA::SubnetMask.

Referenced by HttpBootLoadFile().

EFI_STATUS HttpBootDiscoverBootInfo ( IN OUT HTTP_BOOT_PRIVATE_DATA Private  ) 

Discover all the boot information for boot file.

Parameters:
[in,out] Private The pointer to the driver's private data.
Return values:
EFI_SUCCESS Successfully obtained all the boot information .
Others Failed to retrieve the boot information.

References HttpBootDhcp(), and HttpBootExtractUriInfo().

Referenced by HttpBootLoadFile().

VOID HttpBootFreeCacheList ( IN HTTP_BOOT_PRIVATE_DATA Private  ) 

Clean up all cached data.

Parameters:
[in] Private The pointer to the driver's private data.

References HttpBootFreeCache(), and HTTP_BOOT_CACHE_CONTENT::Link.

Referenced by HttpBootIp4DxeDriverBindingStop().

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

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

Parameters:
[in] Private The pointer to the driver's private data.
[in] HeaderOnly Only 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] BufferSize On 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] Buffer The memory buffer to transfer the file to. IF Buffer is NULL, then the size of the requested file is returned in BufferSize.
Return values:
EFI_SUCCESS The file was loaded.
EFI_INVALID_PARAMETER BufferSize is NULL or Buffer Size is not NULL but Buffer is NULL.
EFI_OUT_OF_RESOURCES Could not allocate needed resources
EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory entry. BufferSize has been updated with the size needed to complete the request.
Others Unexpected error happened.

References HTTP_BOOT_CALLBACK_DATA::Block, HTTP_IO_RESOPNSE_DATA::Body, HTTP_IO_RESOPNSE_DATA::BodyLength, HTTP_BOOT_CALLBACK_DATA::Buffer, HTTP_BOOT_CALLBACK_DATA::BufferSize, HTTP_BOOT_CALLBACK_DATA::Cache, HTTP_BOOT_CALLBACK_DATA::CopyedSize, HTTP_BOOT_CACHE_CONTENT::EntityDataList, HTTP_BOOT_CACHE_CONTENT::EntityLength, HTTP_IO_RESOPNSE_DATA::HeaderCount, HTTP_IO_HEADER::HeaderCount, HTTP_IO_RESOPNSE_DATA::Headers, HTTP_IO_HEADER::Headers, HTTP_BOOT_BLOCK_SIZE, HTTP_FIELD_NAME_ACCEPT, HTTP_FIELD_NAME_HOST, HTTP_FIELD_NAME_USER_AGENT, HTTP_USER_AGENT_EFI_HTTP_BOOT, HttpBootCreateHeader(), HttpBootFreeCache(), HttpBootFreeHeader(), HttpBootGetBootFileCallback(), HttpBootGetFileFromCache(), HttpBootSetHeader(), HttpIoRecvResponse(), HttpIoSendRequest(), HTTP_BOOT_CACHE_CONTENT::Link, HTTP_BOOT_CALLBACK_DATA::NewBlock, HTTP_BOOT_CACHE_CONTENT::RequestData, HTTP_IO_RESOPNSE_DATA::Response, and HTTP_BOOT_CACHE_CONTENT::ResponseData.

Referenced by HttpBootLoadFile().


Generated on Mon Sep 28 08:49:05 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1