TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishDiscoverInternal.h File Reference

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_TABLEgRedfishDiscoverControllerNameTable
 
EFI_GUID gRedfishDiscoverTcp4Instance
 
EFI_GUID gRedfishDiscoverTcp6Instance
 
EFI_GUID gRedfishDiscoverRestEXInstance
 

Detailed Description

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.

Macro Definition Documentation

◆ EFI_REDFISH_DISCOVER_DATA_SIGNATURE

#define EFI_REDFISH_DISCOVER_DATA_SIGNATURE   SIGNATURE_32 ('E', 'R', 'D', 'D')

Definition at line 131 of file RedfishDiscoverInternal.h.

◆ EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_TPL

#define EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_TPL   TPL_NOTIFY

Definition at line 40 of file RedfishDiscoverInternal.h.

◆ EFI_REDFISH_DISCOVER_REST_EX_INSTANCE_GUID

#define EFI_REDFISH_DISCOVER_REST_EX_INSTANCE_GUID
Value:
{ \
0xc44a6076, 0xd42a, 0x4d54, { 0x85, 0x6d, 0x98, 0x8a, 0x85, 0x8f, 0xa1, 0x11 } \
}

Definition at line 62 of file RedfishDiscoverInternal.h.

◆ EFI_REDFISH_DISCOVER_TCP4_INSTANCE_GUID

#define EFI_REDFISH_DISCOVER_TCP4_INSTANCE_GUID
Value:
{ \
0xfbab97a4, 0x4c6a, 0xf8e8, { 0xf2, 0x25, 0x42, 0x8a, 0x80, 0x3f, 0xb6, 0xaa } \
}

Definition at line 52 of file RedfishDiscoverInternal.h.

◆ EFI_REDFISH_DISCOVER_TCP6_INSTANCE_GUID

#define EFI_REDFISH_DISCOVER_TCP6_INSTANCE_GUID
Value:
{ \
0xbe513b6d, 0x41c1, 0x96Ed, { 0x8d, 0xaf, 0x3e, 0x89, 0xc5, 0xf5, 0x02, 0x25 } \
}

Definition at line 57 of file RedfishDiscoverInternal.h.

◆ EFI_REDFISH_DISOVER_DATA_FROM_DISCOVER_PROTOCOL

#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.

◆ MAC_COMPARE

#define MAC_COMPARE (   This,
  Target 
)    (CompareMem ((VOID *)&(This)->MacAddress, &(Target)->MacAddress, (This)->HwAddressSize) == 0)

Definition at line 42 of file RedfishDiscoverInternal.h.

◆ REDFISH_DISCOVER_VERSION

#define REDFISH_DISCOVER_VERSION   0x00010000

Definition at line 39 of file RedfishDiscoverInternal.h.

◆ REDFISH_HI_ITERFACE_SPECIFIC_DATA_LENGTH_OFFSET

#define REDFISH_HI_ITERFACE_SPECIFIC_DATA_LENGTH_OFFSET   ((UINT16)(UINTN)(&((SMBIOS_TABLE_TYPE42 *)0)->InterfaceTypeSpecificDataLength))

Definition at line 45 of file RedfishDiscoverInternal.h.

◆ REDFISH_HI_PROTOCOL_HOSTNAME_LENGTH_OFFSET

#define REDFISH_HI_PROTOCOL_HOSTNAME_LENGTH_OFFSET   ((UINT16)(UINTN)(&((REDFISH_OVER_IP_PROTOCOL_DATA *)0)->RedfishServiceHostnameLength))

Definition at line 46 of file RedfishDiscoverInternal.h.

◆ VALID_TCP4

#define VALID_TCP4 (   Target,
  This 
)    (!(Target)->IsIpv6 && ((This)->NetworkProtocolType == ProtocolTypeTcp4))

Definition at line 44 of file RedfishDiscoverInternal.h.

◆ VALID_TCP6

#define VALID_TCP6 (   Target,
  This 
)    ((Target)->IsIpv6 && ((This)->NetworkProtocolType == ProtocolTypeTcp6))

Definition at line 43 of file RedfishDiscoverInternal.h.

Typedef Documentation

◆ EFI_REDFISH_DISCOVER_GET_SUBNET_INFO

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.

Parameters
[in]ImageHandleEFI handle with this image.
[in]InstanceInstance of Network interface.
Return values
EFI_STATUSGet subnet information successfully.
OtherwiseFail to get subnet information.

Definition at line 163 of file RedfishDiscoverInternal.h.

Enumeration Type Documentation

◆ NETWORK_INTERFACE_PROTOCOL_TYPE

Enumerator
ProtocolTypeTcp4 

Network protocol TCPv4.

ProtocolTypeTcp6 

Network protocol TCCv6.

ProtocolTypeRestEx 

REST EX over network protocol.

Definition at line 75 of file RedfishDiscoverInternal.h.

Function Documentation

◆ AddAndSignalNewRedfishService()

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.

Parameters
[in]InstanceEFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.
[in]RedfishVersionRedfish version.
[in]RedfishLocationRedfish location.
[in]UuidService UUID string.
[in]OsOS string.
[in]OsVerOS version string.
[in]ProductProduct string.
[in]ProductVerProduct version string.
[in]UseHttpsRedfish service requires secured connection.
Return values
EFI_SUCCESSRedfish service is added to list successfully.

The function adds a new found Redfish service to internal list and notify client.

Parameters
[in]InstanceEFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.
[in]RedfishVersionRedfish version.
[in]RedfishLocationRedfish location.
[in]UuidService UUID string.
[in]OsOS string.
[in]OsVerOS version string.
[in]ProductProduct string.
[in]ProductVerProduct version string.
[in]UseHttpsRedfish service requires secured connection.
Return values
EFI_SUCCESSRedfish service is added to list successfully.

Definition at line 925 of file RedfishDiscoverDxe.c.

◆ RedfishGetHostInterfaceProtocolData()

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.

Parameters
[in]SmbiosSMBIOS protocol.
[out]DeviceDescriptorPointer to REDFISH_INTERFACE_DATA.
[out]ProtocolDataPointer to REDFISH_OVER_IP_PROTOCOL_DATA.
Return values
EFI_SUCCESSGet host interface successfully.
OtherwiseFail to tet host interface.

Definition at line 31 of file RedfishSmbiosHostInterface.c.

Variable Documentation

◆ gRedfishDiscoverComponentName

EFI_COMPONENT_NAME_PROTOCOL gRedfishDiscoverComponentName
extern

Component Name Protocol instance

Definition at line 101 of file ComponentName.c.

◆ gRedfishDiscoverComponentName2

EFI_COMPONENT_NAME2_PROTOCOL gRedfishDiscoverComponentName2
extern

Component Name 2 Protocol instance

Definition at line 111 of file ComponentName.c.

◆ gRedfishDiscoverControllerNameTable

EFI_UNICODE_STRING_TABLE* gRedfishDiscoverControllerNameTable
extern

Definition at line 126 of file ComponentName.c.