]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DevicePathDxe/DevicePath.h
Support new format of IPv4 device path node, FibreEx and PcieRoot device path node...
[mirror_edk2.git] / MdeModulePkg / Universal / DevicePathDxe / DevicePath.h
index 7baa48bca72d80b445185bf93b7a75870a4d4b58..8beb68c7ab905c1fda09d806b8becfe02afdc525 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Definition for Device Path Utilities driver\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -31,9 +31,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DevicePathLib.h>\r
 #include <Library/PcdLib.h>\r
 \r
-\r
-#define MAX_CHAR                   480\r
-\r
 #define IS_COMMA(a)                ((a) == L',')\r
 #define IS_HYPHEN(a)               ((a) == L'-')\r
 #define IS_DOT(a)                  ((a) == L'.')\r
@@ -43,11 +40,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define IS_NULL(a)                 ((a) == L'\0')\r
 \r
 \r
-#define SET_DEVICE_PATH_INSTANCE_END_NODE(a) {           \\r
-    (a)->Type       = END_DEVICE_PATH_TYPE;              \\r
-    (a)->SubType    = END_INSTANCE_DEVICE_PATH_SUBTYPE;  \\r
-    (a)->Length[0]  = sizeof (EFI_DEVICE_PATH_PROTOCOL); \\r
-    (a)->Length[1]  = 0;                                 \\r
+#define SET_DEVICE_PATH_INSTANCE_END_NODE(a) {                   \\r
+    (a)->Type       = END_DEVICE_PATH_TYPE;                      \\r
+    (a)->SubType    = END_INSTANCE_DEVICE_PATH_SUBTYPE;          \\r
+    (a)->Length[0]  = (UINT8) sizeof (EFI_DEVICE_PATH_PROTOCOL); \\r
+    (a)->Length[1]  = 0;                                         \\r
   }\r
 \r
 //\r
@@ -55,8 +52,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 typedef struct {\r
   CHAR16  *Str;\r
-  UINTN   Len;\r
-  UINTN   MaxLen;\r
+  UINTN   Length;\r
+  UINTN   Capacity;\r
 } POOL_PRINT;\r
 \r
 typedef\r
@@ -65,10 +62,19 @@ EFI_DEVICE_PATH_PROTOCOL  *
   IN  CHAR16 *DeviceNodeStr\r
   );\r
 \r
+typedef\r
+VOID\r
+(*DEVICE_PATH_TO_TEXT_FUNC) (\r
+  IN OUT POOL_PRINT  *Str,\r
+  IN VOID            *DevPath,\r
+  IN BOOLEAN         DisplayOnly,\r
+  IN BOOLEAN         AllowShortcuts\r
+  );\r
+\r
 typedef struct {\r
-  UINT8   Type;\r
-  UINT8   SubType;\r
-  VOID    (*Function) (POOL_PRINT *, VOID *, BOOLEAN, BOOLEAN);\r
+  UINT8                     Type;\r
+  UINT8                     SubType;\r
+  DEVICE_PATH_TO_TEXT_FUNC  Function;\r
 } DEVICE_PATH_TO_TEXT_TABLE;\r
 \r
 typedef struct {\r
@@ -101,6 +107,9 @@ typedef struct {
 #define USB_SUBCLASS_IRDA_BRIDGE   2\r
 #define USB_SUBCLASS_TEST          3\r
 \r
+#define RFC_1700_UDP_PROTOCOL      17\r
+#define RFC_1700_TCP_PROTOCOL      6\r
+\r
 #pragma pack(1)\r
 \r
 typedef struct {\r
@@ -123,9 +132,9 @@ typedef struct {
 \r
 typedef struct {\r
   EFI_DEVICE_PATH_PROTOCOL  Header;\r
-  UINT32                    HID;\r
-  UINT32                    UID;\r
-  UINT32                    CID;\r
+  UINT32                    Hid;\r
+  UINT32                    Uid;\r
+  UINT32                    Cid;\r
   CHAR8                     HidUidCidStr[3];\r
 } ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR;\r
 \r
@@ -135,7 +144,7 @@ typedef struct {
   UINT16                    LoginOption;\r
   UINT64                    Lun;\r
   UINT16                    TargetPortalGroupTag;\r
-  CHAR8                     iSCSITargetName[1];\r
+  CHAR8                     TargetName[1];\r
 } ISCSI_DEVICE_PATH_WITH_NAME;\r
 \r
 typedef struct {\r
@@ -323,7 +332,7 @@ AppendDeviceNodeProtocolInterface (
   path.\r
 \r
   This function creates a new device path by appending a copy of the device path instance specified\r
-  by DevicePathInstance to a copy of the device path secified by DevicePath in a allocated buffer.\r
+  by DevicePathInstance to a copy of the device path specified by DevicePath in a allocated buffer.\r
   The end-of-device-path device node is moved after the end of the appended device path instance\r
   and a new end-of-device-path-instance node is inserted between.\r
   If DevicePath is NULL, then a copy if DevicePathInstance is returned.\r