+ @retval EFI_SUCCESS Converted to an IPv4 address successfully.\r
+ @retval EFI_INVALID_PARAMETER The string is mal-formated or Ip4Address is NULL.\r
+ @retval EFI_OUT_OF_RESOURCES Failed to perform the operation due to lack of resources.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+NetLibStrToIp4 (\r
+ IN CONST CHAR16 *String,\r
+ OUT EFI_IPv4_ADDRESS *Ip4Address\r
+ );\r
+\r
+/**\r
+ Convert one Null-terminated Unicode string to EFI_IPv6_ADDRESS. The format of\r
+ the string is defined in RFC 4291 - Text Pepresentation of Addresses.\r
+\r
+ @param[in] String The pointer to the Ascii string.\r
+ @param[out] Ip6Address The pointer to the converted IPv6 address.\r
+\r
+ @retval EFI_SUCCESS Converted to an IPv6 address successfully.\r
+ @retval EFI_INVALID_PARAMETER The string is malformated or Ip6Address is NULL.\r
+ @retval EFI_OUT_OF_RESOURCES Failed to perform the operation due to a lack of resources.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+NetLibStrToIp6 (\r
+ IN CONST CHAR16 *String,\r
+ OUT EFI_IPv6_ADDRESS *Ip6Address\r
+ );\r
+\r
+/**\r
+ Convert one Null-terminated Unicode string to EFI_IPv6_ADDRESS and prefix length.\r
+ The format of the string is defined in RFC 4291 - Text Pepresentation of Addresses\r
+ Prefixes: ipv6-address/prefix-length.\r
+\r
+ @param[in] String The pointer to the Ascii string.\r
+ @param[out] Ip6Address The pointer to the converted IPv6 address.\r
+ @param[out] PrefixLength The pointer to the converted prefix length.\r
+\r
+ @retval EFI_SUCCESS Converted to an IPv6 address successfully.\r
+ @retval EFI_INVALID_PARAMETER The string is malformated, or Ip6Address is NULL.\r
+ @retval EFI_OUT_OF_RESOURCES Failed to perform the operation due to a lack of resources.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+NetLibStrToIp6andPrefix (\r
+ IN CONST CHAR16 *String,\r
+ OUT EFI_IPv6_ADDRESS *Ip6Address,\r
+ OUT UINT8 *PrefixLength\r
+ );\r
+\r
+/**\r
+\r
+ Convert one EFI_IPv6_ADDRESS to Null-terminated Unicode string.\r
+ The text representation of address is defined in RFC 4291.\r
+ \r
+ @param[in] Ip6Address The pointer to the IPv6 address.\r
+ @param[out] String The buffer to return the converted string.\r
+ @param[in] StringSize The length in bytes of the input String.\r
+ \r
+ @retval EFI_SUCCESS Convert to string successfully.\r
+ @retval EFI_INVALID_PARAMETER The input parameter is invalid.\r
+ @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. BufferSize has been \r
+ updated with the size needed to complete the request.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+NetLibIp6ToStr (\r
+ IN EFI_IPv6_ADDRESS *Ip6Address,\r
+ OUT CHAR16 *String,\r
+ IN UINTN StringSize\r
+ );\r
+\r
+//\r
+// Various signatures\r
+//\r
+#define NET_BUF_SIGNATURE SIGNATURE_32 ('n', 'b', 'u', 'f')\r
+#define NET_VECTOR_SIGNATURE SIGNATURE_32 ('n', 'v', 'e', 'c')\r
+#define NET_QUE_SIGNATURE SIGNATURE_32 ('n', 'b', 'q', 'u')\r
+\r
+\r
+#define NET_PROTO_DATA 64 // Opaque buffer for protocols\r
+#define NET_BUF_HEAD 1 // Trim or allocate space from head\r
+#define NET_BUF_TAIL 0 // Trim or allocate space from tail\r
+#define NET_VECTOR_OWN_FIRST 0x01 // We allocated the 1st block in the vector\r