]> 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 6773ed5074f073d2f6d27d01cf1e07e569a68e31..b9df46c50f63f73671654e246bdb37d8caf8d603 100644 (file)
@@ -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
@@ -1607,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