TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishRestExImpl.c File Reference
#include <Uefi.h>
#include "RedfishRestExInternal.h"

Go to the source code of this file.

Functions

EFI_STATUS ResetHttpTslSession (IN RESTEX_INSTANCE *Instance)
 
EFI_STATUS RedfishCheckHttpReceiveStatus (IN RESTEX_INSTANCE *Instance, IN EFI_STATUS HttpIoReceiveStatus)
 
EFI_STATUS RedfishHttpAddExpectation (IN EFI_REST_EX_PROTOCOL *This, IN EFI_HTTP_MESSAGE *RequestMessage, IN EFI_HTTP_HEADER **PreservedRequestHeaders, IN BOOLEAN *ItsWrite)
 

Detailed Description

RestExDxe support functions implementation.

Copyright (c) 2019, Intel Corporation. All rights reserved.
(C) Copyright 2020 Hewlett Packard Enterprise Development LP
Copyright (c) 2023, American Megatrends International LLC. Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file RedfishRestExImpl.c.

Function Documentation

◆ RedfishCheckHttpReceiveStatus()

EFI_STATUS RedfishCheckHttpReceiveStatus ( IN RESTEX_INSTANCE Instance,
IN EFI_STATUS  HttpIoReceiveStatus 
)

This function check Http receive status.

Parameters
[in]InstancePointer to EFI_REST_EX_PROTOCOL instance for a particular REST service.
[in]HttpIoReceiveStatusThis is the status return from HttpIoRecvResponse
Return values
EFI_SUCCESSThe payload receive from Redfish service in successfully.
EFI_NOT_READYMay need to resend the HTTP request.
EFI_DEVICE_ERRORSomething wrong and can't be resolved.
OthersOther errors as indicated.

Definition at line 61 of file RedfishRestExImpl.c.

◆ RedfishHttpAddExpectation()

EFI_STATUS RedfishHttpAddExpectation ( IN EFI_REST_EX_PROTOCOL This,
IN EFI_HTTP_MESSAGE RequestMessage,
IN EFI_HTTP_HEADER **  PreservedRequestHeaders,
IN BOOLEAN *  ItsWrite 
)

This function send the HTTP request without body to see if the write to URL is permitted by Redfish service. This function checks if the HTTP request has Content-length in HTTP header. If yes, set HTTP body to NULL and then send to service. Check the HTTP status for the further actions.

Parameters
[in]ThisPointer to EFI_REST_EX_PROTOCOL instance for a particular REST service.
[in]RequestMessagePointer to the HTTP request data for this resource
[in]PreservedRequestHeadersThe pointer to save the request headers
[in]ItsWriteThis is write method to URL.
Return values
EFI_INVALID_PARAMETERImproper given parameters.
EFI_SUCCESSThis HTTP request is free to send to Redfish service.
EFI_OUT_OF_RESOURCESNOt enough memory to process.
EFI_ACCESS_DENIEDNot allowed to write to this URL.
OthersOther errors as indicated.

Definition at line 130 of file RedfishRestExImpl.c.

◆ ResetHttpTslSession()

EFI_STATUS ResetHttpTslSession ( IN RESTEX_INSTANCE Instance)

Create a new TLS session because the previous one is closed.

Parameters
[in]InstancePointer to EFI_REST_EX_PROTOCOL instance for a particular REST service.
Return values
EFI_SUCCESSoperation succeeded.
EFI_ERROROther errors.

Definition at line 25 of file RedfishRestExImpl.c.