]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Common.h
index d38857c6771018028381612d621c022065360c9c..e0fffc9d0da20eeb5dcdb31a62cc3dfd7bb3dc63 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Common definition for IP4.\r
-  \r
-Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
+\r
+Copyright (c) 2005 - 2018, 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\r
@@ -201,4 +201,23 @@ Ip4NtohHead (
   IN IP4_HEAD           *Head\r
   );\r
 \r
+\r
+/**\r
+  Validate that Ip/Netmask pair is OK to be used as station\r
+  address. Only continuous netmasks are supported. and check\r
+  that StationAddress is a unicast address on the newtwork.\r
+\r
+  @param[in]  Ip                 The IP address to validate.\r
+  @param[in]  Netmask            The netmaks of the IP.\r
+\r
+  @retval TRUE                   The Ip/Netmask pair is valid.\r
+  @retval FALSE                  The Ip/Netmask pair is invalid.\r
+\r
+**/\r
+BOOLEAN\r
+Ip4StationAddressValid (\r
+  IN IP4_ADDR               Ip,\r
+  IN IP4_ADDR               Netmask\r
+  );\r
+\r
 #endif\r