39 if (CacheList ==
NULL) {
40 return EFI_INVALID_PARAMETER;
43 if (!IS_EMPTY_STRING (Msg)) {
44 DEBUG ((ErrorLevel,
"%a\n", Msg));
48 DEBUG ((ErrorLevel,
"list is empty\n"));
52 DEBUG ((ErrorLevel,
"list count: %d capacity: %d\n", CacheList->Count, CacheList->Capacity));
56 while (!
IsNull (&CacheList->Head, List)) {
57 Data = REDFISH_HTTP_CACHE_FROM_LIST (List);
59 DEBUG ((ErrorLevel,
"%d) Uri: %s Hit: %d\n", ++Index, Data->Uri, Data->HitCount));
82 if (StatusCode ==
NULL) {
86 if ((*StatusCode == HTTP_STATUS_500_INTERNAL_SERVER_ERROR) ||
87 (*StatusCode == HTTP_STATUS_UNSUPPORTED_STATUS))
116 BOOLEAN SuccessResponse;
118 if (StatusCode ==
NULL) {
122 SuccessResponse =
FALSE;
125 if ((*StatusCode == HTTP_STATUS_200_OK) ||
126 (*StatusCode == HTTP_STATUS_201_CREATED) ||
127 (*StatusCode == HTTP_STATUS_202_ACCEPTED) ||
128 (*StatusCode == HTTP_STATUS_204_NO_CONTENT))
130 SuccessResponse =
TRUE;
134 case HttpMethodPatch:
136 case HttpMethodDelete:
137 if ((*StatusCode == HTTP_STATUS_200_OK) ||
138 (*StatusCode == HTTP_STATUS_202_ACCEPTED) ||
139 (*StatusCode == HTTP_STATUS_204_NO_CONTENT))
141 SuccessResponse =
TRUE;
149 SuccessResponse =
TRUE;
153 return SuccessResponse;
168 IN EFI_STRING UnicodeStr
175 if (IS_EMPTY_STRING (UnicodeStr)) {
181 if (AsciiStr ==
NULL) {
186 if (EFI_ERROR (Status)) {
187 DEBUG ((DEBUG_ERROR,
"UnicodeStrToAsciiStrS failed: %r\n", Status));
210 return HTTP_METHOD_GET;
213 return HTTP_METHOD_POST;
215 case HttpMethodPatch:
216 return HTTP_METHOD_PATCH;
219 return HTTP_METHOD_PUT;
221 case HttpMethodDelete:
222 return HTTP_METHOD_DELETE;
246 CHAR8 ErrorMsg[REDFISH_ERROR_MSG_MAX];
248 if (IS_EMPTY_STRING (Uri)) {
249 DEBUG ((DEBUG_ERROR,
"%a: no URI to report error status\n", __func__));
256 AsciiSPrint (ErrorMsg,
sizeof (ErrorMsg), REDFISH_HTTP_ERROR_REPORT,
HttpMethodToString (Method), (HttpStatusCode ==
NULL ? HTTP_STATUS_UNSUPPORTED_STATUS : *HttpStatusCode), Uri);
257 DEBUG ((DEBUG_ERROR,
"%a\n", ErrorMsg));
293 CHAR8 *AsciiLocation;
295 CHAR8 *BasicAuthString;
296 UINTN BasicAuthStrSize;
297 CHAR8 *EncodedAuthString;
298 UINTN EncodedAuthStrSize;
306 if ((This ==
NULL) || (RedfishConfigServiceInfo ==
NULL)) {
310 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: service location: %s\n", __func__, RedfishConfigServiceInfo->RedfishServiceLocation));
312 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
313 BasicAuthString =
NULL;
314 EncodedAuthString =
NULL;
318 AsciiLocation =
NULL;
320 BasicAuthStrSize = 0;
321 EncodedAuthStrSize = 0;
328 if (!IS_EMPTY_STRING (RedfishConfigServiceInfo->RedfishServiceLocation)) {
330 if (AsciiLocation ==
NULL) {
335 if (AsciiLocation ==
NULL) {
339 if (RedfishConfigServiceInfo->RedfishServiceUseHttps) {
340 AsciiSPrint (Host, REDFISH_HOST_NAME_MAX,
"https://%a", AsciiLocation);
342 AsciiSPrint (Host, REDFISH_HOST_NAME_MAX,
"http://%a", AsciiLocation);
345 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Host: %a\n", __func__, Host));
351 if (RedfishConfigServiceInfo->RedfishServiceRestExHandle !=
NULL) {
352 Status =
gBS->HandleProtocol (
353 RedfishConfigServiceInfo->RedfishServiceRestExHandle,
354 &gEfiRestExProtocolGuid,
358 DEBUG ((DEBUG_ERROR,
"%a: Rest Ex protocol is not available\n", __func__));
365 if (Private->CredentialProtocol ==
NULL) {
369 DEBUG ((DEBUG_WARN,
"%a: no credential protocol available\n", __func__));
371 Status = Private->CredentialProtocol->GetAuthInfo (
372 Private->CredentialProtocol,
377 if (EFI_ERROR (Status) || ((AuthMethod !=
AuthMethodNone) && (IS_EMPTY_STRING (Username) || IS_EMPTY_STRING (Password)))) {
378 DEBUG ((DEBUG_ERROR,
"%a: cannot get authentication information: %r\n", __func__, Status));
381 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Auth method: 0x%x username: %a password: %a\n", __func__, AuthMethod, Username, Password));
388 BasicAuthStrSize = UsernameSize + PasswordSize;
390 if (BasicAuthString ==
NULL) {
403 (
CONST UINT8 *)BasicAuthString,
408 if ((Status == EFI_BUFFER_TOO_SMALL) && (EncodedAuthStrSize > 0)) {
410 if (EncodedAuthString ==
NULL) {
415 (
CONST UINT8 *)BasicAuthString,
420 if (EFI_ERROR (Status)) {
421 DEBUG ((DEBUG_ERROR,
"%a: Base64Encode failure: %r\n", __func__, Status));
424 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Basic authorization: %a\n", __func__, EncodedAuthString));
426 DEBUG ((DEBUG_ERROR,
"%a: Base64Encode failure: %r\n", __func__, Status));
433 if (NewService ==
NULL) {
434 DEBUG ((DEBUG_ERROR,
"%a: CreateRedfishService\n", __func__));
438 if (Private->CredentialProtocol !=
NULL) {
439 Status = Private->CredentialProtocol->RegisterRedfishService (Private->CredentialProtocol, NewService);
440 if (EFI_ERROR (Status)) {
441 DEBUG ((DEBUG_ERROR,
"%a: Failed to register Redfish service - %r\n", __func__, Status));
447 if (BasicAuthString !=
NULL) {
448 ZeroMem (BasicAuthString, BasicAuthStrSize);
452 if (EncodedAuthString !=
NULL) {
453 ZeroMem (BasicAuthString, EncodedAuthStrSize);
457 if (Username !=
NULL) {
458 ZeroMem (Username, UsernameSize);
462 if (Password !=
NULL) {
463 ZeroMem (Password, PasswordSize);
467 if (AsciiLocation !=
NULL) {
493 IN REDFISH_SERVICE RedfishService
500 if ((This ==
NULL) || (RedfishService ==
NULL)) {
501 return EFI_INVALID_PARAMETER;
504 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
507 if (Service->Signature != REDFISH_HTTP_SERVICE_SIGNATURE) {
508 DEBUG ((DEBUG_ERROR,
"%a: signature check failure\n", __func__));
511 if (Private->CredentialProtocol !=
NULL) {
512 Status = Private->CredentialProtocol->UnregisterRedfishService (Private->CredentialProtocol, RedfishService);
513 if (EFI_ERROR (Status)) {
514 DEBUG ((DEBUG_ERROR,
"%a: Failed to unregister Redfish service - %r\n", __func__, Status));
516 if (Service->RestEx !=
NULL) {
517 Status = Service->RestEx->Configure (Service->RestEx,
NULL);
518 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: release RestEx instance: %r\n", __func__, Status));
542 IN REDFISH_PAYLOAD RedfishPayload
547 if ((This ==
NULL) || (RedfishPayload ==
NULL)) {
552 if (Payload->Signature != REDFISH_HTTP_PAYLOAD_SIGNATURE) {
553 DEBUG ((DEBUG_ERROR,
"%a: signature check failure\n", __func__));
556 return Payload->JsonValue;
581 IN REDFISH_SERVICE Service,
593 if ((This ==
NULL) || (Service ==
NULL) || (Response ==
NULL) || IS_EMPTY_STRING (Uri)) {
594 return EFI_INVALID_PARAMETER;
597 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Get URI: %s cache: %a\n", __func__, Uri, (UseCache ?
"true" :
"false")));
599 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
604 if (Private->CacheDisabled) {
606 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: cache is disabled by PCD!\n", __func__));
614 if (CacheData !=
NULL) {
615 DEBUG ((REDFISH_HTTP_CACHE_DEBUG_REQUEST,
"%a: cache hit! %s\n", __func__, Uri));
621 CacheData->HitCount += 1;
638 DEBUG ((REDFISH_HTTP_CACHE_DEBUG_REQUEST,
"%a: HTTP request: %s :%r\n", __func__, Uri, Status));
639 if (!EFI_ERROR (Status) || (RetryCount >= Private->RetrySetting.MaximumRetryGet)) {
646 if ((Response->StatusCode !=
NULL)) {
658 This->FreeResponse (This, Response);
661 DEBUG ((DEBUG_WARN,
"%a: RedfishGetByUriEx failed, retry (%d/%d)\n", __func__, RetryCount, Private->RetrySetting.MaximumRetryGet));
662 if (Private->RetrySetting.RetryWait > 0) {
663 gBS->Stall (Private->RetrySetting.RetryWait);
667 if (EFI_ERROR (Status)) {
675 DEBUG ((DEBUG_ERROR,
"%a: get %s failed (%d/%d): %r\n", __func__, Uri, RetryCount, Private->RetrySetting.MaximumRetryGet, Status));
679 if (!Private->CacheDisabled) {
684 if (EFI_ERROR (Status)) {
685 DEBUG ((DEBUG_ERROR,
"%a: failed to cache %s: %r\n", __func__, Uri, Status));
717 if ((This ==
NULL) || (Request ==
NULL)) {
718 return EFI_INVALID_PARAMETER;
721 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: entry\n", __func__));
743 if ((This ==
NULL) || (Response ==
NULL)) {
744 return EFI_INVALID_PARAMETER;
747 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: entry\n", __func__));
772 if ((This ==
NULL) || IS_EMPTY_STRING (Uri)) {
773 return EFI_INVALID_PARAMETER;
776 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: expire URI: %s\n", __func__, Uri));
778 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
781 if (CacheData ==
NULL) {
782 return EFI_NOT_FOUND;
812 IN REDFISH_SERVICE Service,
816 IN CHAR8 *ContentType OPTIONAL,
825 if ((This ==
NULL) || (Service ==
NULL) || (Response ==
NULL) || IS_EMPTY_STRING (Uri) || IS_EMPTY_STRING (Content)) {
826 return EFI_INVALID_PARAMETER;
829 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Patch URI: %s\n", __func__, Uri));
831 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
836 Request.Content = Content;
837 Request.ContentLength = ContentSize;
838 Request.ContentType = ContentType;
852 DEBUG ((REDFISH_HTTP_CACHE_DEBUG_REQUEST,
"%a: HTTP request: %s :%r\n", __func__, Uri, Status));
853 if (!EFI_ERROR (Status) || (RetryCount >= Private->RetrySetting.MaximumRetryPatch)) {
860 if ((Response->StatusCode !=
NULL)) {
872 This->FreeResponse (This, Response);
875 DEBUG ((DEBUG_WARN,
"%a: RedfishPatchToUriEx failed, retry (%d/%d)\n", __func__, RetryCount, Private->RetrySetting.MaximumRetryPatch));
876 if (Private->RetrySetting.RetryWait > 0) {
877 gBS->Stall (Private->RetrySetting.RetryWait);
885 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Resource is updated, expire URI: %s\n", __func__, Uri));
896 DEBUG ((DEBUG_ERROR,
"%a: patch %s failed (%d/%d): %r\n", __func__, Uri, RetryCount, Private->RetrySetting.MaximumRetryPatch, Status));
929 IN REDFISH_SERVICE Service,
933 IN CHAR8 *ContentType OPTIONAL,
942 if ((This ==
NULL) || (Service ==
NULL) || (Response ==
NULL) || IS_EMPTY_STRING (Uri) || IS_EMPTY_STRING (Content)) {
943 return EFI_INVALID_PARAMETER;
946 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Put URI: %s\n", __func__, Uri));
948 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
953 Request.Content = Content;
954 Request.ContentLength = ContentSize;
955 Request.ContentType = ContentType;
969 DEBUG ((REDFISH_HTTP_CACHE_DEBUG_REQUEST,
"%a: HTTP request: %s :%r\n", __func__, Uri, Status));
970 if (!EFI_ERROR (Status) || (RetryCount >= Private->RetrySetting.MaximumRetryPut)) {
977 if ((Response->StatusCode !=
NULL)) {
989 This->FreeResponse (This, Response);
992 DEBUG ((DEBUG_WARN,
"%a: RedfishPutToUri failed, retry (%d/%d)\n", __func__, RetryCount, Private->RetrySetting.MaximumRetryPut));
993 if (Private->RetrySetting.RetryWait > 0) {
994 gBS->Stall (Private->RetrySetting.RetryWait);
1002 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Resource is updated, expire URI: %s\n", __func__, Uri));
1013 DEBUG ((DEBUG_ERROR,
"%a: put %s failed (%d/%d): %r\n", __func__, Uri, RetryCount, Private->RetrySetting.MaximumRetryPut, Status));
1046 IN REDFISH_SERVICE Service,
1049 IN UINTN ContentSize OPTIONAL,
1050 IN CHAR8 *ContentType OPTIONAL,
1059 if ((This ==
NULL) || (Service ==
NULL) || (Response ==
NULL) || IS_EMPTY_STRING (Uri) || IS_EMPTY_STRING (Content)) {
1060 return EFI_INVALID_PARAMETER;
1063 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Post URI: %s\n", __func__, Uri));
1065 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
1070 Request.Content = Content;
1071 Request.ContentLength = ContentSize;
1072 Request.ContentType = ContentType;
1086 DEBUG ((REDFISH_HTTP_CACHE_DEBUG_REQUEST,
"%a: HTTP request: %s :%r\n", __func__, Uri, Status));
1087 if (!EFI_ERROR (Status) || (RetryCount >= Private->RetrySetting.MaximumRetryPost)) {
1094 if ((Response->StatusCode !=
NULL)) {
1106 This->FreeResponse (This, Response);
1109 DEBUG ((DEBUG_WARN,
"%a: RedfishPostToUri failed, retry (%d/%d)\n", __func__, RetryCount, Private->RetrySetting.MaximumRetryPost));
1110 if (Private->RetrySetting.RetryWait > 0) {
1111 gBS->Stall (Private->RetrySetting.RetryWait);
1119 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Resource is updated, expire URI: %s\n", __func__, Uri));
1130 DEBUG ((DEBUG_ERROR,
"%a: post %s failed (%d/%d): %r\n", __func__, Uri, RetryCount, Private->RetrySetting.MaximumRetryPost, Status));
1165 IN REDFISH_SERVICE Service,
1167 IN CHAR8 *Content OPTIONAL,
1168 IN UINTN ContentSize OPTIONAL,
1169 IN CHAR8 *ContentType OPTIONAL,
1178 if ((This ==
NULL) || (Service ==
NULL) || (Response ==
NULL) || IS_EMPTY_STRING (Uri)) {
1179 return EFI_INVALID_PARAMETER;
1182 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Delete URI: %s\n", __func__, Uri));
1184 Private = REDFISH_HTTP_CACHE_PRIVATE_FROM_THIS (This);
1189 Request.Content = Content;
1190 Request.ContentLength = ContentSize;
1191 Request.ContentType = ContentType;
1205 DEBUG ((REDFISH_HTTP_CACHE_DEBUG_REQUEST,
"%a: HTTP request: %s :%r\n", __func__, Uri, Status));
1206 if (!EFI_ERROR (Status) || (RetryCount >= Private->RetrySetting.MaximumRetryDelete)) {
1213 if ((Response->StatusCode !=
NULL)) {
1225 This->FreeResponse (This, Response);
1228 DEBUG ((DEBUG_WARN,
"%a: RedfishDeleteByUri failed, retry (%d/%d)\n", __func__, RetryCount, Private->RetrySetting.MaximumRetryDelete));
1229 if (Private->RetrySetting.RetryWait > 0) {
1230 gBS->Stall (Private->RetrySetting.RetryWait);
1238 DEBUG ((REDFISH_HTTP_CACHE_DEBUG,
"%a: Resource is updated, expire URI: %s\n", __func__, Uri));
1249 DEBUG ((DEBUG_ERROR,
"%a: delete %s failed (%d/%d): %r\n", __func__, Uri, RetryCount, Private->RetrySetting.MaximumRetryDelete, Status));
1259 EDKII_REDFISH_HTTP_PROTOCOL_REVISION,
1288 if (mRedfishHttpCachePrivate ==
NULL) {
1292 if (!
IsListEmpty (&mRedfishHttpCachePrivate->CacheList.Head)) {
1296 gBS->UninstallMultipleProtocolInterfaces (
1298 &gEdkIIRedfishHttpProtocolGuid,
1299 &mRedfishHttpCachePrivate->Protocol,
1303 FreePool (mRedfishHttpCachePrivate);
1304 mRedfishHttpCachePrivate =
NULL;
1327 if (Private->Signature != REDFISH_HTTP_DRIVER_SIGNATURE) {
1328 DEBUG ((DEBUG_ERROR,
"%a: signature check failure\n", __func__));
1335 Status =
gBS->LocateProtocol (
1336 &gEdkIIRedfishCredential2ProtocolGuid,
1338 (VOID **)&Private->CredentialProtocol
1340 if (EFI_ERROR (Status)) {
1344 gBS->CloseEvent (Event);
1366 if (mRedfishHttpCachePrivate !=
NULL) {
1367 return EFI_ALREADY_STARTED;
1371 if (mRedfishHttpCachePrivate ==
NULL) {
1372 return EFI_OUT_OF_RESOURCES;
1378 mRedfishHttpCachePrivate->Signature = REDFISH_HTTP_DRIVER_SIGNATURE;
1379 mRedfishHttpCachePrivate->ImageHandle = ImageHandle;
1381 mRedfishHttpCachePrivate->CacheList.Capacity = REDFISH_HTTP_CACHE_LIST_SIZE;
1382 mRedfishHttpCachePrivate->CacheList.Count = 0x00;
1383 mRedfishHttpCachePrivate->CacheDisabled =
PcdGetBool (PcdHttpCacheDisabled);
1389 mRedfishHttpCachePrivate->RetrySetting.MaximumRetryGet =
PcdGet16 (PcdHttpGetRetry);
1390 mRedfishHttpCachePrivate->RetrySetting.MaximumRetryPut =
PcdGet16 (PcdHttpPutRetry);
1391 mRedfishHttpCachePrivate->RetrySetting.MaximumRetryPatch =
PcdGet16 (PcdHttpPatchRetry);
1392 mRedfishHttpCachePrivate->RetrySetting.MaximumRetryPost =
PcdGet16 (PcdHttpPostRetry);
1393 mRedfishHttpCachePrivate->RetrySetting.MaximumRetryDelete =
PcdGet16 (PcdHttpDeleteRetry);
1394 mRedfishHttpCachePrivate->RetrySetting.RetryWait =
PcdGet16 (PcdHttpRetryWaitInSecond) * 1000000U;
1399 Status =
gBS->InstallMultipleProtocolInterfaces (
1400 &mRedfishHttpCachePrivate->ImageHandle,
1401 &gEdkIIRedfishHttpProtocolGuid,
1402 &mRedfishHttpCachePrivate->Protocol,
1405 if (EFI_ERROR (Status)) {
1406 DEBUG ((DEBUG_ERROR,
"%a: cannot install Redfish http protocol: %r\n", __func__, Status));
1415 &gEdkIIRedfishCredential2ProtocolGuid,
1418 mRedfishHttpCachePrivate,
1421 if (mRedfishHttpCachePrivate->NotifyEvent ==
NULL) {
1422 DEBUG ((DEBUG_ERROR,
"%a: failed to create protocol notification for gEdkIIRedfishCredential2ProtocolGuid\n", __func__));
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS(IN CONST CHAR16 *Source, OUT CHAR8 *Destination, IN UINTN DestMax)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
UINTN EFIAPI AsciiStrSize(IN CONST CHAR8 *String)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI Base64Encode(IN CONST UINT8 *Source, IN UINTN SourceLength, OUT CHAR8 *Destination OPTIONAL, IN OUT UINTN *DestinationSize)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EDKII_REDFISH_AUTH_METHOD
@ AuthMethodNone
No authentication is required.
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
UINTN EFIAPI AsciiSPrint(OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, IN CONST CHAR8 *FormatString,...)
#define DEBUG(Expression)
#define DEBUG_CODE(Expression)
#define PcdGet16(TokenName)
#define PcdGetBool(TokenName)
EFI_STATUS DumpRedfishResponse(IN CONST CHAR8 *Message, IN UINTN ErrorLevel, IN REDFISH_RESPONSE *Response)
EFI_STATUS AddHttpCacheData(IN REDFISH_HTTP_CACHE_LIST *List, IN EFI_STRING Uri, IN REDFISH_RESPONSE *Response)
REDFISH_SERVICE_PRIVATE * CreateRedfishService(IN CHAR8 *Host, IN CHAR8 *HostName, IN CHAR8 *BasicAuth OPTIONAL, IN CHAR8 *SessionToken OPTIONAL, IN EFI_REST_EX_PROTOCOL *RestEx)
EFI_STATUS CopyRedfishResponse(IN REDFISH_RESPONSE *SrcResponse, OUT REDFISH_RESPONSE *DstResponse)
EFI_STATUS ReleaseRedfishService(IN REDFISH_SERVICE_PRIVATE *Service)
EFI_STATUS ReleaseCacheList(IN REDFISH_HTTP_CACHE_LIST *CacheList)
EFI_STATUS DeleteHttpCacheData(IN REDFISH_HTTP_CACHE_LIST *List, IN REDFISH_HTTP_CACHE_DATA *Data)
REDFISH_HTTP_CACHE_DATA * FindHttpCacheData(IN LIST_ENTRY *ListHeader, IN EFI_STRING Uri)
EFI_STATUS EFIAPI RedfishExpireResponse(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN EFI_STRING Uri)
EFI_STATUS EFIAPI RedfishGetResource(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_SERVICE Service, IN EFI_STRING Uri, IN REDFISH_REQUEST *Request OPTIONAL, OUT REDFISH_RESPONSE *Response, IN BOOLEAN UseCache)
EFI_STATUS EFIAPI RedfishPutResource(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_SERVICE Service, IN EFI_STRING Uri, IN CHAR8 *Content, IN UINTN ContentSize OPTIONAL, IN CHAR8 *ContentType OPTIONAL, OUT REDFISH_RESPONSE *Response)
BOOLEAN RedfishSuccessResponse(IN EFI_HTTP_METHOD Method, IN EFI_HTTP_STATUS_CODE *StatusCode)
EFI_STATUS EFIAPI RedfishFreeResponse(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_RESPONSE *Response)
BOOLEAN RedfishRetryRequired(IN EFI_HTTP_STATUS_CODE *StatusCode)
EFI_STATUS DebugPrintHttpCacheList(IN CONST CHAR8 *Msg, IN UINTN ErrorLevel, IN REDFISH_HTTP_CACHE_LIST *CacheList)
EFI_STATUS EFIAPI RedfishPatchResource(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_SERVICE Service, IN EFI_STRING Uri, IN CHAR8 *Content, IN UINTN ContentSize OPTIONAL, IN CHAR8 *ContentType OPTIONAL, OUT REDFISH_RESPONSE *Response)
EFI_STATUS EFIAPI RedfishDeleteResource(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_SERVICE Service, IN EFI_STRING Uri, IN CHAR8 *Content OPTIONAL, IN UINTN ContentSize OPTIONAL, IN CHAR8 *ContentType OPTIONAL, OUT REDFISH_RESPONSE *Response)
EFI_STATUS EFIAPI RedfishHttpDriverUnload(IN EFI_HANDLE ImageHandle)
EDKII_JSON_VALUE EFIAPI RedfishJsonInRedfishPayload(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_PAYLOAD RedfishPayload)
EFI_STATUS EFIAPI RedfishFreeRedfishService(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_SERVICE RedfishService)
CHAR8 * HttpMethodToString(IN EFI_HTTP_METHOD Method)
EFI_STATUS EFIAPI RedfishHttpEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI RedfishFreeRequest(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_REQUEST *Request)
VOID ReportHttpError(IN EFI_HTTP_METHOD Method, IN EFI_STRING Uri, IN EFI_HTTP_STATUS_CODE *HttpStatusCode OPTIONAL)
EFI_STATUS EFIAPI RedfishPostResource(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_SERVICE Service, IN EFI_STRING Uri, IN CHAR8 *Content, IN UINTN ContentSize OPTIONAL, IN CHAR8 *ContentType OPTIONAL, OUT REDFISH_RESPONSE *Response)
VOID EFIAPI CredentialProtocolInstalled(IN EFI_EVENT Event, IN VOID *Context)
CHAR8 * StringUnicodeToAscii(IN EFI_STRING UnicodeStr)
REDFISH_SERVICE EFIAPI RedfishCreateRedfishService(IN EDKII_REDFISH_HTTP_PROTOCOL *This, IN REDFISH_CONFIG_SERVICE_INFORMATION *RedfishConfigServiceInfo)
EFI_STATUS ReleaseRedfishRequest(IN REDFISH_REQUEST *Request)
EFI_STATUS ReleaseRedfishResponse(IN REDFISH_RESPONSE *Response)
EFI_STATUS HttpSendReceive(IN REDFISH_SERVICE Service, IN EFI_STRING Uri, IN EFI_HTTP_METHOD Method, IN REDFISH_REQUEST *Request OPTIONAL, OUT REDFISH_RESPONSE *Response)
EFI_EVENT EFIAPI EfiCreateProtocolNotifyEvent(IN EFI_GUID *ProtocolGuid, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, IN VOID *NotifyContext OPTIONAL, OUT VOID **Registration)