]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg: Update IP4 stack to support point-to-point link with 31-bit mask.
[mirror_edk2.git] / MdeModulePkg / Include / Library / NetLib.h
index 09ead094977ab9f6768dc0300dec3886d9ae0b94..b9df46c50f63f73671654e246bdb37d8caf8d603 100644 (file)
@@ -2,7 +2,7 @@
   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
@@ -414,8 +414,10 @@ NetGetIpClass (
 \r
   ASSERT if NetMask is zero.\r
   \r
-  If all bits of the host address of IP are 0 or 1, IP is also not a valid unicast address.\r
-\r
+  If all bits of the host address of IP are 0 or 1, IP is also not a valid unicast address,\r
+  except when the originator is one of the endpoints of a point-to-point link with a 31-bit\r
+  mask (RFC3021).\r
+  \r
   @param[in]  Ip                    The IP to check against.\r
   @param[in]  NetMask               The mask of the IP.\r
 \r
@@ -1391,7 +1393,6 @@ NetLibAsciiStrToIp6 (
 \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
@@ -1410,7 +1411,6 @@ NetLibStrToIp4 (
 \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
@@ -1431,7 +1431,6 @@ NetLibStrToIp6 (
 \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
@@ -1610,10 +1609,10 @@ typedef struct {
   (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