]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Include: Fix typos in comments
[mirror_edk2.git] / MdeModulePkg / Include / Library / NetLib.h
index b871a857f950a337fadd6efea267cf80e917292c..c5c0fc212bd8191077c003a23e1d8df9505de2ac 100644 (file)
@@ -52,6 +52,9 @@ typedef UINT16          TCP_PORTNO;
 #define  IP4_MASK_NUM          33\r
 #define  IP6_PREFIX_NUM        129\r
 \r
+#define  IP4_MASK_MAX          32 \r
+#define  IP6_PREFIX_MAX        128\r
+\r
 #define  IP6_HOP_BY_HOP        0\r
 #define  IP6_DESTINATION       60\r
 #define  IP6_ROUTING           43\r
@@ -230,7 +233,7 @@ typedef struct {
 #define IP4_IS_MULTICAST(Ip)              (((Ip) & 0xF0000000) == 0xE0000000)\r
 #define IP4_IS_LOCAL_BROADCAST(Ip)        ((Ip) == 0xFFFFFFFF)\r
 #define IP4_NET_EQUAL(Ip1, Ip2, NetMask)  (((Ip1) & (NetMask)) == ((Ip2) & (NetMask)))\r
-#define IP4_IS_VALID_NETMASK(Ip)          (NetGetMaskLength (Ip) != IP4_MASK_NUM)\r
+#define IP4_IS_VALID_NETMASK(Ip)          (NetGetMaskLength (Ip) != (IP4_MASK_MAX + 1))\r
 \r
 #define IP6_IS_MULTICAST(Ip6)             (((Ip6)->Addr[0]) == 0xFF)\r
 \r
@@ -249,7 +252,7 @@ typedef struct {
 \r
 //\r
 // The debug level definition. This value is also used as the\r
-// syslog's servity level. Don't change it.\r
+// syslog's severity level. Don't change it.\r
 //\r
 #define NETDEBUG_LEVEL_TRACE   5\r
 #define NETDEBUG_LEVEL_WARNING 4\r
@@ -332,8 +335,8 @@ NetDebugASPrint (
   This function will locate a instance of SNP then send the message through it.\r
   Because it isn't open the SNP BY_DRIVER, apply caution when using it.\r
 \r
-  @param Level    The servity level of the message.\r
-  @param Module   The Moudle that generates the log.\r
+  @param Level    The severity level of the message.\r
+  @param Module   The Module that generates the log.\r
   @param File     The file that contains the log.\r
   @param Line     The exact line that contains the log.\r
   @param Message  The user message to log.\r
@@ -747,7 +750,7 @@ NetDestroyLinkList (
   @param[in]  ChildHandleBuffer  An array of child handles to be freed. May be NULL\r
                                  if NumberOfChildren is 0.\r
 \r
-  @retval TURE                   Found the input Handle in ChildHandleBuffer.\r
+  @retval TRUE                   Found the input Handle in ChildHandleBuffer.\r
   @retval FALSE                  Can't find the input Handle in ChildHandleBuffer.\r
 \r
 **/\r
@@ -1005,7 +1008,7 @@ EFI_STATUS
 /**\r
   Iterate through the netmap and call CallBack for each item.\r
 \r
-  It will contiue the traverse if CallBack returns EFI_SUCCESS, otherwise, break\r
+  It will continue the traverse if CallBack returns EFI_SUCCESS, otherwise, break\r
   from the loop. It returns the CallBack's last return value. This function is\r
   delete safe for the current item.\r
 \r
@@ -1305,7 +1308,7 @@ NetLibCreateIPv6DPathNode (
   needs to find its own private data that is related the IP's\r
   service binding instance that is installed on the UNDI/SNP handle.\r
   The controller is then either an MNP or an ARP child handle. Note that\r
-  IP opens these handles using BY_DRIVER. Use that infomation to get the\r
+  IP opens these handles using BY_DRIVER. Use that information to get the\r
   UNDI/SNP handle.\r
 \r
   @param[in]  Controller            The protocol handle to check.\r
@@ -1346,7 +1349,7 @@ NetLibDefaultUnload (
   @param[out]     Ip4Address     The pointer to the converted IPv4 address.\r
 \r
   @retval EFI_SUCCESS            Converted to an IPv4 address successfully.\r
-  @retval EFI_INVALID_PARAMETER  The string is malformated, or Ip4Address is NULL.\r
+  @retval EFI_INVALID_PARAMETER  The string is malformatted, or Ip4Address is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1358,13 +1361,13 @@ NetLibAsciiStrToIp4 (
 \r
 /**\r
   Convert one Null-terminated ASCII string to EFI_IPv6_ADDRESS. The format of the\r
-  string is defined in RFC 4291 - Text Pepresentation of Addresses.\r
+  string is defined in RFC 4291 - Text Representation 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_INVALID_PARAMETER  The string is malformatted, or Ip6Address is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1381,7 +1384,7 @@ NetLibAsciiStrToIp6 (
   @param[out]     Ip4Address     The pointer to the converted IPv4 address.\r
 \r
   @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_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
@@ -1394,13 +1397,13 @@ NetLibStrToIp4 (
 \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
+  the string is defined in RFC 4291 - Text Representation 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_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
@@ -1413,7 +1416,7 @@ NetLibStrToIp6 (
 \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
+  The format of the string is defined in RFC 4291 - Text Representation of Addresses\r
   Prefixes: ipv6-address/prefix-length.\r
 \r
   @param[in]      String         The pointer to the Ascii string.\r
@@ -1421,7 +1424,7 @@ NetLibStrToIp6 (
   @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_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
@@ -1490,9 +1493,9 @@ typedef struct {
   UINT32              Signature;\r
   INTN                RefCnt;  // Reference count to share NET_VECTOR.\r
   NET_VECTOR_EXT_FREE Free;    // external function to free NET_VECTOR\r
-  VOID                *Arg;    // opeque argument to Free\r
+  VOID                *Arg;    // opaque argument to Free\r
   UINT32              Flag;    // Flags, NET_VECTOR_OWN_FIRST\r
-  UINT32              Len;     // Total length of the assocated BLOCKs\r
+  UINT32              Len;     // Total length of the associated BLOCKs\r
 \r
   UINT32              BlockNum;\r
   NET_BLOCK           Block[1];\r