TianoCore EDK2 master
Loading...
Searching...
No Matches
UefiDevicePathLib.h
Go to the documentation of this file.
1
9#ifndef _UEFI_DEVICE_PATH_LIB_H_
10#define _UEFI_DEVICE_PATH_LIB_H_
11#include <Uefi.h>
13#include <Protocol/DebugPort.h>
16#include <Guid/PcAnsi.h>
17#include <Library/DebugLib.h>
18#include <Library/PrintLib.h>
19#include <Library/BaseLib.h>
24#include <Library/PcdLib.h>
26
27#define IS_COMMA(a) ((a) == L',')
28#define IS_HYPHEN(a) ((a) == L'-')
29#define IS_DOT(a) ((a) == L'.')
30#define IS_LEFT_PARENTH(a) ((a) == L'(')
31#define IS_RIGHT_PARENTH(a) ((a) == L')')
32#define IS_SLASH(a) ((a) == L'/')
33#define IS_NULL(a) ((a) == L'\0')
34
35//
36// Private Data structure
37//
38typedef struct {
39 CHAR16 *Str;
40 UINTN Count;
41 UINTN Capacity;
43
44typedef
46(*DEVICE_PATH_FROM_TEXT) (
47 IN CHAR16 *Str
48 );
49
50typedef
51VOID
52(*DEVICE_PATH_TO_TEXT) (
53 IN OUT POOL_PRINT *Str,
54 IN VOID *DevicePath,
55 IN BOOLEAN DisplayOnly,
56 IN BOOLEAN AllowShortcuts
57 );
58
59typedef struct {
60 UINT8 Type;
61 UINT8 SubType;
62 DEVICE_PATH_TO_TEXT Function;
64
65typedef struct {
66 UINT8 Type;
67 CHAR16 *Text;
69
70typedef struct {
71 CHAR16 *DevicePathNodeText;
72 DEVICE_PATH_FROM_TEXT Function;
74
75typedef struct {
76 BOOLEAN ClassExist;
77 UINT8 Class;
78 BOOLEAN SubClassExist;
79 UINT8 SubClass;
81
82#define USB_CLASS_AUDIO 1
83#define USB_CLASS_CDCCONTROL 2
84#define USB_CLASS_HID 3
85#define USB_CLASS_IMAGE 6
86#define USB_CLASS_PRINTER 7
87#define USB_CLASS_MASS_STORAGE 8
88#define USB_CLASS_HUB 9
89#define USB_CLASS_CDCDATA 10
90#define USB_CLASS_SMART_CARD 11
91#define USB_CLASS_VIDEO 14
92#define USB_CLASS_DIAGNOSTIC 220
93#define USB_CLASS_WIRELESS 224
94
95#define USB_CLASS_RESERVE 254
96#define USB_SUBCLASS_FW_UPDATE 1
97#define USB_SUBCLASS_IRDA_BRIDGE 2
98#define USB_SUBCLASS_TEST 3
99
100#define RFC_1700_UDP_PROTOCOL 17
101#define RFC_1700_TCP_PROTOCOL 6
102
103#pragma pack(1)
104
105typedef struct {
107 EFI_GUID Guid;
108 UINT8 VendorDefinedData[1];
110
111typedef struct {
113 EFI_GUID Guid;
114 UINT8 VendorDefinedData[1];
116
117typedef struct {
119 EFI_GUID Guid;
120 UINT8 VendorDefinedData[1];
122
123typedef struct {
125 UINT32 Hid;
126 UINT32 Uid;
127 UINT32 Cid;
128 CHAR8 HidUidCidStr[3];
130
131typedef struct {
133 UINT16 NetworkProtocol;
134 UINT16 LoginOption;
135 UINT64 Lun;
136 UINT16 TargetPortalGroupTag;
137 CHAR8 TargetName[1];
139
140typedef struct {
142 EFI_GUID Guid;
143 UINT8 VendorDefinedData[1];
145
146#pragma pack()
147
161UINTN
162EFIAPI
165 );
166
184EFIAPI
187 );
188
214EFIAPI
216 IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL,
217 IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL
218 );
219
249EFIAPI
251 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL,
252 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL
253 );
254
279EFIAPI
281 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL,
282 IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL
283 );
284
314EFIAPI
316 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
317 OUT UINTN *Size
318 );
319
340EFIAPI
342 IN UINT8 NodeType,
343 IN UINT8 NodeSubType,
344 IN UINT16 NodeLength
345 );
346
362BOOLEAN
363EFIAPI
366 );
367
383CHAR16 *
384EFIAPI
387 IN BOOLEAN DisplayOnly,
388 IN BOOLEAN AllowShortcuts
389 );
390
406CHAR16 *
407EFIAPI
410 IN BOOLEAN DisplayOnly,
411 IN BOOLEAN AllowShortcuts
412 );
413
426EFIAPI
428 IN CONST CHAR16 *TextDeviceNode
429 );
430
444EFIAPI
446 IN CONST CHAR16 *TextDevicePath
447 );
448
449#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibAppendDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *FirstDevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *SecondDevicePath OPTIONAL)
UINTN EFIAPI UefiDevicePathLibGetDevicePathSize(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibAppendDevicePathNode(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathNode OPTIONAL)
CHAR16 *EFIAPI UefiDevicePathLibConvertDeviceNodeToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibConvertTextToDeviceNode(IN CONST CHAR16 *TextDeviceNode)
CHAR16 *EFIAPI UefiDevicePathLibConvertDevicePathToText(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, IN BOOLEAN AllowShortcuts)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibConvertTextToDevicePath(IN CONST CHAR16 *TextDevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibAppendDevicePathInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath OPTIONAL, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance OPTIONAL)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibDuplicateDevicePath(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
BOOLEAN EFIAPI UefiDevicePathLibIsDevicePathMultiInstance(IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibGetNextDevicePathInstance(IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, OUT UINTN *Size)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI UefiDevicePathLibCreateDeviceNode(IN UINT8 NodeType, IN UINT8 NodeSubType, IN UINT16 NodeLength)
Definition: Base.h:213