34 TmpIpDevicePath =
NULL;
35 TmpDnsDevicePath =
NULL;
40 if (!Private->UsingIpv6) {
43 return EFI_OUT_OF_RESOURCES;
51 Node->Ipv4.
Protocol = EFI_IP_PROTO_TCP;
58 return EFI_OUT_OF_RESOURCES;
66 Node->Ipv6.
Protocol = EFI_IP_PROTO_TCP;
75 if (TmpIpDevicePath ==
NULL) {
76 return EFI_OUT_OF_RESOURCES;
82 if (Private->DnsServerIp !=
NULL) {
87 return EFI_OUT_OF_RESOURCES;
93 Node->Dns.
IsIPv6 = Private->UsingIpv6 ? 0x01 : 0x00;
99 TmpIpDevicePath =
NULL;
100 if (TmpDnsDevicePath ==
NULL) {
101 return EFI_OUT_OF_RESOURCES;
111 if (TmpIpDevicePath !=
NULL) {
115 if (TmpDnsDevicePath !=
NULL) {
119 return EFI_OUT_OF_RESOURCES;
127 if (TmpDnsDevicePath !=
NULL) {
131 ASSERT (TmpIpDevicePath !=
NULL);
137 if (NewDevicePath ==
NULL) {
138 return EFI_OUT_OF_RESOURCES;
141 if (!Private->UsingIpv6) {
145 Status =
gBS->ReinstallProtocolInterface (
146 Private->Ip4Nic->Controller,
147 &gEfiDevicePathProtocolGuid,
148 Private->Ip4Nic->DevicePath,
151 if (EFI_ERROR (Status)) {
155 FreePool (Private->Ip4Nic->DevicePath);
156 Private->Ip4Nic->DevicePath = NewDevicePath;
161 Status =
gBS->ReinstallProtocolInterface (
162 Private->Ip6Nic->Controller,
163 &gEfiDevicePathProtocolGuid,
164 Private->Ip6Nic->DevicePath,
167 if (EFI_ERROR (Status)) {
171 FreePool (Private->Ip6Nic->DevicePath);
172 Private->Ip6Nic->DevicePath = NewDevicePath;
196 UINT32 DnsServerIndex;
200 ASSERT (Private !=
NULL);
201 ASSERT (Private->SelectIndex != 0);
202 SelectIndex = Private->SelectIndex - 1;
203 ASSERT (SelectIndex < HTTP_BOOT_OFFER_MAX_NUM);
213 SelectOffer = &Private->OfferBuffer[SelectIndex].Dhcp4;
214 if (Private->FilePathUri ==
NULL) {
218 if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
219 (SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns) ||
220 (SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns))
222 HttpOffer = SelectOffer;
224 ASSERT (Private->SelectProxyType != HttpOfferTypeMax);
225 ProxyIndex = Private->OfferIndex[Private->SelectProxyType][0];
226 HttpOffer = &Private->OfferBuffer[ProxyIndex].Dhcp4;
229 Private->BootFileUriParser = HttpOffer->UriParser;
230 Private->BootFileUri = (CHAR8 *)HttpOffer->OptList[HTTP_BOOT_DHCP4_TAG_INDEX_BOOTFILE]->
Data;
235 Private->BootFileUriParser = Private->FilePathUriParser;
236 Private->BootFileUri = Private->FilePathUri;
243 if (EFI_ERROR (Status)) {
244 DEBUG ((DEBUG_ERROR,
"HttpBootDhcp4ExtractUriInfo: %r.\n", Status));
245 if (Status == EFI_INVALID_PARAMETER) {
246 AsciiPrint (
"\n Error: Invalid URI address.\n");
247 }
else if (Status == EFI_ACCESS_DENIED) {
248 AsciiPrint (
"\n Error: Access forbidden, only HTTPS connection is allowed.\n");
254 if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
255 (SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
256 (SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns))
258 Option = SelectOffer->OptList[HTTP_BOOT_DHCP4_TAG_INDEX_DNS_SERVER];
259 ASSERT (Option !=
NULL);
267 if (Private->DnsServerIp ==
NULL) {
268 return EFI_OUT_OF_RESOURCES;
271 for (DnsServerIndex = 0; DnsServerIndex < Private->DnsServerCount; DnsServerIndex++) {
283 if (EFI_ERROR (Status)) {
285 Private->DnsServerIp =
NULL;
294 Private->BootFileUri,
295 Private->BootFileUriParser,
298 if (EFI_ERROR (Status) || (Private->Port == 0)) {
310 if (EFI_ERROR (Status) && (Private->DnsServerIp !=
NULL)) {
312 Private->DnsServerIp =
NULL;
336 UINT32 DnsServerIndex;
344 ASSERT (Private !=
NULL);
345 ASSERT (Private->SelectIndex != 0);
346 SelectIndex = Private->SelectIndex - 1;
347 ASSERT (SelectIndex < HTTP_BOOT_OFFER_MAX_NUM);
357 SelectOffer = &Private->OfferBuffer[SelectIndex].Dhcp6;
358 if (Private->FilePathUri ==
NULL) {
362 if ((SelectOffer->OfferType == HttpOfferTypeDhcpIpUri) ||
363 (SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns) ||
364 (SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns))
366 HttpOffer = SelectOffer;
368 ASSERT (Private->SelectProxyType != HttpOfferTypeMax);
369 ProxyIndex = Private->OfferIndex[Private->SelectProxyType][0];
370 HttpOffer = &Private->OfferBuffer[ProxyIndex].Dhcp6;
373 Private->BootFileUriParser = HttpOffer->UriParser;
374 Private->BootFileUri = (CHAR8 *)HttpOffer->OptList[HTTP_BOOT_DHCP6_IDX_BOOT_FILE_URL]->
Data;
379 Private->BootFileUriParser = Private->FilePathUriParser;
380 Private->BootFileUri = Private->FilePathUri;
387 if (EFI_ERROR (Status)) {
388 DEBUG ((DEBUG_ERROR,
"HttpBootDhcp6ExtractUriInfo: %r.\n", Status));
389 if (Status == EFI_INVALID_PARAMETER) {
390 AsciiPrint (
"\n Error: Invalid URI address.\n");
391 }
else if (Status == EFI_ACCESS_DENIED) {
392 AsciiPrint (
"\n Error: Access forbidden, only HTTPS connection is allowed.\n");
402 if (EFI_ERROR (Status)) {
410 if (EFI_ERROR (Status)) {
414 if ((SelectOffer->OfferType == HttpOfferTypeDhcpNameUriDns) ||
415 (SelectOffer->OfferType == HttpOfferTypeDhcpDns) ||
416 (SelectOffer->OfferType == HttpOfferTypeDhcpIpUriDns))
418 Option = SelectOffer->OptList[HTTP_BOOT_DHCP6_IDX_DNS_SERVER];
419 ASSERT (Option !=
NULL);
427 if (Private->DnsServerIp ==
NULL) {
428 return EFI_OUT_OF_RESOURCES;
431 for (DnsServerIndex = 0; DnsServerIndex < Private->DnsServerCount; DnsServerIndex++) {
440 HTONS (Option->
OpLen),
443 if (EFI_ERROR (Status)) {
453 Private->BootFileUri,
454 Private->BootFileUriParser,
458 if (EFI_ERROR (Status)) {
463 Private->BootFileUri,
464 Private->BootFileUriParser,
467 if (EFI_ERROR (Status)) {
473 if (HostNameStr ==
NULL) {
474 Status = EFI_OUT_OF_RESOURCES;
480 if (HostName !=
NULL) {
484 Status =
HttpBootDns (Private, HostNameStr, &IpAddr);
486 if (EFI_ERROR (Status)) {
487 AsciiPrint (
"\n Error: Could not retrieve the host address from DNS server.\n");
498 Private->BootFileUri,
499 Private->BootFileUriParser,
502 if (EFI_ERROR (Status) || (Private->Port == 0)) {
514 if (EFI_ERROR (Status)) {
521 if (Private->DnsServerIp !=
NULL) {
523 Private->DnsServerIp =
NULL;
550 if (EFI_ERROR (Status)) {
554 if (!Private->UsingIpv6) {
585 if (Private->HttpBootCallback !=
NULL) {
586 Status = Private->HttpBootCallback->Callback (
587 Private->HttpBootCallback,
589 EventType == HttpIoRequest ?
FALSE :
TRUE,
618 ASSERT (Private !=
NULL);
623 TimeoutValue =
PcdGet32 (PcdHttpIoTimeout);
626 if (!Private->UsingIpv6) {
627 ConfigData.Config4.HttpVersion = HttpVersion11;
629 IP4_COPY_ADDRESS (&ConfigData.Config4.LocalIp, &Private->StationIp.v4);
630 IP4_COPY_ADDRESS (&ConfigData.Config4.SubnetMask, &Private->SubnetMask.v4);
631 ImageHandle = Private->Ip4Nic->ImageHandle;
633 ConfigData.Config6.HttpVersion = HttpVersion11;
635 IP6_COPY_ADDRESS (&ConfigData.Config6.LocalIp, &Private->StationIp.v6);
636 ImageHandle = Private->Ip6Nic->ImageHandle;
642 Private->UsingIpv6 ? IP_VERSION_6 : IP_VERSION_4,
648 if (EFI_ERROR (Status)) {
652 Private->HttpCreated =
TRUE;
676 if (Cache->RequestData !=
NULL) {
677 if (Cache->RequestData->Url !=
NULL) {
687 if (Cache->ResponseData !=
NULL) {
688 if (Cache->ResponseData->Headers !=
NULL) {
689 for (Index = 0; Index < Cache->ResponseData->HeaderCount; Index++) {
690 FreePool (Cache->ResponseData->Headers[Index].FieldName);
691 FreePool (Cache->ResponseData->Headers[Index].FieldValue);
694 FreePool (Cache->ResponseData->Headers);
701 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Cache->EntityDataList) {
703 if (EntityData->Block !=
NULL) {
730 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Private->CacheList) {
761 OUT HTTP_BOOT_IMAGE_TYPE *ImageType
770 if ((Uri ==
NULL) || (BufferSize ==
NULL) || (Buffer ==
NULL) || (ImageType ==
NULL)) {
771 return EFI_INVALID_PARAMETER;
774 NET_LIST_FOR_EACH (Entry, &Private->CacheList) {
779 if ((Cache->RequestData !=
NULL) &&
780 (Cache->RequestData->
Url !=
NULL) &&
781 (
StrCmp (Uri, Cache->RequestData->
Url) == 0))
786 *ImageType = Cache->ImageType;
791 if (*BufferSize < Cache->EntityLength) {
792 *BufferSize = Cache->EntityLength;
793 return EFI_BUFFER_TOO_SMALL;
800 NET_LIST_FOR_EACH (Entry2, &Cache->EntityDataList) {
802 if (*BufferSize > CopyedSize) {
805 EntityData->DataStart,
806 MIN (EntityData->DataLength, *BufferSize - CopyedSize)
808 CopyedSize +=
MIN (EntityData->DataLength, *BufferSize - CopyedSize);
811 *BufferSize = CopyedSize;
816 return EFI_NOT_FOUND;
837 IN HTTP_BODY_PARSE_EVENT EventType,
851 if (EventType != BodyParseEventOnData) {
865 if (EFI_ERROR (Status)) {
873 if (CallbackData->BufferSize > CallbackData->CopyedSize) {
875 CallbackData->Buffer + CallbackData->CopyedSize,
877 MIN (Length, CallbackData->BufferSize - CallbackData->CopyedSize)
879 CallbackData->CopyedSize +=
MIN (Length, CallbackData->BufferSize - CallbackData->CopyedSize);
885 if (CallbackData->Cache !=
NULL) {
887 if (NewEntityData ==
NULL) {
888 return EFI_OUT_OF_RESOURCES;
891 if (CallbackData->NewBlock) {
892 NewEntityData->Block = CallbackData->Block;
893 CallbackData->Block =
NULL;
896 NewEntityData->DataLength = Length;
897 NewEntityData->DataStart = (UINT8 *)Data;
898 InsertTailList (&CallbackData->Cache->EntityDataList, &NewEntityData->Link);
935 IN BOOLEAN HeaderOnly,
938 OUT HTTP_BOOT_IMAGE_TYPE *ImageType
956 BOOLEAN IdentityMode;
958 CHAR8 BaseAuthValue[80];
962 BOOLEAN ResumingOperation;
963 CHAR8 *ContentRangeResponseValue;
964 CHAR8 RangeValue[64];
966 ASSERT (Private !=
NULL);
967 ASSERT (Private->HttpCreated);
969 if ((BufferSize ==
NULL) || (ImageType ==
NULL)) {
970 return EFI_INVALID_PARAMETER;
973 if ((*BufferSize != 0) && (Buffer ==
NULL)) {
974 return EFI_INVALID_PARAMETER;
983 return EFI_OUT_OF_RESOURCES;
987 if (!HeaderOnly && (Buffer !=
NULL)) {
989 if (Status != EFI_NOT_FOUND) {
997 (Private->PartialTransferredSize > 0) &&
998 (Private->BootFileSize == *BufferSize))
1000 ResumingOperation =
TRUE;
1002 ResumingOperation =
FALSE;
1013 if ((!HeaderOnly) && (*BufferSize == 0)) {
1015 if (Cache ==
NULL) {
1016 Status = EFI_OUT_OF_RESOURCES;
1020 Cache->ImageType = ImageTypeMax;
1038 if (Private->AuthData !=
NULL) {
1042 if (ResumingOperation) {
1044 if (Private->LastModifiedOrEtag) {
1051 if (HttpIoHeader ==
NULL) {
1052 Status = EFI_OUT_OF_RESOURCES;
1061 Private->BootFileUri,
1062 Private->BootFileUriParser,
1065 if (EFI_ERROR (Status)) {
1075 if (EFI_ERROR (Status)) {
1087 if (EFI_ERROR (Status)) {
1097 HTTP_USER_AGENT_EFI_HTTP_BOOT
1099 if (EFI_ERROR (Status)) {
1106 if (Private->AuthData !=
NULL) {
1107 ASSERT (HttpIoHeader->MaxHeaderCount == 4);
1109 if ((Private->AuthScheme !=
NULL) && (
CompareMem (Private->AuthScheme,
"Basic", 5) != 0)) {
1110 Status = EFI_UNSUPPORTED;
1116 sizeof (BaseAuthValue),
1127 if (EFI_ERROR (Status)) {
1135 if (ResumingOperation) {
1139 sizeof (RangeValue),
1141 Private->PartialTransferredSize,
1142 Private->BootFileSize - 1
1144 if (EFI_ERROR (Status)) {
1149 if (EFI_ERROR (Status)) {
1154 (DEBUG_WARN | DEBUG_INFO,
1155 "HttpBootGetBootFile: Resuming failed download. Range: %a\n",
1162 if (Private->LastModifiedOrEtag) {
1163 if (Private->LastModifiedOrEtag[0] ==
'"') {
1166 (DEBUG_WARN | DEBUG_INFO,
1167 "HttpBootGetBootFile: If-Match=%a\n",
1168 Private->LastModifiedOrEtag)
1174 (DEBUG_WARN | DEBUG_INFO,
1175 "HttpBootGetBootFile: If-Unmodified-Since=%a\n",
1176 Private->LastModifiedOrEtag)
1182 if (EFI_ERROR (Status)) {
1192 if (RequestData ==
NULL) {
1193 Status = EFI_OUT_OF_RESOURCES;
1197 RequestData->
Method = HeaderOnly ? HttpMethodHead : HttpMethodGet;
1198 RequestData->
Url = Url;
1203 if (Cache !=
NULL) {
1204 Cache->RequestData = RequestData;
1210 HttpIo = &Private->HttpIo;
1214 HttpIoHeader->HeaderCount,
1215 HttpIoHeader->Headers,
1219 if (EFI_ERROR (Status)) {
1231 if (ResponseData ==
NULL) {
1232 Status = EFI_OUT_OF_RESOURCES;
1242 if (EFI_ERROR (Status) || EFI_ERROR (ResponseData->Status)) {
1243 if (EFI_ERROR (ResponseData->Status)) {
1246 Status = ResponseData->Status;
1247 if ((StatusCode == HTTP_STATUS_401_UNAUTHORIZED) || \
1248 (StatusCode == HTTP_STATUS_407_PROXY_AUTHENTICATION_REQUIRED))
1250 if ((Private->AuthData !=
NULL) || (Private->AuthScheme !=
NULL)) {
1251 if (Private->AuthData !=
NULL) {
1253 Private->AuthData =
NULL;
1256 if (Private->AuthScheme !=
NULL) {
1258 Private->AuthScheme =
NULL;
1261 Status = EFI_ACCESS_DENIED;
1268 if (Private->HttpBootCallback !=
NULL) {
1269 Data =
AllocateZeroPool (
sizeof (CHAR8) * HTTP_BOOT_AUTHENTICATION_INFO_MAX_LEN);
1271 Status = EFI_OUT_OF_RESOURCES;
1275 Status = Private->HttpBootCallback->Callback (
1276 Private->HttpBootCallback,
1279 HTTP_BOOT_AUTHENTICATION_INFO_MAX_LEN,
1282 if (EFI_ERROR (Status)) {
1290 Private->AuthData = (CHAR8 *)Data;
1294 ResponseData->HeaderCount,
1295 ResponseData->Headers,
1298 if (HttpHeader !=
NULL) {
1300 if (Private->AuthScheme ==
NULL) {
1301 return EFI_OUT_OF_RESOURCES;
1307 Status = EFI_ACCESS_DENIED;
1318 Private->BootFileUri,
1319 Private->BootFileUriParser,
1320 ResponseData->HeaderCount,
1321 ResponseData->Headers,
1324 if (EFI_ERROR (Status)) {
1331 if (Cache !=
NULL) {
1332 Cache->ResponseData = ResponseData;
1333 Cache->ImageType = *ImageType;
1339 ResponseData->HeaderCount,
1340 ResponseData->Headers,
1343 if (HttpHeader ==
NULL) {
1345 ResponseData->HeaderCount,
1346 ResponseData->Headers,
1352 if (Private->LastModifiedOrEtag) {
1353 FreePool (Private->LastModifiedOrEtag);
1363 if (ResumingOperation) {
1365 ResponseData->HeaderCount,
1366 ResponseData->Headers,
1369 if ((HttpHeader ==
NULL) ||
1372 Status = EFI_UNSUPPORTED;
1379 if (ContentRangeResponseValue ==
NULL) {
1380 Status = EFI_INVALID_PARAMETER;
1384 ContentRangeResponseValue++;
1386 if (ContentLength != *BufferSize) {
1387 Status = EFI_INVALID_PARAMETER;
1396 Context.NewBlock =
FALSE;
1397 Context.Block =
NULL;
1398 Context.CopyedSize = 0;
1399 Context.Buffer = Buffer;
1400 Context.BufferSize = *BufferSize;
1401 Context.Cache = Cache;
1402 Context.Private = Private;
1404 HeaderOnly ? HttpMethodHead : HttpMethodGet,
1406 ResponseData->HeaderCount,
1407 ResponseData->Headers,
1412 if (EFI_ERROR (Status)) {
1426 if (!EFI_ERROR (Status)) {
1427 IdentityMode =
TRUE;
1429 IdentityMode =
FALSE;
1442 if (ResumingOperation && ((ContentLength + Private->PartialTransferredSize) > *BufferSize)) {
1443 Status = EFI_INVALID_PARAMETER;
1448 while (ReceivedSize < ContentLength) {
1449 ResponseBody.Body = (CHAR8 *)Buffer + (ReceivedSize + Private->PartialTransferredSize);
1450 ResponseBody.BodyLength = *BufferSize - (ReceivedSize + Private->PartialTransferredSize);
1456 if (EFI_ERROR (Status) || EFI_ERROR (ResponseBody.Status)) {
1457 if (EFI_ERROR (ResponseBody.Status)) {
1458 Status = ResponseBody.Status;
1461 if ((Status == EFI_TIMEOUT) || (Status == EFI_DEVICE_ERROR)) {
1465 Private->PartialTransferredSize = ReceivedSize;
1468 DEBUG_WARN | DEBUG_INFO,
1469 "HttpBootGetBootFile: Transfer error. Bytes transferred so far: %lu.\n",
1478 ReceivedSize += ResponseBody.BodyLength;
1479 if (Private->HttpBootCallback !=
NULL) {
1480 Status = Private->HttpBootCallback->Callback (
1481 Private->HttpBootCallback,
1484 (UINT32)ResponseBody.BodyLength,
1487 if (EFI_ERROR (Status)) {
1494 Private->PartialTransferredSize = 0;
1508 if ((Block ==
NULL) || (Context.BufferSize == 0)) {
1510 if (Block ==
NULL) {
1511 Status = EFI_OUT_OF_RESOURCES;
1515 Context.NewBlock =
TRUE;
1516 Context.Block = Block;
1518 Context.NewBlock =
FALSE;
1521 ResponseBody.Body = (CHAR8 *)Block;
1522 ResponseBody.BodyLength = HTTP_BOOT_BLOCK_SIZE;
1528 if (EFI_ERROR (Status) || EFI_ERROR (ResponseBody.Status)) {
1529 if (EFI_ERROR (ResponseBody.Status)) {
1530 Status = ResponseBody.Status;
1541 ResponseBody.BodyLength,
1544 if (EFI_ERROR (Status)) {
1554 if (!ResumingOperation) {
1556 if (EFI_ERROR (Status)) {
1560 ContentLength = Private->BootFileSize;
1563 if (*BufferSize < ContentLength) {
1564 Status = EFI_BUFFER_TOO_SMALL;
1569 *BufferSize = ContentLength;
1574 if (Cache !=
NULL) {
1575 Cache->EntityLength = ContentLength;
1579 if (Parser !=
NULL) {
1586 if (Parser !=
NULL) {
1590 if (Context.Block !=
NULL) {
1597 if (ResponseData !=
NULL) {
1602 if (RequestData !=
NULL) {
1609 if (Cache !=
NULL) {
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
INTN EFIAPI AsciiStrnCmp(IN CONST CHAR8 *FirstString, IN CONST CHAR8 *SecondString, IN UINTN Length)
UINTN EFIAPI AsciiStrDecimalToUintn(IN CONST CHAR8 *String)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
CHAR8 *EFIAPI AsciiStrStr(IN CONST CHAR8 *String, IN CONST CHAR8 *SearchString)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
#define MESSAGING_DEVICE_PATH
UINT16 EFIAPI SetDevicePathNodeLength(IN OUT VOID *Node, IN UINTN Length)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI AppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
#define HTTP_HEADER_USER_AGENT
#define HTTP_HEADER_AUTHORIZATION
#define HTTP_HEADER_WWW_AUTHENTICATE
#define HTTP_HEADER_ACCEPT
#define HTTP_HEADER_IF_MATCH
#define HTTP_HEADER_IF_UNMODIFIED_SINCE
#define HTTP_HEADER_CONTENT_RANGE
#define HTTP_HEADER_LAST_MODIFIED
EFI_STATUS HttpBootCreateHttpIo(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootDiscoverBootInfo(IN OUT 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)
EFI_STATUS HttpBootDhcp4ExtractUriInfo(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS EFIAPI HttpBootHttpIoCallback(IN HTTP_IO_CALLBACK_EVENT EventType, IN EFI_HTTP_MESSAGE *Message, IN VOID *Context)
EFI_STATUS HttpBootUpdateDevicePath(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootGetFileFromCache(IN HTTP_BOOT_PRIVATE_DATA *Private, IN CHAR16 *Uri, IN OUT UINTN *BufferSize, OUT UINT8 *Buffer, OUT HTTP_BOOT_IMAGE_TYPE *ImageType)
VOID HttpBootFreeCacheList(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootDhcp6ExtractUriInfo(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS EFIAPI HttpBootGetBootFileCallback(IN HTTP_BODY_PARSE_EVENT EventType, IN CHAR8 *Data, IN UINTN Length, IN VOID *Context)
VOID HttpBootFreeCache(IN HTTP_BOOT_CACHE_CONTENT *Cache)
EFI_STATUS HttpBootRegisterIp4Dns(IN HTTP_BOOT_PRIVATE_DATA *Private, IN UINTN DataLength, IN VOID *DnsServerData)
EFI_STATUS HttpBootSetIp6Gateway(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootSetIp6Dns(IN HTTP_BOOT_PRIVATE_DATA *Private, IN UINTN DataLength, IN VOID *DnsServerData)
EFI_STATUS HttpBootSetIp6Address(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS EFIAPI HttpBootCallback(IN EFI_HTTP_BOOT_CALLBACK_PROTOCOL *This, IN EFI_HTTP_BOOT_CALLBACK_DATA_TYPE DataType, IN BOOLEAN Received, IN UINT32 DataLength, IN VOID *Data OPTIONAL)
EFI_STATUS HttpBootDhcp(IN HTTP_BOOT_PRIVATE_DATA *Private)
EFI_STATUS HttpBootCheckUriScheme(IN CHAR8 *Uri)
EFI_STATUS HttpBootCheckImageType(IN CHAR8 *Uri, IN VOID *UriParser, IN UINTN HeaderCount, IN EFI_HTTP_HEADER *Headers, OUT HTTP_BOOT_IMAGE_TYPE *ImageType)
EFI_STATUS HttpBootDns(IN HTTP_BOOT_PRIVATE_DATA *Private, IN CHAR16 *HostName, OUT EFI_IPv6_ADDRESS *IpAddress)
VOID HttpBootPrintErrorMessage(EFI_HTTP_STATUS_CODE StatusCode)
EFI_STATUS HttpIoCreateIo(IN EFI_HANDLE Image, IN EFI_HANDLE Controller, IN UINT8 IpVersion, IN HTTP_IO_CONFIG_DATA *ConfigData, IN HTTP_IO_CALLBACK Callback, IN VOID *Context, OUT HTTP_IO *HttpIo)
EFI_STATUS HttpIoSendRequest(IN HTTP_IO *HttpIo, IN EFI_HTTP_REQUEST_DATA *Request OPTIONAL, IN UINTN HeaderCount, IN EFI_HTTP_HEADER *Headers OPTIONAL, IN UINTN BodyLength, IN VOID *Body OPTIONAL)
EFI_STATUS HttpIoRecvResponse(IN HTTP_IO *HttpIo, IN BOOLEAN RecvMsgHeader, OUT HTTP_IO_RESPONSE_DATA *ResponseData)
EFI_STATUS EFIAPI HttpUrlGetHostName(IN CHAR8 *Url, IN VOID *UrlParser, OUT CHAR8 **HostName)
EFI_STATUS EFIAPI HttpInitMsgParser(IN EFI_HTTP_METHOD Method, IN EFI_HTTP_STATUS_CODE StatusCode, IN UINTN HeaderCount, IN EFI_HTTP_HEADER *Headers, IN HTTP_BODY_PARSER_CALLBACK Callback, IN VOID *Context, OUT VOID **MsgParser)
VOID HttpIoFreeHeader(IN HTTP_IO_HEADER *HttpIoHeader)
EFI_STATUS EFIAPI HttpUrlGetPort(IN CHAR8 *Url, IN VOID *UrlParser, OUT UINT16 *Port)
HTTP_IO_HEADER * HttpIoCreateHeader(UINTN MaxHeaderCount)
EFI_HTTP_HEADER *EFIAPI HttpFindHeader(IN UINTN HeaderCount, IN EFI_HTTP_HEADER *Headers, IN CHAR8 *FieldName)
EFI_STATUS EFIAPI HttpUrlGetIp6(IN CHAR8 *Url, IN VOID *UrlParser, OUT EFI_IPv6_ADDRESS *Ip6Address)
EFI_STATUS EFIAPI HttpParseMessageBody(IN OUT VOID *MsgParser, IN UINTN BodyLength, IN CHAR8 *Body)
EFI_STATUS HttpIoSetHeader(IN HTTP_IO_HEADER *HttpIoHeader, IN CHAR8 *FieldName, IN CHAR8 *FieldValue)
EFI_STATUS EFIAPI HttpGetEntityLength(IN VOID *MsgParser, OUT UINTN *ContentLength)
VOID EFIAPI HttpFreeMsgParser(IN VOID *MsgParser)
BOOLEAN EFIAPI HttpIsMessageComplete(IN VOID *MsgParser)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define DEBUG(Expression)
#define PcdGet32(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
IPv6_ADDRESS EFI_IPv6_ADDRESS
UINTN EFIAPI AsciiPrint(IN CONST CHAR8 *Format,...)
union EFI_HTTP_MESSAGE::@577 Data
EFI_HTTP_RESPONSE_DATA * Response
EFI_HTTP_STATUS_CODE StatusCode
EFI_HTTP_MESSAGE * Message
UINT32 RequestTimeOut
In milliseconds.
UINT32 RequestTimeOut
In milliseconds.
EFI_IPv4_ADDRESS GatewayIpAddress
EFI_IPv4_ADDRESS SubnetMask
EFI_IPv4_ADDRESS LocalIpAddress
EFI_IPv6_ADDRESS LocalIpAddress
EFI_IPv6_ADDRESS RemoteIpAddress
EFI_IPv6_ADDRESS GatewayIpAddress