NetworkPkg/HttpDxe: HTTPS support over IPv4 and IPv6
[mirror_edk2.git] / NetworkPkg / HttpDxe / HttpProto.h
CommitLineData
47f51a06
YT
1/** @file\r
2 The header files of miscellaneous routines for HttpDxe driver.\r
3\r
072289f4 4Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
f58554fc 5(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
47f51a06
YT
6This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __EFI_HTTP_PROTO_H__\r
17#define __EFI_HTTP_PROTO_H__\r
18\r
19#define DEF_BUF_LEN 2048\r
20\r
21#define HTTP_SERVICE_SIGNATURE SIGNATURE_32('H', 't', 't', 'S')\r
22\r
23#define HTTP_SERVICE_FROM_PROTOCOL(a) \\r
24 CR ( \\r
25 (a), \\r
26 HTTP_SERVICE, \\r
27 ServiceBinding, \\r
28 HTTP_SERVICE_SIGNATURE \\r
29 )\r
30\r
b659408b 31\r
47f51a06
YT
32//\r
33// The state of HTTP protocol. It starts from UNCONFIGED.\r
34//\r
35#define HTTP_STATE_UNCONFIGED 0\r
36#define HTTP_STATE_HTTP_CONFIGED 1\r
37#define HTTP_STATE_TCP_CONFIGED 2\r
38#define HTTP_STATE_TCP_UNCONFIGED 3\r
39#define HTTP_STATE_TCP_CONNECTED 4\r
40#define HTTP_STATE_TCP_CLOSED 5\r
41\r
42//\r
43// TCP configured data.\r
44//\r
45#define HTTP_TOS_DEAULT 8\r
46#define HTTP_TTL_DEAULT 255\r
47#define HTTP_BUFFER_SIZE_DEAULT 65535\r
48#define HTTP_MAX_SYN_BACK_LOG 5\r
49#define HTTP_CONNECTION_TIMEOUT 60\r
b347a22a 50#define HTTP_RESPONSE_TIMEOUT 5\r
47f51a06
YT
51#define HTTP_DATA_RETRIES 12\r
52#define HTTP_FIN_TIMEOUT 2\r
53#define HTTP_KEEP_ALIVE_PROBES 6\r
54#define HTTP_KEEP_ALIVE_TIME 7200\r
55#define HTTP_KEEP_ALIVE_INTERVAL 30\r
56\r
51b0450e
FS
57#define HTTP_URL_BUFFER_LEN 4096\r
58\r
47f51a06
YT
59typedef struct _HTTP_SERVICE {\r
60 UINT32 Signature;\r
61 EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;\r
62 EFI_HANDLE ImageHandle;\r
63 EFI_HANDLE ControllerHandle;\r
b659408b
ZL
64 EFI_HANDLE Tcp4ChildHandle;\r
65 EFI_HANDLE Tcp6ChildHandle;\r
47f51a06
YT
66 LIST_ENTRY ChildrenList;\r
67 UINTN ChildrenNumber;\r
47f51a06
YT
68 INTN State;\r
69} HTTP_SERVICE;\r
70\r
71typedef struct {\r
b659408b
ZL
72 EFI_TCP4_IO_TOKEN Tx4Token;\r
73 EFI_TCP4_TRANSMIT_DATA Tx4Data;\r
74 EFI_TCP6_IO_TOKEN Tx6Token;\r
75 EFI_TCP6_TRANSMIT_DATA Tx6Data;\r
76 EFI_TCP4_IO_TOKEN Rx4Token;\r
77 EFI_TCP4_RECEIVE_DATA Rx4Data;\r
78 EFI_TCP6_IO_TOKEN Rx6Token;\r
79 EFI_TCP6_RECEIVE_DATA Rx6Data;\r
47f51a06 80 BOOLEAN IsTxDone;\r
47f51a06
YT
81 BOOLEAN IsRxDone;\r
82 UINTN BodyLen;\r
83 EFI_HTTP_METHOD Method;\r
84} HTTP_TCP_TOKEN_WRAP;\r
85\r
dac45de3
JW
86typedef struct {\r
87 EFI_TLS_VERSION Version;\r
88 EFI_TLS_CONNECTION_END ConnectionEnd;\r
89 EFI_TLS_VERIFY VerifyMethod;\r
90 EFI_TLS_SESSION_STATE SessionState;\r
91} TLS_CONFIG_DATA;\r
92\r
47f51a06
YT
93typedef struct _HTTP_PROTOCOL {\r
94 UINT32 Signature;\r
95 EFI_HTTP_PROTOCOL Http;\r
96 EFI_HANDLE Handle;\r
97 HTTP_SERVICE *Service;\r
98 LIST_ENTRY Link; // Link to all HTTP instance from the service.\r
99 BOOLEAN InDestroy;\r
100 INTN State;\r
d8293d31 101 EFI_HTTP_METHOD Method;\r
47f51a06 102\r
072289f4
ZL
103 UINTN StatusCode;\r
104\r
b347a22a
JW
105 EFI_EVENT TimeoutEvent;\r
106\r
b659408b 107 EFI_HANDLE Tcp4ChildHandle;\r
47f51a06
YT
108 EFI_TCP4_PROTOCOL *Tcp4;\r
109 EFI_TCP4_CONFIG_DATA Tcp4CfgData;\r
110 EFI_TCP4_OPTION Tcp4Option;\r
111\r
b659408b
ZL
112 EFI_TCP4_CONNECTION_TOKEN Tcp4ConnToken;\r
113 BOOLEAN IsTcp4ConnDone;\r
114 EFI_TCP4_CLOSE_TOKEN Tcp4CloseToken;\r
115 BOOLEAN IsTcp4CloseDone;\r
47f51a06
YT
116 CHAR8 *RemoteHost;\r
117 UINT16 RemotePort;\r
118 EFI_IPv4_ADDRESS RemoteAddr;\r
b659408b
ZL
119 \r
120 EFI_HANDLE Tcp6ChildHandle;\r
121 EFI_TCP6_PROTOCOL *Tcp6;\r
122 EFI_TCP6_CONFIG_DATA Tcp6CfgData;\r
123 EFI_TCP6_OPTION Tcp6Option;\r
124 \r
125 EFI_TCP6_CONNECTION_TOKEN Tcp6ConnToken;\r
126 BOOLEAN IsTcp6ConnDone;\r
127 EFI_TCP6_CLOSE_TOKEN Tcp6CloseToken;\r
128 BOOLEAN IsTcp6CloseDone;\r
129 EFI_IPv6_ADDRESS RemoteIpv6Addr;\r
b347a22a 130 \r
47f51a06 131 //\r
b659408b 132 // Rx4Token or Rx6Token used for receiving HTTP header.\r
47f51a06 133 //\r
b659408b
ZL
134 EFI_TCP4_IO_TOKEN Rx4Token;\r
135 EFI_TCP4_RECEIVE_DATA Rx4Data;\r
136 EFI_TCP6_IO_TOKEN Rx6Token;\r
137 EFI_TCP6_RECEIVE_DATA Rx6Data;\r
47f51a06
YT
138 BOOLEAN IsRxDone;\r
139\r
b659408b
ZL
140 CHAR8 **EndofHeader;\r
141 CHAR8 **HttpHeaders;\r
47f51a06
YT
142 CHAR8 *CacheBody;\r
143 CHAR8 *NextMsg;\r
144 UINTN CacheLen;\r
145 UINTN CacheOffset;\r
146\r
147 //\r
148 // HTTP message-body parser.\r
149 //\r
150 VOID *MsgParser;\r
151 \r
152 EFI_HTTP_VERSION HttpVersion;\r
153 UINT32 TimeOutMillisec;\r
154 BOOLEAN LocalAddressIsIPv6;\r
155\r
156 EFI_HTTPv4_ACCESS_POINT IPv4Node;\r
b659408b 157 EFI_HTTPv6_ACCESS_POINT Ipv6Node;\r
47f51a06
YT
158\r
159 NET_MAP TxTokens;\r
160 NET_MAP RxTokens;\r
51b0450e
FS
161\r
162 CHAR8 *Url;\r
dac45de3
JW
163\r
164 //\r
165 // Https Support\r
166 //\r
167 BOOLEAN UseHttps;\r
168 \r
169 EFI_HANDLE TlsChildHandle; /// Tls ChildHandle\r
170 TLS_CONFIG_DATA TlsConfigData;\r
171 EFI_TLS_PROTOCOL *Tls;\r
172 EFI_TLS_CONFIGURATION_PROTOCOL *TlsConfiguration;\r
173 EFI_TLS_SESSION_STATE TlsSessionState;\r
174\r
175 //\r
176 // TlsTxData used for transmitting TLS related messages.\r
177 //\r
178 EFI_TCP4_IO_TOKEN Tcp4TlsTxToken;\r
179 EFI_TCP4_TRANSMIT_DATA Tcp4TlsTxData;\r
180 EFI_TCP6_IO_TOKEN Tcp6TlsTxToken;\r
181 EFI_TCP6_TRANSMIT_DATA Tcp6TlsTxData;\r
182 BOOLEAN TlsIsTxDone;\r
183\r
184 //\r
185 // TlsRxData used for receiving TLS related messages.\r
186 //\r
187 EFI_TCP4_IO_TOKEN Tcp4TlsRxToken;\r
188 EFI_TCP4_RECEIVE_DATA Tcp4TlsRxData;\r
189 EFI_TCP6_IO_TOKEN Tcp6TlsRxToken;\r
190 EFI_TCP6_RECEIVE_DATA Tcp6TlsRxData;\r
191 BOOLEAN TlsIsRxDone;\r
47f51a06
YT
192} HTTP_PROTOCOL;\r
193\r
194typedef struct {\r
195 EFI_HTTP_TOKEN *HttpToken;\r
196 HTTP_PROTOCOL *HttpInstance;\r
197 HTTP_TCP_TOKEN_WRAP TcpWrap;\r
198} HTTP_TOKEN_WRAP;\r
199\r
200\r
201#define HTTP_PROTOCOL_SIGNATURE SIGNATURE_32('H', 't', 't', 'P')\r
202\r
203#define HTTP_INSTANCE_FROM_PROTOCOL(a) \\r
204 CR ( \\r
205 (a), \\r
206 HTTP_PROTOCOL, \\r
207 Http, \\r
208 HTTP_PROTOCOL_SIGNATURE \\r
209 )\r
210\r
211/**\r
212 The common notify function used in HTTP driver. \r
213\r
214 @param[in] Event The event signaled.\r
215 @param[in] Context The context.\r
216\r
217**/\r
218VOID\r
219EFIAPI\r
220HttpCommonNotify (\r
221 IN EFI_EVENT Event,\r
222 IN VOID *Context\r
223 );\r
224\r
225/**\r
b659408b 226 Create events for the TCP connection token and TCP close token.\r
47f51a06
YT
227\r
228 @param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.\r
229\r
230 @retval EFI_SUCCESS The events are created successfully.\r
231 @retval others Other error as indicated.\r
232\r
233**/\r
234EFI_STATUS\r
b659408b 235HttpCreateTcpConnCloseEvent (\r
47f51a06
YT
236 IN HTTP_PROTOCOL *HttpInstance\r
237 );\r
238\r
239/**\r
b659408b 240 Close events in the TCP connection token and TCP close token.\r
47f51a06
YT
241\r
242 @param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.\r
243\r
244**/\r
245VOID\r
b659408b 246HttpCloseTcpConnCloseEvent (\r
47f51a06
YT
247 IN HTTP_PROTOCOL *HttpInstance\r
248 );\r
249\r
250/**\r
b659408b 251 Create event for the TCP transmit token.\r
47f51a06
YT
252\r
253 @param[in] Wrap Point to HTTP token's wrap data.\r
254\r
255 @retval EFI_SUCCESS The events is created successfully.\r
256 @retval others Other error as indicated.\r
257\r
258**/\r
259EFI_STATUS\r
b659408b 260HttpCreateTcpTxEvent (\r
47f51a06
YT
261 IN HTTP_TOKEN_WRAP *Wrap\r
262 );\r
263\r
264/**\r
b659408b 265 Create event for the TCP receive token which is used to receive HTTP header.\r
47f51a06
YT
266\r
267 @param[in] HttpInstance Pointer to HTTP_PROTOCOL structure.\r
268\r
269 @retval EFI_SUCCESS The events is created successfully.\r
270 @retval others Other error as indicated.\r
271\r
272**/\r
273EFI_STATUS\r
b659408b 274HttpCreateTcpRxEventForHeader (\r
47f51a06
YT
275 IN HTTP_PROTOCOL *HttpInstance\r
276 );\r
277\r
278/**\r
b659408b 279 Create event for the TCP receive token which is used to receive HTTP body.\r
47f51a06
YT
280\r
281 @param[in] Wrap Point to HTTP token's wrap data.\r
282\r
283 @retval EFI_SUCCESS The events is created successfully.\r
284 @retval others Other error as indicated.\r
285\r
286**/\r
287EFI_STATUS\r
b659408b 288HttpCreateTcpRxEvent (\r
47f51a06
YT
289 IN HTTP_TOKEN_WRAP *Wrap \r
290 );\r
291\r
b659408b
ZL
292/**\r
293 Close Events for Tcp Receive Tokens for HTTP body and HTTP header.\r
294\r
295 @param[in] Wrap Pointer to HTTP token's wrap data.\r
296 \r
297**/\r
298VOID\r
299HttpCloseTcpRxEvent (\r
300 IN HTTP_TOKEN_WRAP *Wrap\r
301 );\r
302\r
47f51a06
YT
303/**\r
304 Intiialize the HTTP_PROTOCOL structure to the unconfigured state.\r
305\r
47f51a06 306 @param[in, out] HttpInstance Pointer to HTTP_PROTOCOL structure.\r
b659408b 307 @param[in] IpVersion Indicate us TCP4 protocol or TCP6 protocol.\r
47f51a06
YT
308\r
309 @retval EFI_SUCCESS HTTP_PROTOCOL structure is initialized successfully. \r
310 @retval Others Other error as indicated.\r
311\r
312**/\r
313EFI_STATUS\r
314HttpInitProtocol (\r
b659408b
ZL
315 IN OUT HTTP_PROTOCOL *HttpInstance,\r
316 IN BOOLEAN IpVersion\r
47f51a06
YT
317 );\r
318\r
319/**\r
320 Clean up the HTTP child, release all the resources used by it.\r
321\r
322 @param[in] HttpInstance The HTTP child to clean up.\r
323\r
324**/\r
325VOID\r
326HttpCleanProtocol (\r
327 IN HTTP_PROTOCOL *HttpInstance\r
328 );\r
329\r
330/**\r
331 Establish TCP connection with HTTP server.\r
332\r
333 @param[in] HttpInstance The HTTP instance private data.\r
334\r
335 @retval EFI_SUCCESS The TCP connection is established.\r
336 @retval Others Other error as indicated.\r
337\r
338**/\r
339EFI_STATUS\r
340HttpCreateConnection (\r
341 IN HTTP_PROTOCOL *HttpInstance\r
342 );\r
343\r
344/**\r
345 Close existing TCP connection.\r
346\r
347 @param[in] HttpInstance The HTTP instance private data.\r
348\r
349 @retval EFI_SUCCESS The TCP connection is closed.\r
350 @retval Others Other error as indicated.\r
351\r
352**/\r
353EFI_STATUS\r
354HttpCloseConnection (\r
355 IN HTTP_PROTOCOL *HttpInstance\r
356 );\r
357\r
358/**\r
359 Configure TCP4 protocol child.\r
360\r
361 @param[in] HttpInstance The HTTP instance private data.\r
362 @param[in] Wrap The HTTP token's wrap data.\r
363\r
364 @retval EFI_SUCCESS The TCP4 protocol child is configured.\r
365 @retval Others Other error as indicated.\r
366\r
367**/\r
368EFI_STATUS\r
369HttpConfigureTcp4 (\r
370 IN HTTP_PROTOCOL *HttpInstance,\r
371 IN HTTP_TOKEN_WRAP *Wrap\r
372 );\r
373\r
b659408b
ZL
374/**\r
375 Configure TCP6 protocol child.\r
376\r
377 @param[in] HttpInstance The HTTP instance private data.\r
378 @param[in] Wrap The HTTP token's wrap data.\r
379\r
380 @retval EFI_SUCCESS The TCP6 protocol child is configured.\r
381 @retval Others Other error as indicated.\r
382\r
383**/\r
384EFI_STATUS\r
385HttpConfigureTcp6 (\r
386 IN HTTP_PROTOCOL *HttpInstance,\r
387 IN HTTP_TOKEN_WRAP *Wrap\r
388 );\r
389\r
47f51a06 390/**\r
dac45de3
JW
391 Check existing TCP connection, if in error state, recover TCP4 connection. Then, \r
392 connect one TLS session if required.\r
47f51a06
YT
393\r
394 @param[in] HttpInstance The HTTP instance private data.\r
395\r
396 @retval EFI_SUCCESS The TCP connection is established.\r
397 @retval EFI_NOT_READY TCP4 protocol child is not created or configured.\r
398 @retval Others Other error as indicated.\r
399\r
400**/\r
401EFI_STATUS\r
402HttpConnectTcp4 (\r
403 IN HTTP_PROTOCOL *HttpInstance\r
404 );\r
405\r
406/**\r
dac45de3
JW
407 Check existing TCP connection, if in error state, recover TCP6 connection. Then, \r
408 connect one TLS session if required.\r
b659408b
ZL
409\r
410 @param[in] HttpInstance The HTTP instance private data.\r
411\r
412 @retval EFI_SUCCESS The TCP connection is established.\r
413 @retval EFI_NOT_READY TCP6 protocol child is not created or configured.\r
414 @retval Others Other error as indicated.\r
415\r
416**/\r
417EFI_STATUS\r
418HttpConnectTcp6 (\r
419 IN HTTP_PROTOCOL *HttpInstance\r
420 );\r
421\r
422/**\r
dac45de3 423 Send the HTTP or HTTPS message through TCP4 or TCP6.\r
47f51a06
YT
424\r
425 @param[in] HttpInstance The HTTP instance private data.\r
426 @param[in] Wrap The HTTP token's wrap data.\r
427 @param[in] TxString Buffer containing the HTTP message string.\r
428 @param[in] TxStringLen Length of the HTTP message string in bytes.\r
429\r
430 @retval EFI_SUCCESS The HTTP message is queued into TCP transmit queue.\r
431 @retval Others Other error as indicated.\r
432\r
433**/\r
434EFI_STATUS\r
b659408b 435HttpTransmitTcp (\r
47f51a06
YT
436 IN HTTP_PROTOCOL *HttpInstance,\r
437 IN HTTP_TOKEN_WRAP *Wrap,\r
438 IN UINT8 *TxString,\r
439 IN UINTN TxStringLen\r
440 );\r
441\r
47f51a06
YT
442/**\r
443 Check whether the user's token or event has already\r
b659408b 444 been enqueue on HTTP Tx or Rx Token list.\r
47f51a06
YT
445\r
446 @param[in] Map The container of either user's transmit or receive\r
447 token.\r
448 @param[in] Item Current item to check against.\r
449 @param[in] Context The Token to check againist.\r
450\r
451 @retval EFI_ACCESS_DENIED The token or event has already been enqueued in IP\r
452 @retval EFI_SUCCESS The current item isn't the same token/event as the\r
453 context.\r
454\r
455**/\r
456EFI_STATUS\r
457EFIAPI\r
458HttpTokenExist (\r
459 IN NET_MAP *Map,\r
460 IN NET_MAP_ITEM *Item,\r
461 IN VOID *Context\r
462 );\r
463\r
464/**\r
b659408b 465 Check whether the HTTP message associated with TxToken or Tx6Token is already sent out.\r
47f51a06
YT
466\r
467 @param[in] Map The container of TxToken.\r
468 @param[in] Item Current item to check against.\r
469 @param[in] Context The Token to check againist.\r
470\r
471 @retval EFI_NOT_READY The HTTP message is still queued in the list.\r
472 @retval EFI_SUCCESS The HTTP message has been sent out.\r
473\r
474**/\r
475EFI_STATUS\r
476EFIAPI\r
477HttpTcpNotReady (\r
478 IN NET_MAP *Map,\r
479 IN NET_MAP_ITEM *Item,\r
480 IN VOID *Context\r
481 );\r
482\r
b659408b 483/**\r
dac45de3 484 Initialize Http session.\r
b659408b
ZL
485\r
486 @param[in] HttpInstance The HTTP instance private data.\r
487 @param[in] Wrap The HTTP token's wrap data.\r
dac45de3
JW
488 @param[in] Configure The Flag indicates whether need to initialize session.\r
489 @param[in] TlsConfigure The Flag indicates whether it's the new Tls session.\r
b659408b 490\r
dac45de3 491 @retval EFI_SUCCESS The initialization of session is done. \r
b659408b
ZL
492 @retval Others Other error as indicated.\r
493\r
494**/\r
495EFI_STATUS\r
dac45de3 496HttpInitSession (\r
b659408b 497 IN HTTP_PROTOCOL *HttpInstance,\r
a2e61982 498 IN HTTP_TOKEN_WRAP *Wrap,\r
dac45de3
JW
499 IN BOOLEAN Configure,\r
500 IN BOOLEAN TlsConfigure\r
b659408b
ZL
501 );\r
502\r
47f51a06 503/**\r
dac45de3 504 Transmit the HTTP or HTTPS mssage by processing the associated HTTP token.\r
47f51a06 505\r
b659408b 506 @param[in] Map The container of TxToken or Tx6Token.\r
47f51a06
YT
507 @param[in] Item Current item to check against.\r
508 @param[in] Context The Token to check againist.\r
509\r
510 @retval EFI_OUT_OF_RESOURCES Failed to allocate resources.\r
511 @retval EFI_SUCCESS The HTTP message is queued into TCP transmit\r
512 queue.\r
513\r
514**/\r
515EFI_STATUS\r
516EFIAPI\r
517HttpTcpTransmit (\r
518 IN NET_MAP *Map,\r
519 IN NET_MAP_ITEM *Item,\r
520 IN VOID *Context\r
521 );\r
522\r
523/**\r
524 Receive the HTTP response by processing the associated HTTP token.\r
525\r
b659408b 526 @param[in] Map The container of Rx4Token or Rx6Token.\r
47f51a06
YT
527 @param[in] Item Current item to check against.\r
528 @param[in] Context The Token to check againist.\r
529\r
530 @retval EFI_SUCCESS The HTTP response is queued into TCP receive\r
531 queue.\r
532 @retval Others Other error as indicated.\r
533\r
534**/\r
535EFI_STATUS\r
536EFIAPI\r
537HttpTcpReceive (\r
538 IN NET_MAP *Map,\r
539 IN NET_MAP_ITEM *Item,\r
540 IN VOID *Context\r
541 );\r
542\r
b659408b
ZL
543/**\r
544 Receive the HTTP header by processing the associated HTTP token.\r
545\r
546 @param[in] HttpInstance The HTTP instance private data.\r
547 @param[in, out] SizeofHeaders The HTTP header length.\r
548 @param[in, out] BufferSize The size of buffer to cacahe the header message.\r
b347a22a 549 @param[in] Timeout The time to wait for receiving the header packet.\r
b659408b
ZL
550\r
551 @retval EFI_SUCCESS The HTTP header is received. \r
552 @retval Others Other errors as indicated.\r
553\r
554**/\r
555EFI_STATUS\r
556HttpTcpReceiveHeader (\r
557 IN HTTP_PROTOCOL *HttpInstance,\r
558 IN OUT UINTN *SizeofHeaders,\r
b347a22a
JW
559 IN OUT UINTN *BufferSize,\r
560 IN EFI_EVENT Timeout\r
b659408b
ZL
561 );\r
562\r
563/**\r
564 Receive the HTTP body by processing the associated HTTP token.\r
565\r
566 @param[in] Wrap The HTTP token's wrap data.\r
567 @param[in] HttpMsg The HTTP message data.\r
568\r
569 @retval EFI_SUCCESS The HTTP body is received. \r
570 @retval Others Other error as indicated.\r
571\r
572**/\r
573EFI_STATUS\r
574HttpTcpReceiveBody (\r
575 IN HTTP_TOKEN_WRAP *Wrap,\r
30526a51 576 IN EFI_HTTP_MESSAGE *HttpMsg\r
b659408b
ZL
577 );\r
578\r
579/**\r
580 Clean up Tcp Tokens while the Tcp transmission error occurs.\r
581\r
582 @param[in] Wrap Pointer to HTTP token's wrap data.\r
583 \r
584**/\r
585VOID\r
586HttpTcpTokenCleanup (\r
587 IN HTTP_TOKEN_WRAP *Wrap\r
588 );\r
589\r
47f51a06
YT
590/**\r
591 The work function of EfiHttpResponse().\r
592\r
593 @param[in] Wrap Pointer to HTTP token's wrap data.\r
594\r
595 @retval EFI_SUCCESS Allocation succeeded.\r
596 @retval EFI_OUT_OF_RESOURCES Failed to complete the opration due to lack of resources.\r
597 @retval EFI_NOT_READY Can't find a corresponding TxToken.\r
598\r
599**/\r
600EFI_STATUS\r
601HttpResponseWorker (\r
602 IN HTTP_TOKEN_WRAP *Wrap\r
603 );\r
604\r
605#endif\r