This library is only intended to be used by UEFI network stack modules.\r
It provides basic functions for the UEFI network stack.\r
\r
-Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2017, 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<BR>\r
extern EFI_IPv4_ADDRESS mZeroIp4Addr;\r
\r
#define NET_IS_DIGIT(Ch) (('0' <= (Ch)) && ((Ch) <= '9'))\r
+#define NET_IS_HEX(Ch) ((('0' <= (Ch)) && ((Ch) <= '9')) || (('A' <= (Ch)) && ((Ch) <= 'F')) || (('a' <= (Ch)) && ((Ch) <= 'f')))\r
#define NET_ROUNDUP(size, unit) (((size) + (unit) - 1) & (~((unit) - 1)))\r
#define NET_IS_LOWER_CASE_CHAR(Ch) (('a' <= (Ch)) && ((Ch) <= 'z'))\r
#define NET_IS_UPPER_CASE_CHAR(Ch) (('A' <= (Ch)) && ((Ch) <= 'Z'))\r
\r
@retval EFI_SUCCESS Converted to an IPv4 address successfully.\r
@retval EFI_INVALID_PARAMETER The string is mal-formatted 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
\r
@retval EFI_SUCCESS Converted to an IPv6 address successfully.\r
@retval EFI_INVALID_PARAMETER The string is malformatted 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
\r
@retval EFI_SUCCESS Converted to an IPv6 address successfully.\r
@retval EFI_INVALID_PARAMETER The string is malformatted, 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
(sizeof (NET_BUF) + ((BlockOpNum) - 1) * sizeof (NET_BLOCK_OP))\r
\r
#define NET_HEADSPACE(BlockOp) \\r
- (UINTN)((BlockOp)->Head - (BlockOp)->BlockHead)\r
+ ((UINTN)((BlockOp)->Head) - (UINTN)((BlockOp)->BlockHead))\r
\r
#define NET_TAILSPACE(BlockOp) \\r
- (UINTN)((BlockOp)->BlockTail - (BlockOp)->Tail)\r
+ ((UINTN)((BlockOp)->BlockTail) - (UINTN)((BlockOp)->Tail))\r
\r
/**\r
Allocate a single block NET_BUF. Upon allocation, all the\r