Functions | |
VOID EFIAPI | HttpCommonNotify (IN EFI_EVENT Event, IN VOID *Context) |
VOID EFIAPI | HttpTcpTransmitNotifyDpc (IN VOID *Context) |
VOID EFIAPI | HttpTcpTransmitNotify (IN EFI_EVENT Event, IN VOID *Context) |
VOID EFIAPI | HttpTcpReceiveNotifyDpc (IN VOID *Context) |
VOID EFIAPI | HttpTcpReceiveNotify (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS | HttpCreateTcp4ConnCloseEvent (IN HTTP_PROTOCOL *HttpInstance) |
VOID | HttpCloseTcp4ConnCloseEvent (IN HTTP_PROTOCOL *HttpInstance) |
EFI_STATUS | HttpCreateTcp4TxEvent (IN HTTP_TOKEN_WRAP *Wrap) |
EFI_STATUS | HttpCreateTcp4RxEventForHeader (IN HTTP_PROTOCOL *HttpInstance) |
EFI_STATUS | HttpCreateTcp4RxEvent (IN HTTP_TOKEN_WRAP *Wrap) |
EFI_STATUS | HttpInitProtocol (IN HTTP_SERVICE *HttpSb, IN OUT HTTP_PROTOCOL *HttpInstance) |
VOID | HttpCleanProtocol (IN HTTP_PROTOCOL *HttpInstance) |
EFI_STATUS | HttpCreateConnection (IN HTTP_PROTOCOL *HttpInstance) |
EFI_STATUS | HttpCloseConnection (IN HTTP_PROTOCOL *HttpInstance) |
EFI_STATUS | HttpConfigureTcp4 (IN HTTP_PROTOCOL *HttpInstance, IN HTTP_TOKEN_WRAP *Wrap) |
EFI_STATUS | HttpConnectTcp4 (IN HTTP_PROTOCOL *HttpInstance) |
EFI_STATUS | HttpTransmitTcp4 (IN HTTP_PROTOCOL *HttpInstance, IN HTTP_TOKEN_WRAP *Wrap, IN UINT8 *TxString, IN UINTN TxStringLen) |
EFI_HTTP_STATUS_CODE | HttpMappingToStatusCode (IN UINTN StatusCode) |
EFI_STATUS EFIAPI | HttpTokenExist (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Context) |
EFI_STATUS EFIAPI | HttpTcpNotReady (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Context) |
EFI_STATUS EFIAPI | HttpTcpTransmit (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Context) |
EFI_STATUS EFIAPI | HttpTcpReceive (IN NET_MAP *Map, IN NET_MAP_ITEM *Item, IN VOID *Context) |
CHAR8 * | HttpGenRequestString (IN HTTP_PROTOCOL *HttpInstance, IN EFI_HTTP_MESSAGE *Message, IN CHAR8 *Url) |
Copyright (c) 2015, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which 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.
VOID HttpCleanProtocol | ( | IN HTTP_PROTOCOL * | HttpInstance | ) |
Clean up the HTTP child, release all the resources used by it.
[in] | HttpInstance | The HTTP child to clean up. |
References HttpCloseConnection(), and HttpCloseTcp4ConnCloseEvent().
Referenced by EfiHttpConfigure(), HttpServiceBindingCreateChild(), and HttpServiceBindingDestroyChild().
EFI_STATUS HttpCloseConnection | ( | IN HTTP_PROTOCOL * | HttpInstance | ) |
Close existing TCP connection.
[in] | HttpInstance | The HTTP instance private data. |
EFI_SUCCESS | The TCP connection is closed. | |
Others | Other error as indicated. |
References HTTP_STATE_TCP_CLOSED, and HTTP_STATE_TCP_CONNECTED.
Referenced by EfiHttpRequest(), HttpCleanProtocol(), and HttpConnectTcp4().
VOID HttpCloseTcp4ConnCloseEvent | ( | IN HTTP_PROTOCOL * | HttpInstance | ) |
Close events in the TCP4 connection token and TCP4 close token.
[in] | HttpInstance | Pointer to HTTP_PROTOCOL structure. |
Referenced by EfiHttpRequest(), HttpCleanProtocol(), and HttpCreateTcp4ConnCloseEvent().
VOID EFIAPI HttpCommonNotify | ( | IN EFI_EVENT | Event, | |
IN VOID * | Context | |||
) |
The common notify function used in HTTP driver.
[in] | Event | The event signaled. |
[in] | Context | The context. |
Referenced by HttpCreateTcp4ConnCloseEvent(), HttpCreateTcp4RxEventForHeader(), and HttpDns4().
EFI_STATUS HttpConfigureTcp4 | ( | IN HTTP_PROTOCOL * | HttpInstance, | |
IN HTTP_TOKEN_WRAP * | Wrap | |||
) |
Configure TCP4 protocol child.
[in] | HttpInstance | The HTTP instance private data. |
[in] | Wrap | The HTTP token's wrap data. |
EFI_SUCCESS | The TCP4 protocol child is configured. | |
Others | Other error as indicated. |
References HTTP_BUFFER_SIZE_DEAULT, HTTP_CONNECTION_TIMEOUT, HTTP_DATA_RETRIES, HTTP_FIN_TIMEOUT, HTTP_KEEP_ALIVE_INTERVAL, HTTP_KEEP_ALIVE_PROBES, HTTP_KEEP_ALIVE_TIME, HTTP_MAX_SYN_BACK_LOG, HTTP_STATE_TCP_CONFIGED, HTTP_TOS_DEAULT, HTTP_TTL_DEAULT, HttpCreateTcp4ConnCloseEvent(), and HttpCreateTcp4TxEvent().
Referenced by EfiHttpRequest().
EFI_STATUS HttpConnectTcp4 | ( | IN HTTP_PROTOCOL * | HttpInstance | ) |
Check existing TCP connection, if in error state, receover TCP4 connection.
[in] | HttpInstance | The HTTP instance private data. |
EFI_SUCCESS | The TCP connection is established. | |
EFI_NOT_READY | TCP4 protocol child is not created or configured. | |
Others | Other error as indicated. |
References HTTP_STATE_TCP_CONFIGED, HttpCloseConnection(), and HttpCreateConnection().
Referenced by EfiHttpRequest().
EFI_STATUS HttpCreateConnection | ( | IN HTTP_PROTOCOL * | HttpInstance | ) |
Establish TCP connection with HTTP server.
[in] | HttpInstance | The HTTP instance private data. |
EFI_SUCCESS | The TCP connection is established. | |
Others | Other error as indicated. |
References HTTP_STATE_TCP_CONNECTED.
Referenced by HttpConnectTcp4().
EFI_STATUS HttpCreateTcp4ConnCloseEvent | ( | IN HTTP_PROTOCOL * | HttpInstance | ) |
Create events for the TCP4 connection token and TCP4 close token.
[in] | HttpInstance | Pointer to HTTP_PROTOCOL structure. |
EFI_SUCCESS | The events are created successfully. | |
others | Other error as indicated. |
References HttpCloseTcp4ConnCloseEvent(), and HttpCommonNotify().
Referenced by HttpConfigureTcp4().
EFI_STATUS HttpCreateTcp4RxEvent | ( | IN HTTP_TOKEN_WRAP * | Wrap | ) |
Create event for the TCP4 receive token which is used to receive HTTP body.
[in] | Wrap | Point to HTTP token's wrap data. |
EFI_SUCCESS | The events is created successfully. | |
others | Other error as indicated. |
References HttpTcpReceiveNotify(), HTTP_TCP_TOKEN_WRAP::RxData, and HTTP_TCP_TOKEN_WRAP::RxToken.
Referenced by EfiHttpResponse().
EFI_STATUS HttpCreateTcp4RxEventForHeader | ( | IN HTTP_PROTOCOL * | HttpInstance | ) |
Create event for the TCP4 receive token which is used to receive HTTP header.
[in] | HttpInstance | Pointer to HTTP_PROTOCOL structure. |
EFI_SUCCESS | The events is created successfully. | |
others | Other error as indicated. |
References HttpCommonNotify().
Referenced by HttpResponseWorker().
EFI_STATUS HttpCreateTcp4TxEvent | ( | IN HTTP_TOKEN_WRAP * | Wrap | ) |
Create event for the TCP4 transmit token.
[in] | Wrap | Point to HTTP token's wrap data. |
EFI_SUCCESS | The events is created successfully. | |
others | Other error as indicated. |
References HttpTcpTransmitNotify(), HTTP_TCP_TOKEN_WRAP::TxData, and HTTP_TCP_TOKEN_WRAP::TxToken.
Referenced by EfiHttpRequest(), and HttpConfigureTcp4().
CHAR8* HttpGenRequestString | ( | IN HTTP_PROTOCOL * | HttpInstance, | |
IN EFI_HTTP_MESSAGE * | Message, | |||
IN CHAR8 * | Url | |||
) |
Generate HTTP request string.
[in] | HttpInstance | Pointer to HTTP_PROTOCOL structure. |
[in] | Message | Pointer to storage containing HTTP message data. |
[in] | Url | The URL of a remote host. |
NULL if any error occured.
References HTTP_GET_STR, HTTP_HEAD_STR, HTTP_MAXIMUM_METHOD_LEN, HTTP_VERSION_CRLF_STR, and mHttpUtilities.
Referenced by EfiHttpRequest(), and HttpTcpTransmit().
EFI_STATUS HttpInitProtocol | ( | IN HTTP_SERVICE * | HttpSb, | |
IN OUT HTTP_PROTOCOL * | HttpInstance | |||
) |
Intiialize the HTTP_PROTOCOL structure to the unconfigured state.
[in] | HttpSb | The HTTP service private instance. |
[in,out] | HttpInstance | Pointer to HTTP_PROTOCOL structure. |
EFI_SUCCESS | HTTP_PROTOCOL structure is initialized successfully. | |
Others | Other error as indicated. |
References HTTP_PROTOCOL_SIGNATURE, HTTP_URL_BUFFER_LEN, and mEfiHttpTemplate.
Referenced by EfiHttpConfigure(), and HttpServiceBindingCreateChild().
EFI_HTTP_STATUS_CODE HttpMappingToStatusCode | ( | IN UINTN | StatusCode | ) |
Translate the status code in HTTP message to EFI_HTTP_STATUS_CODE defined in UEFI 2.5 specification.
[in] | StatusCode | The status code value in HTTP message. |
Referenced by HttpResponseWorker().
EFI_STATUS EFIAPI HttpTcpNotReady | ( | IN NET_MAP * | Map, | |
IN NET_MAP_ITEM * | Item, | |||
IN VOID * | Context | |||
) |
Check whether the HTTP message associated with TxToken is already sent out.
[in] | Map | The container of TxToken. |
[in] | Item | Current item to check against. |
[in] | Context | The Token to check againist. |
EFI_NOT_READY | The HTTP message is still queued in the list. | |
EFI_SUCCESS | The HTTP message has been sent out. |
References HTTP_TCP_TOKEN_WRAP::IsTxDone, and HTTP_TOKEN_WRAP::TcpWrap.
Referenced by EfiHttpRequest().
EFI_STATUS EFIAPI HttpTcpReceive | ( | IN NET_MAP * | Map, | |
IN NET_MAP_ITEM * | Item, | |||
IN VOID * | Context | |||
) |
Receive the HTTP response by processing the associated HTTP token.
[in] | Map | The container of RxToken. |
[in] | Item | Current item to check against. |
[in] | Context | The Token to check againist. |
EFI_SUCCESS | The HTTP response is queued into TCP receive queue. | |
Others | Other error as indicated. |
References HttpResponseWorker().
Referenced by HttpTcpReceiveNotifyDpc().
VOID EFIAPI HttpTcpReceiveNotify | ( | IN EFI_EVENT | Event, | |
IN VOID * | Context | |||
) |
Request HttpTcpReceiveNotifyDpc as a DPC at TPL_CALLBACK.
Event | The receive event delivered to TCP for receive. | |
Context | Context for the callback. |
References HttpTcpReceiveNotifyDpc().
Referenced by HttpCreateTcp4RxEvent().
VOID EFIAPI HttpTcpReceiveNotifyDpc | ( | IN VOID * | Context | ) |
The notify function associated with RxToken for Tcp4->Receive ().
[in] | Context | The context. |
References _HTTP_PROTOCOL::CacheBody, _HTTP_PROTOCOL::CacheLen, _HTTP_PROTOCOL::CacheOffset, HTTP_TOKEN_WRAP::HttpInstance, HttpTcpReceive(), HTTP_TOKEN_WRAP::HttpToken, HTTP_TCP_TOKEN_WRAP::IsRxDone, _HTTP_PROTOCOL::MsgParser, _HTTP_PROTOCOL::NextMsg, HTTP_TCP_TOKEN_WRAP::RxData, HTTP_TCP_TOKEN_WRAP::RxToken, _HTTP_PROTOCOL::RxTokens, and HTTP_TOKEN_WRAP::TcpWrap.
Referenced by HttpTcpReceiveNotify().
EFI_STATUS EFIAPI HttpTcpTransmit | ( | IN NET_MAP * | Map, | |
IN NET_MAP_ITEM * | Item, | |||
IN VOID * | Context | |||
) |
Transmit the HTTP mssage by processing the associated HTTP token.
[in] | Map | The container of TxToken. |
[in] | Item | Current item to check against. |
[in] | Context | The Token to check againist. |
EFI_OUT_OF_RESOURCES | Failed to allocate resources. | |
EFI_SUCCESS | The HTTP message is queued into TCP transmit queue. |
References HttpGenRequestString(), HTTP_TOKEN_WRAP::HttpInstance, HTTP_TOKEN_WRAP::HttpToken, HttpTransmitTcp4(), HTTP_TCP_TOKEN_WRAP::IsTxDone, and HTTP_TOKEN_WRAP::TcpWrap.
Referenced by HttpTcpTransmitNotifyDpc().
VOID EFIAPI HttpTcpTransmitNotify | ( | IN EFI_EVENT | Event, | |
IN VOID * | Context | |||
) |
Request HttpTcpTransmitNotifyDpc as a DPC at TPL_CALLBACK.
Event | The receive event delivered to TCP for transmit. | |
Context | Context for the callback. |
References HttpTcpTransmitNotifyDpc().
Referenced by HttpCreateTcp4TxEvent().
VOID EFIAPI HttpTcpTransmitNotifyDpc | ( | IN VOID * | Context | ) |
The notify function associated with TxToken for Tcp4->Transmit().
[in] | Context | The context. |
References HTTP_TOKEN_WRAP::HttpInstance, HttpTcpTransmit(), HTTP_TOKEN_WRAP::HttpToken, HTTP_TCP_TOKEN_WRAP::IsTxDone, HTTP_TOKEN_WRAP::TcpWrap, HTTP_TCP_TOKEN_WRAP::TxToken, and _HTTP_PROTOCOL::TxTokens.
Referenced by HttpTcpTransmitNotify().
EFI_STATUS EFIAPI HttpTokenExist | ( | IN NET_MAP * | Map, | |
IN NET_MAP_ITEM * | Item, | |||
IN VOID * | Context | |||
) |
Check whether the user's token or event has already been enqueue on HTTP TxToken or RxToken list.
[in] | Map | The container of either user's transmit or receive token. |
[in] | Item | Current item to check against. |
[in] | Context | The Token to check againist. |
EFI_ACCESS_DENIED | The token or event has already been enqueued in IP | |
EFI_SUCCESS | The current item isn't the same token/event as the context. |
Referenced by EfiHttpRequest(), and EfiHttpResponse().
EFI_STATUS HttpTransmitTcp4 | ( | IN HTTP_PROTOCOL * | HttpInstance, | |
IN HTTP_TOKEN_WRAP * | Wrap, | |||
IN UINT8 * | TxString, | |||
IN UINTN | TxStringLen | |||
) |
Send the HTTP message through TCP4.
[in] | HttpInstance | The HTTP instance private data. |
[in] | Wrap | The HTTP token's wrap data. |
[in] | TxString | Buffer containing the HTTP message string. |
[in] | TxStringLen | Length of the HTTP message string in bytes. |
EFI_SUCCESS | The HTTP message is queued into TCP transmit queue. | |
Others | Other error as indicated. |
Referenced by EfiHttpRequest(), and HttpTcpTransmit().