TianoCore EDK2 master
Loading...
Searching...
No Matches
RedfishPlatformHostInterfaceLib.c
Go to the documentation of this file.
1
12#include <Uefi.h>
13#include <Library/BaseLib.h>
15#include <Library/DebugLib.h>
18#include <Library/PrintLib.h>
20#include <Library/UefiLib.h>
23
25#include <Guid/GlobalVariable.h>
26
27#define VERBOSE_COLUME_SIZE (16)
28
29REDFISH_OVER_IP_PROTOCOL_DATA *mRedfishOverIpProtocolData;
30UINT8 mRedfishProtocolDataSize;
31
42 OUT EFI_MAC_ADDRESS *MacAddress
43 )
44{
45 REST_EX_SERVICE_DEVICE_PATH_DATA *RestExServiceDevicePathData;
46 EFI_DEVICE_PATH_PROTOCOL *RestExServiceDevicePath;
47 MAC_ADDR_DEVICE_PATH *MacAddressDevicePath;
48
49 RestExServiceDevicePathData = NULL;
50 RestExServiceDevicePath = NULL;
51
52 RestExServiceDevicePathData = (REST_EX_SERVICE_DEVICE_PATH_DATA *)PcdGetPtr (PcdRedfishRestExServiceDevicePath);
53 if ((RestExServiceDevicePathData == NULL) ||
54 (RestExServiceDevicePathData->DevicePathNum == 0) ||
55 !IsDevicePathValid (RestExServiceDevicePathData->DevicePath, 0))
56 {
57 return EFI_NOT_FOUND;
58 }
59
60 RestExServiceDevicePath = RestExServiceDevicePathData->DevicePath;
61 if (RestExServiceDevicePathData->DevicePathMatchMode != DEVICE_PATH_MATCH_MAC_NODE) {
62 return EFI_NOT_FOUND;
63 }
64
65 //
66 // Find Mac DevicePath Node.
67 //
68 while (!IsDevicePathEnd (RestExServiceDevicePath) &&
69 ((DevicePathType (RestExServiceDevicePath) != MESSAGING_DEVICE_PATH) ||
70 (DevicePathSubType (RestExServiceDevicePath) != MSG_MAC_ADDR_DP)))
71 {
72 RestExServiceDevicePath = NextDevicePathNode (RestExServiceDevicePath);
73 }
74
75 if (!IsDevicePathEnd (RestExServiceDevicePath)) {
76 MacAddressDevicePath = (MAC_ADDR_DEVICE_PATH *)RestExServiceDevicePath;
77 CopyMem ((VOID *)MacAddress, (VOID *)&MacAddressDevicePath->MacAddress, sizeof (EFI_MAC_ADDRESS));
78 return EFI_SUCCESS;
79 }
80
81 return EFI_NOT_FOUND;
82}
83
96 OUT UINT8 *DeviceType,
97 OUT REDFISH_INTERFACE_DATA **DeviceDescriptor
98 )
99{
100 EFI_STATUS Status;
101 EFI_MAC_ADDRESS MacAddress;
102 REDFISH_INTERFACE_DATA *RedfishInterfaceData;
103 PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 *ThisDeviceDescriptor;
104
105 RedfishInterfaceData = AllocateZeroPool (sizeof (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1);
106 if (RedfishInterfaceData == NULL) {
107 return EFI_OUT_OF_RESOURCES;
108 }
109
110 RedfishInterfaceData->DeviceType = REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2;
111 //
112 // Fill up device type information.
113 //
114 ThisDeviceDescriptor = (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2 *)((UINT8 *)RedfishInterfaceData + 1);
115 ThisDeviceDescriptor->Length = sizeof (PCI_OR_PCIE_INTERFACE_DEVICE_DESCRIPTOR_V2) + 1;
116 Status = GetMacAddressInformation (&MacAddress);
117 if (EFI_ERROR (Status)) {
118 FreePool (RedfishInterfaceData);
119 return EFI_NOT_FOUND;
120 }
121
122 CopyMem ((VOID *)&ThisDeviceDescriptor->MacAddress, (VOID *)&MacAddress, sizeof (ThisDeviceDescriptor->MacAddress));
123 *DeviceType = REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2;
124 *DeviceDescriptor = RedfishInterfaceData;
125 return EFI_SUCCESS;
126}
127
144 OUT MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord,
145 IN UINT8 IndexOfProtocolData
146 )
147{
148 MC_HOST_INTERFACE_PROTOCOL_RECORD *ThisProtocolRecord;
149
150 if (mRedfishOverIpProtocolData == 0) {
151 return EFI_NOT_FOUND;
152 }
153
154 if (IndexOfProtocolData == 0) {
155 //
156 // Return the first Redfish protocol data to caller. We only have
157 // one protocol data in this case.
158 //
159 ThisProtocolRecord = (MC_HOST_INTERFACE_PROTOCOL_RECORD *)AllocatePool (mRedfishProtocolDataSize + sizeof (MC_HOST_INTERFACE_PROTOCOL_RECORD) - 1);
160 ThisProtocolRecord->ProtocolType = MCHostInterfaceProtocolTypeRedfishOverIP;
161 ThisProtocolRecord->ProtocolTypeDataLen = mRedfishProtocolDataSize;
162 CopyMem ((VOID *)&ThisProtocolRecord->ProtocolTypeData, (VOID *)mRedfishOverIpProtocolData, mRedfishProtocolDataSize);
163 *ProtocolRecord = ThisProtocolRecord;
164 return EFI_SUCCESS;
165 }
166
167 return EFI_NOT_FOUND;
168}
169
175VOID
178 )
179{
180 UINTN Index;
181
182 for (Index = 0; Index < 4; Index++) {
183 DEBUG ((DEBUG_VERBOSE, "%d", Ip->Addr[Index]));
184 if (Index < 3) {
185 DEBUG ((DEBUG_VERBOSE, "."));
186 }
187 }
188
189 DEBUG ((DEBUG_VERBOSE, "\n"));
190}
191
197VOID
200 )
201{
202 UINTN Index;
203
204 for (Index = 0; Index < 16; Index++) {
205 if (Ip->Addr[Index] != 0) {
206 DEBUG ((DEBUG_VERBOSE, "%x", Ip->Addr[Index]));
207 }
208
209 Index++;
210
211 if (Index > 15) {
212 return;
213 }
214
215 if (((Ip->Addr[Index] & 0xf0) == 0) && (Ip->Addr[Index - 1] != 0)) {
216 DEBUG ((DEBUG_VERBOSE, "0"));
217 }
218
219 DEBUG ((DEBUG_VERBOSE, "%x", Ip->Addr[Index]));
220
221 if (Index < 15) {
222 DEBUG ((DEBUG_VERBOSE, ":"));
223 }
224 }
225
226 DEBUG ((DEBUG_VERBOSE, "\n"));
227}
228
235VOID
237 IN UINT8 *Data,
238 IN UINTN Size
239 )
240{
241 UINTN Index;
242
243 for (Index = 0; Index < Size; Index++) {
244 DEBUG ((DEBUG_VERBOSE, "%02x ", (UINTN)Data[Index]));
245 }
246}
247
254VOID
256 IN UINT8 *Data,
257 IN UINTN Size
258 )
259{
260 UINTN Index;
261 UINTN Count;
262 UINTN Left;
263
264 Count = Size / VERBOSE_COLUME_SIZE;
265 Left = Size % VERBOSE_COLUME_SIZE;
266 for (Index = 0; Index < Count; Index++) {
267 InternalDumpData (Data + Index * VERBOSE_COLUME_SIZE, VERBOSE_COLUME_SIZE);
268 DEBUG ((DEBUG_VERBOSE, "\n"));
269 }
270
271 if (Left != 0) {
272 InternalDumpData (Data + Index * VERBOSE_COLUME_SIZE, Left);
273 DEBUG ((DEBUG_VERBOSE, "\n"));
274 }
275
276 DEBUG ((DEBUG_VERBOSE, "\n"));
277}
278
285VOID
287 IN REDFISH_OVER_IP_PROTOCOL_DATA *RedfishProtocolData,
288 IN UINT8 RedfishProtocolDataSize
289 )
290{
291 CHAR16 Hostname[16];
292
293 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData: \n"));
294 InternalDumpHex ((UINT8 *)RedfishProtocolData, RedfishProtocolDataSize);
295
296 DEBUG ((DEBUG_VERBOSE, "Parsing as below: \n"));
297
298 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->ServiceUuid - %g\n", &(RedfishProtocolData->ServiceUuid)));
299
300 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->HostIpAssignmentType - %d\n", RedfishProtocolData->HostIpAssignmentType));
301
302 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->HostIpAddressFormat - %d\n", RedfishProtocolData->HostIpAddressFormat));
303
304 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->HostIpAddress: \n"));
305 if (RedfishProtocolData->HostIpAddressFormat == 0x01) {
306 InternalDumpIp4Addr ((EFI_IPv4_ADDRESS *)(RedfishProtocolData->HostIpAddress));
307 } else {
308 InternalDumpIp6Addr ((EFI_IPv6_ADDRESS *)(RedfishProtocolData->HostIpAddress));
309 }
310
311 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->HostIpMask: \n"));
312 if (RedfishProtocolData->HostIpAddressFormat == 0x01) {
313 InternalDumpIp4Addr ((EFI_IPv4_ADDRESS *)(RedfishProtocolData->HostIpMask));
314 } else {
315 InternalDumpIp6Addr ((EFI_IPv6_ADDRESS *)(RedfishProtocolData->HostIpMask));
316 }
317
318 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceIpDiscoveryType - %d\n", RedfishProtocolData->RedfishServiceIpDiscoveryType));
319
320 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceIpAddressFormat - %d\n", RedfishProtocolData->RedfishServiceIpAddressFormat));
321
322 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceIpAddress: \n"));
323 if (RedfishProtocolData->RedfishServiceIpAddressFormat == 0x01) {
324 InternalDumpIp4Addr ((EFI_IPv4_ADDRESS *)(RedfishProtocolData->RedfishServiceIpAddress));
325 } else {
326 InternalDumpIp6Addr ((EFI_IPv6_ADDRESS *)(RedfishProtocolData->RedfishServiceIpAddress));
327 }
328
329 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceIpMask: \n"));
330 if (RedfishProtocolData->RedfishServiceIpAddressFormat == 0x01) {
331 InternalDumpIp4Addr ((EFI_IPv4_ADDRESS *)(RedfishProtocolData->RedfishServiceIpMask));
332 } else {
333 InternalDumpIp6Addr ((EFI_IPv6_ADDRESS *)(RedfishProtocolData->RedfishServiceIpMask));
334 }
335
336 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceIpPort - %d\n", RedfishProtocolData->RedfishServiceIpPort));
337
338 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceVlanId - %d\n", RedfishProtocolData->RedfishServiceVlanId));
339
340 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceHostnameLength - %d\n", RedfishProtocolData->RedfishServiceHostnameLength));
341
342 AsciiStrToUnicodeStrS ((CHAR8 *)RedfishProtocolData->RedfishServiceHostname, Hostname, sizeof (Hostname) / sizeof (Hostname[0]));
343 DEBUG ((DEBUG_VERBOSE, "RedfishProtocolData->RedfishServiceHostname - %s\n", Hostname));
344}
345
356 OUT REDFISH_OVER_IP_PROTOCOL_DATA **RedfishProtocolData,
357 OUT UINT8 *RedfishProtocolDataSize
358 )
359{
360 EFI_STATUS Status;
361 UINT8 HostIpAssignmentType;
362 UINTN HostIpAssignmentTypeSize;
363 EFI_IPv4_ADDRESS HostIpAddress;
364 UINTN IPv4DataSize;
365 EFI_IPv4_ADDRESS HostIpMask;
366 EFI_IPv4_ADDRESS RedfishServiceIpAddress;
367 EFI_IPv4_ADDRESS RedfishServiceIpMask;
368 UINT16 RedfishServiceIpPort;
369 UINTN IpPortDataSize;
370 UINT8 HostNameSize;
371 CHAR8 RedfishHostName[20];
372
373 if ((RedfishProtocolData == NULL) || (RedfishProtocolDataSize == NULL)) {
374 return EFI_INVALID_PARAMETER;
375 }
376
377 //
378 // 1. Retrieve Address Information from variable.
379 //
380 Status = gRT->GetVariable (
381 L"HostIpAssignmentType",
382 &gEmuRedfishServiceGuid,
383 NULL,
384 &HostIpAssignmentTypeSize,
385 &HostIpAssignmentType
386 );
387 if (EFI_ERROR (Status)) {
388 DEBUG ((DEBUG_ERROR, "RedfishPlatformDxe: GetVariable HostIpAssignmentType - %r\n", Status));
389 return Status;
390 }
391
392 IPv4DataSize = sizeof (EFI_IPv4_ADDRESS);
393 if (HostIpAssignmentType == 1 ) {
394 Status = gRT->GetVariable (
395 L"HostIpAddress",
396 &gEmuRedfishServiceGuid,
397 NULL,
398 &IPv4DataSize,
399 &HostIpAddress
400 );
401 if (EFI_ERROR (Status)) {
402 DEBUG ((DEBUG_ERROR, "RedfishPlatformDxe: GetVariable HostIpAddress - %r\n", Status));
403 return Status;
404 }
405
406 Status = gRT->GetVariable (
407 L"HostIpMask",
408 &gEmuRedfishServiceGuid,
409 NULL,
410 &IPv4DataSize,
411 &HostIpMask
412 );
413 if (EFI_ERROR (Status)) {
414 DEBUG ((DEBUG_ERROR, "RedfishPlatformDxe: GetVariable HostIpMask - %r\n", Status));
415 return Status;
416 }
417 }
418
419 Status = gRT->GetVariable (
420 L"RedfishServiceIpAddress",
421 &gEmuRedfishServiceGuid,
422 NULL,
423 &IPv4DataSize,
424 &RedfishServiceIpAddress
425 );
426 if (EFI_ERROR (Status)) {
427 DEBUG ((DEBUG_ERROR, "RedfishPlatformDxe: GetVariable RedfishServiceIpAddress - %r\n", Status));
428 return Status;
429 }
430
431 Status = gRT->GetVariable (
432 L"RedfishServiceIpMask",
433 &gEmuRedfishServiceGuid,
434 NULL,
435 &IPv4DataSize,
436 &RedfishServiceIpMask
437 );
438 if (EFI_ERROR (Status)) {
439 DEBUG ((DEBUG_ERROR, "RedfishPlatformDxe: GetVariable RedfishServiceIpMask - %r\n", Status));
440 return Status;
441 }
442
443 Status = gRT->GetVariable (
444 L"RedfishServiceIpPort",
445 &gEmuRedfishServiceGuid,
446 NULL,
447 &IpPortDataSize,
448 &RedfishServiceIpPort
449 );
450 if (EFI_ERROR (Status)) {
451 DEBUG ((DEBUG_ERROR, "RedfishPlatformDxe: GetVariable RedfishServiceIpPort - %r\n", Status));
452 return Status;
453 }
454
456 RedfishHostName,
457 sizeof (RedfishHostName),
458 "%d.%d.%d.%d",
459 RedfishServiceIpAddress.Addr[0],
460 RedfishServiceIpAddress.Addr[1],
461 RedfishServiceIpAddress.Addr[2],
462 RedfishServiceIpAddress.Addr[3]
463 );
464
465 HostNameSize = (UINT8)AsciiStrLen (RedfishHostName) + 1;
466
467 //
468 // 2. Protocol Data Size.
469 //
470 *RedfishProtocolDataSize = sizeof (REDFISH_OVER_IP_PROTOCOL_DATA) - 1 + HostNameSize;
471
472 //
473 // 3. Protocol Data.
474 //
475 *RedfishProtocolData = (REDFISH_OVER_IP_PROTOCOL_DATA *)AllocateZeroPool (*RedfishProtocolDataSize);
476 if (*RedfishProtocolData == NULL) {
477 return EFI_OUT_OF_RESOURCES;
478 }
479
480 CopyGuid (&(*RedfishProtocolData)->ServiceUuid, &gEmuRedfishServiceGuid);
481
482 (*RedfishProtocolData)->HostIpAssignmentType = HostIpAssignmentType;
483 (*RedfishProtocolData)->HostIpAddressFormat = 1; // Only support IPv4
484
485 if (HostIpAssignmentType == 1 ) {
486 (*RedfishProtocolData)->HostIpAddress[0] = HostIpAddress.Addr[0];
487 (*RedfishProtocolData)->HostIpAddress[1] = HostIpAddress.Addr[1];
488 (*RedfishProtocolData)->HostIpAddress[2] = HostIpAddress.Addr[2];
489 (*RedfishProtocolData)->HostIpAddress[3] = HostIpAddress.Addr[3];
490
491 (*RedfishProtocolData)->HostIpMask[0] = HostIpMask.Addr[0];
492 (*RedfishProtocolData)->HostIpMask[1] = HostIpMask.Addr[1];
493 (*RedfishProtocolData)->HostIpMask[2] = HostIpMask.Addr[2];
494 (*RedfishProtocolData)->HostIpMask[3] = HostIpMask.Addr[3];
495 }
496
497 (*RedfishProtocolData)->RedfishServiceIpDiscoveryType = 1; // Use static IP address
498 (*RedfishProtocolData)->RedfishServiceIpAddressFormat = 1; // Only support IPv4
499
500 (*RedfishProtocolData)->RedfishServiceIpAddress[0] = RedfishServiceIpAddress.Addr[0];
501 (*RedfishProtocolData)->RedfishServiceIpAddress[1] = RedfishServiceIpAddress.Addr[1];
502 (*RedfishProtocolData)->RedfishServiceIpAddress[2] = RedfishServiceIpAddress.Addr[2];
503 (*RedfishProtocolData)->RedfishServiceIpAddress[3] = RedfishServiceIpAddress.Addr[3];
504
505 (*RedfishProtocolData)->RedfishServiceIpMask[0] = RedfishServiceIpMask.Addr[0];
506 (*RedfishProtocolData)->RedfishServiceIpMask[1] = RedfishServiceIpMask.Addr[1];
507 (*RedfishProtocolData)->RedfishServiceIpMask[2] = RedfishServiceIpMask.Addr[2];
508 (*RedfishProtocolData)->RedfishServiceIpMask[3] = RedfishServiceIpMask.Addr[3];
509
510 (*RedfishProtocolData)->RedfishServiceIpPort = RedfishServiceIpPort;
511 (*RedfishProtocolData)->RedfishServiceVlanId = 0xffffffff;
512
513 (*RedfishProtocolData)->RedfishServiceHostnameLength = HostNameSize;
514 AsciiStrCpyS ((CHAR8 *)((*RedfishProtocolData)->RedfishServiceHostname), HostNameSize, RedfishHostName);
515
516 return Status;
517}
518
530EFIAPI
532 IN EFI_HANDLE ImageHandle,
533 IN EFI_SYSTEM_TABLE *SystemTable
534 )
535{
536 EFI_STATUS Status;
537
538 Status = GetRedfishRecordFromVariable (&mRedfishOverIpProtocolData, &mRedfishProtocolDataSize);
539 DEBUG ((DEBUG_INFO, "%a: GetRedfishRecordFromVariable() - %r\n", __func__, Status));
540 if (!EFI_ERROR (Status)) {
541 DumpRedfishIpProtocolData (mRedfishOverIpProtocolData, mRedfishProtocolDataSize);
542 }
543
544 return EFI_SUCCESS;
545}
546
564 OUT EFI_GUID **InformationReadinessGuid
565 )
566{
567 return EFI_UNSUPPORTED;
568}
UINT64 UINTN
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
Definition: String.c:641
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
Definition: SafeString.c:2873
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
Definition: SafeString.c:1797
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
Definition: MemLibGuid.c:39
#define MSG_MAC_ADDR_DP
Definition: DevicePath.h:550
#define MESSAGING_DEVICE_PATH
Definition: DevicePath.h:321
UINT8 EFIAPI DevicePathType(IN CONST VOID *Node)
UINT8 EFIAPI DevicePathSubType(IN CONST VOID *Node)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
BOOLEAN EFIAPI IsDevicePathValid(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN UINTN MaxSize)
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,...)
Definition: PrintLib.c:813
EFI_RUNTIME_SERVICES * gRT
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define PcdGetPtr(TokenName)
Definition: PcdLib.h:388
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
VOID InternalDumpData(IN UINT8 *Data, IN UINTN Size)
VOID InternalDumpHex(IN UINT8 *Data, IN UINTN Size)
EFI_STATUS RedfishPlatformHostInterfaceNotification(OUT EFI_GUID **InformationReadinessGuid)
VOID InternalDumpIp6Addr(IN EFI_IPv6_ADDRESS *Ip)
VOID DumpRedfishIpProtocolData(IN REDFISH_OVER_IP_PROTOCOL_DATA *RedfishProtocolData, IN UINT8 RedfishProtocolDataSize)
EFI_STATUS GetMacAddressInformation(OUT EFI_MAC_ADDRESS *MacAddress)
EFI_STATUS EFIAPI RedfishPlatformHostInterfaceConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
VOID InternalDumpIp4Addr(IN EFI_IPv4_ADDRESS *Ip)
EFI_STATUS RedfishPlatformHostInterfaceDeviceDescriptor(OUT UINT8 *DeviceType, OUT REDFISH_INTERFACE_DATA **DeviceDescriptor)
EFI_STATUS GetRedfishRecordFromVariable(OUT REDFISH_OVER_IP_PROTOCOL_DATA **RedfishProtocolData, OUT UINT8 *RedfishProtocolDataSize)
EFI_STATUS RedfishPlatformHostInterfaceProtocolData(OUT MC_HOST_INTERFACE_PROTOCOL_RECORD **ProtocolRecord, IN UINT8 IndexOfProtocolData)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
IPv4_ADDRESS EFI_IPv4_ADDRESS
Definition: UefiBaseType.h:85
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
Definition: Base.h:213
EFI_MAC_ADDRESS MacAddress
Definition: DevicePath.h:556
UINT8 MacAddress[6]
The MAC address of the PCI/PCIe network device.
UINT8 Length
Length of the structure, including Device Type and Length fields.
Device descriptor data formated based on Device Type.
UINT8 DeviceType
The Device Type of the interface.