]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
MdeModulePkg-DxeCore: rename CoreGetMemoryMapPropertiesTable
[mirror_edk2.git] / NetworkPkg / UefiPxeBcDxe / PxeBcSupport.h
index 59975d59c38caf461d3dacb71cf9ccf455634926..5d611b55c9f6dc54fc6b231c935df27c472d23fe 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Support functions declaration for UefiPxeBc Driver.\r
 \r
-  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 #define ICMP_PARAMETER_PROBLEM     12\r
 \r
 \r
-/**\r
-  This function obtain the system guid and serial number from the smbios table.\r
-\r
-  @param[out]  SystemGuid     The pointer of returned system guid.\r
-\r
-  @retval EFI_SUCCESS         Successfully obtained the system guid.\r
-  @retval EFI_NOT_FOUND       Did not find the SMBIOS table.\r
-\r
-**/\r
-EFI_STATUS\r
-PxeBcGetSystemGuid (\r
-  OUT EFI_GUID              *SystemGuid\r
-  );\r
-\r
 \r
 /**\r
   Flush the previous configration using the new station Ip address.\r
@@ -52,7 +38,7 @@ PxeBcGetSystemGuid (
 \r
 **/\r
 EFI_STATUS\r
-PxeBcFlushStaionIp (\r
+PxeBcFlushStationIp (\r
   PXEBC_PRIVATE_DATA       *Private,\r
   EFI_IP_ADDRESS           *StationIp,\r
   EFI_IP_ADDRESS           *SubnetMask     OPTIONAL\r
@@ -142,13 +128,15 @@ PxeBcIcmp6ErrorUpdate (
 /**\r
   This function is to configure a UDPv4 instance for UdpWrite.\r
 \r
-  @param[in]       Udp4                 Pointer to EFI_UDP4_PROTOCOL.\r
-  @param[in]       StationIp            Pointer to the station address.\r
-  @param[in]       SubnetMask           Pointer to the subnet mask.\r
-  @param[in]       Gateway              Pointer to the gateway address.\r
-  @param[in, out]  SrcPort              Pointer to the source port.\r
-  @param[in]       DoNotFragment        The flag of DoNotFragment bit in the IPv4\r
-                                        packet.\r
+  @param[in]       Udp4                 The pointer to EFI_UDP4_PROTOCOL.\r
+  @param[in]       StationIp            The pointer to the station address.\r
+  @param[in]       SubnetMask           The pointer to the subnet mask.\r
+  @param[in]       Gateway              The pointer to the gateway address.\r
+  @param[in, out]  SrcPort              The pointer to the source port.\r
+  @param[in]       DoNotFragment        If TRUE, fragment is not enabled.\r
+                                        Otherwise, fragment is enabled.\r
+  @param[in]       TTL                  The time to live field of the IP header. \r
+  @param[in]       ToS                  The type of service field of the IP header.\r
 \r
   @retval          EFI_SUCCESS          Successfully configured this instance.\r
   @retval          Others               Failed to configure this instance.\r
@@ -161,7 +149,9 @@ PxeBcConfigUdp4Write (
   IN     EFI_IPv4_ADDRESS   *SubnetMask,\r
   IN     EFI_IPv4_ADDRESS   *Gateway,\r
   IN OUT UINT16             *SrcPort,\r
-  IN     BOOLEAN            DoNotFragment\r
+  IN     BOOLEAN            DoNotFragment,\r
+  IN     UINT8              TTL,\r
+  IN     UINT8              ToS\r
   );\r
 \r
 \r
@@ -462,14 +452,16 @@ PxeBcUintnToAscDecWithFormat (
 \r
   @param[in]  Number         Numeric value to be converted.\r
   @param[in]  Buffer         Pointer to the buffer for ASCII string.\r
-\r
+  @param[in]  BufferSize     The maxsize of the buffer.\r
+  \r
   @return     Length         The actual length of the ASCII string.\r
 \r
 **/\r
 UINTN\r
 PxeBcUintnToAscDec (\r
   IN UINTN               Number,\r
-  IN UINT8               *Buffer\r
+  IN UINT8               *Buffer,\r
+  IN UINTN               BufferSize\r
   );\r
 \r
 /**\r
@@ -488,4 +480,40 @@ PxeBcUniHexToUint8 (
   IN  CHAR16               Char\r
   );\r
 \r
+/**\r
+  Calculate the elapsed time.\r
+\r
+  @param[in]      Private      The pointer to PXE private data\r
+\r
+**/\r
+VOID\r
+CalcElapsedTime (\r
+  IN     PXEBC_PRIVATE_DATA     *Private\r
+  );\r
+\r
+/**\r
+  Get the Nic handle using any child handle in the IPv4 stack.\r
+\r
+  @param[in]  ControllerHandle    Pointer to child handle over IPv4.\r
+\r
+  @return NicHandle               The pointer to the Nic handle.\r
+\r
+**/\r
+EFI_HANDLE\r
+PxeBcGetNicByIp4Children (\r
+  IN EFI_HANDLE                 ControllerHandle\r
+  );\r
+\r
+/**\r
+  Get the Nic handle using any child handle in the IPv6 stack.\r
+\r
+  @param[in]  ControllerHandle    Pointer to child handle over IPv6.\r
+\r
+  @return NicHandle               The pointer to the Nic handle.\r
+\r
+**/\r
+EFI_HANDLE\r
+PxeBcGetNicByIp6Children (\r
+  IN EFI_HANDLE                  ControllerHandle\r
+  );\r
 #endif\r