TianoCore EDK2 master
|
#include <Uefi.h>
#include <Protocol/ComponentName.h>
#include <Protocol/ComponentName2.h>
#include <Protocol/DriverBinding.h>
#include <Protocol/RedfishDiscover.h>
#include <Protocol/Smbios.h>
#include <Protocol/Tcp4.h>
#include <Protocol/Tcp6.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/NetLib.h>
#include <Library/PrintLib.h>
#include <Library/RedfishDebugLib.h>
#include <Library/RestExLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <IndustryStandard/RedfishHostInterface.h>
Go to the source code of this file.
Data Structures | |
struct | REDFISH_DISCOVER_NETWORK_INTERFACE_PROTOCOL |
struct | EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL |
struct | EFI_REDFISH_DISCOVER_REST_EX_INSTANCE_INTERNAL |
struct | REDFISH_DISCOVER_REQUIRED_PROTOCOL |
struct | EFI_REDFISH_DISCOVERED_INTERNAL_LIST |
struct | EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE |
Macros | |
#define | REDFISH_DISCOVER_VERSION 0x00010000 |
#define | EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_TPL TPL_NOTIFY |
#define | MAC_COMPARE(This, Target) (CompareMem ((VOID *)&(This)->MacAddress, &(Target)->MacAddress, (This)->HwAddressSize) == 0) |
#define | VALID_TCP6(Target, This) ((Target)->IsIpv6 && ((This)->NetworkProtocolType == ProtocolTypeTcp6)) |
#define | VALID_TCP4(Target, This) (!(Target)->IsIpv6 && ((This)->NetworkProtocolType == ProtocolTypeTcp4)) |
#define | REDFISH_HI_ITERFACE_SPECIFIC_DATA_LENGTH_OFFSET ((UINT16)(UINTN)(&((SMBIOS_TABLE_TYPE42 *)0)->InterfaceTypeSpecificDataLength)) |
#define | REDFISH_HI_PROTOCOL_HOSTNAME_LENGTH_OFFSET ((UINT16)(UINTN)(&((REDFISH_OVER_IP_PROTOCOL_DATA *)0)->RedfishServiceHostnameLength)) |
#define | EFI_REDFISH_DISCOVER_TCP4_INSTANCE_GUID |
#define | EFI_REDFISH_DISCOVER_TCP6_INSTANCE_GUID |
#define | EFI_REDFISH_DISCOVER_REST_EX_INSTANCE_GUID |
#define | EFI_REDFISH_DISCOVER_DATA_SIGNATURE SIGNATURE_32 ('E', 'R', 'D', 'D') |
#define | EFI_REDFISH_DISOVER_DATA_FROM_DISCOVER_PROTOCOL(a) CR (a, EFI_REDFISH_DISCOVER_REST_EX_INSTANCE_INTERNAL, RedfishDiscoverProtocol, EFI_REDFISH_DISCOVER_DATA_SIGNATURE) |
Typedefs | |
typedef EFI_STATUS(EFIAPI * | EFI_REDFISH_DISCOVER_GET_SUBNET_INFO) (IN EFI_HANDLE ImageHandle, IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *Instance) |
Enumerations | |
enum | NETWORK_INTERFACE_PROTOCOL_TYPE { ProtocolTypeTcp4 = 0 , ProtocolTypeTcp6 , ProtocolTypeRestEx , MaxProtocolType } |
Functions | |
EFI_STATUS | AddAndSignalNewRedfishService (IN EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE *Instance, IN UINTN *RedfishVersion OPTIONAL, IN CHAR8 *RedfishLocation OPTIONAL, IN CHAR8 *Uuid OPTIONAL, IN CHAR8 *Os OPTIONAL, IN CHAR8 *OsVer OPTIONAL, IN CHAR8 *Product OPTIONAL, IN CHAR8 *ProductVer OPTIONAL, IN BOOLEAN UseHttps) |
EFI_STATUS | RedfishGetHostInterfaceProtocolData (IN EFI_SMBIOS_PROTOCOL *Smbios, OUT REDFISH_INTERFACE_DATA **DeviceDescriptor, OUT REDFISH_OVER_IP_PROTOCOL_DATA **ProtocolData) |
Variables | |
EFI_COMPONENT_NAME_PROTOCOL | gRedfishDiscoverComponentName |
EFI_COMPONENT_NAME2_PROTOCOL | gRedfishDiscoverComponentName2 |
EFI_UNICODE_STRING_TABLE * | gRedfishDiscoverControllerNameTable |
EFI_GUID | gRedfishDiscoverTcp4Instance |
EFI_GUID | gRedfishDiscoverTcp6Instance |
EFI_GUID | gRedfishDiscoverRestEXInstance |
This file defines the EFI Redfish Discover Protocol interface.
(C) Copyright 2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2022, AMD Incorporated. All rights reserved. Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishDiscoverInternal.h.
#define EFI_REDFISH_DISCOVER_DATA_SIGNATURE SIGNATURE_32 ('E', 'R', 'D', 'D') |
Definition at line 131 of file RedfishDiscoverInternal.h.
#define EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_TPL TPL_NOTIFY |
Definition at line 40 of file RedfishDiscoverInternal.h.
#define EFI_REDFISH_DISCOVER_REST_EX_INSTANCE_GUID |
Definition at line 62 of file RedfishDiscoverInternal.h.
#define EFI_REDFISH_DISCOVER_TCP4_INSTANCE_GUID |
Definition at line 52 of file RedfishDiscoverInternal.h.
#define EFI_REDFISH_DISCOVER_TCP6_INSTANCE_GUID |
Definition at line 57 of file RedfishDiscoverInternal.h.
#define EFI_REDFISH_DISOVER_DATA_FROM_DISCOVER_PROTOCOL | ( | a | ) | CR (a, EFI_REDFISH_DISCOVER_REST_EX_INSTANCE_INTERNAL, RedfishDiscoverProtocol, EFI_REDFISH_DISCOVER_DATA_SIGNATURE) |
Definition at line 133 of file RedfishDiscoverInternal.h.
#define MAC_COMPARE | ( | This, | |
Target | |||
) | (CompareMem ((VOID *)&(This)->MacAddress, &(Target)->MacAddress, (This)->HwAddressSize) == 0) |
Definition at line 42 of file RedfishDiscoverInternal.h.
#define REDFISH_DISCOVER_VERSION 0x00010000 |
Definition at line 39 of file RedfishDiscoverInternal.h.
#define REDFISH_HI_ITERFACE_SPECIFIC_DATA_LENGTH_OFFSET ((UINT16)(UINTN)(&((SMBIOS_TABLE_TYPE42 *)0)->InterfaceTypeSpecificDataLength)) |
Definition at line 45 of file RedfishDiscoverInternal.h.
#define REDFISH_HI_PROTOCOL_HOSTNAME_LENGTH_OFFSET ((UINT16)(UINTN)(&((REDFISH_OVER_IP_PROTOCOL_DATA *)0)->RedfishServiceHostnameLength)) |
Definition at line 46 of file RedfishDiscoverInternal.h.
#define VALID_TCP4 | ( | Target, | |
This | |||
) | (!(Target)->IsIpv6 && ((This)->NetworkProtocolType == ProtocolTypeTcp4)) |
Definition at line 44 of file RedfishDiscoverInternal.h.
#define VALID_TCP6 | ( | Target, | |
This | |||
) | ((Target)->IsIpv6 && ((This)->NetworkProtocolType == ProtocolTypeTcp6)) |
Definition at line 43 of file RedfishDiscoverInternal.h.
typedef EFI_STATUS(EFIAPI * EFI_REDFISH_DISCOVER_GET_SUBNET_INFO) (IN EFI_HANDLE ImageHandle, IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *Instance) |
This function to get subnet information.
[in] | ImageHandle | EFI handle with this image. |
[in] | Instance | Instance of Network interface. |
EFI_STATUS | Get subnet information successfully. |
Otherwise | Fail to get subnet information. |
Definition at line 163 of file RedfishDiscoverInternal.h.
Enumerator | |
---|---|
ProtocolTypeTcp4 | Network protocol TCPv4. |
ProtocolTypeTcp6 | Network protocol TCCv6. |
ProtocolTypeRestEx | REST EX over network protocol. |
Definition at line 75 of file RedfishDiscoverInternal.h.
EFI_STATUS AddAndSignalNewRedfishService | ( | IN EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE * | Instance, |
IN UINTN *RedfishVersion | OPTIONAL, | ||
IN CHAR8 *RedfishLocation | OPTIONAL, | ||
IN CHAR8 *Uuid | OPTIONAL, | ||
IN CHAR8 *Os | OPTIONAL, | ||
IN CHAR8 *OsVer | OPTIONAL, | ||
IN CHAR8 *Product | OPTIONAL, | ||
IN CHAR8 *ProductVer | OPTIONAL, | ||
IN BOOLEAN | UseHttps | ||
) |
The function adds a new found Redfish service to internal list and notify client.
It simply frees the packet.
[in] | Instance | EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE. |
[in] | RedfishVersion | Redfish version. |
[in] | RedfishLocation | Redfish location. |
[in] | Uuid | Service UUID string. |
[in] | Os | OS string. |
[in] | OsVer | OS version string. |
[in] | Product | Product string. |
[in] | ProductVer | Product version string. |
[in] | UseHttps | Redfish service requires secured connection. |
EFI_SUCCESS | Redfish service is added to list successfully. |
The function adds a new found Redfish service to internal list and notify client.
[in] | Instance | EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE. |
[in] | RedfishVersion | Redfish version. |
[in] | RedfishLocation | Redfish location. |
[in] | Uuid | Service UUID string. |
[in] | Os | OS string. |
[in] | OsVer | OS version string. |
[in] | Product | Product string. |
[in] | ProductVer | Product version string. |
[in] | UseHttps | Redfish service requires secured connection. |
EFI_SUCCESS | Redfish service is added to list successfully. |
Definition at line 925 of file RedfishDiscoverDxe.c.
EFI_STATUS RedfishGetHostInterfaceProtocolData | ( | IN EFI_SMBIOS_PROTOCOL * | Smbios, |
OUT REDFISH_INTERFACE_DATA ** | DeviceDescriptor, | ||
OUT REDFISH_OVER_IP_PROTOCOL_DATA ** | ProtocolData | ||
) |
The function gets information reported in Redfish Host Interface.
It simply frees the packet.
[in] | Smbios | SMBIOS protocol. |
[out] | DeviceDescriptor | Pointer to REDFISH_INTERFACE_DATA. |
[out] | ProtocolData | Pointer to REDFISH_OVER_IP_PROTOCOL_DATA. |
EFI_SUCCESS | Get host interface successfully. |
Otherwise | Fail to tet host interface. |
Definition at line 31 of file RedfishSmbiosHostInterface.c.
|
extern |
Component Name Protocol instance
Definition at line 101 of file ComponentName.c.
|
extern |
Component Name 2 Protocol instance
Definition at line 111 of file ComponentName.c.
|
extern |
Definition at line 126 of file ComponentName.c.