X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=NetworkPkg%2FUefiPxeBcDxe%2FPxeBcSupport.h;h=9264cd92c4670b6ed90defb5586ac69ddde2feea;hp=0d782050f9ac9061fc19e69f22b42f36891a2fdf;hb=ecf98fbcf858b9cb09ff0ac1c2a09c0111b4026b;hpb=a3bcde70e6dc69000f85cc5deee98101d2ae200a
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
index 0d782050f9..9264cd92c4 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h
@@ -1,15 +1,9 @@
/** @file
Support functions declaration for UefiPxeBc Driver.
- Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
- This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -25,20 +19,6 @@
#define ICMP_PARAMETER_PROBLEM 12
-/**
- This function obtain the system guid and serial number from the smbios table.
-
- @param[out] SystemGuid The pointer of returned system guid.
-
- @retval EFI_SUCCESS Successfully obtained the system guid.
- @retval EFI_NOT_FOUND Did not find the SMBIOS table.
-
-**/
-EFI_STATUS
-PxeBcGetSystemGuid (
- OUT EFI_GUID *SystemGuid
- );
-
/**
Flush the previous configration using the new station Ip address.
@@ -52,9 +32,9 @@ PxeBcGetSystemGuid (
**/
EFI_STATUS
-PxeBcFlushStaionIp (
+PxeBcFlushStationIp (
PXEBC_PRIVATE_DATA *Private,
- EFI_IP_ADDRESS *StationIp,
+ EFI_IP_ADDRESS *StationIp, OPTIONAL
EFI_IP_ADDRESS *SubnetMask OPTIONAL
);
@@ -142,13 +122,15 @@ PxeBcIcmp6ErrorUpdate (
/**
This function is to configure a UDPv4 instance for UdpWrite.
- @param[in] Udp4 Pointer to EFI_UDP4_PROTOCOL.
- @param[in] StationIp Pointer to the station address.
- @param[in] SubnetMask Pointer to the subnet mask.
- @param[in] Gateway Pointer to the gateway address.
- @param[in, out] SrcPort Pointer to the source port.
- @param[in] DoNotFragment The flag of DoNotFragment bit in the IPv4
- packet.
+ @param[in] Udp4 The pointer to EFI_UDP4_PROTOCOL.
+ @param[in] StationIp The pointer to the station address.
+ @param[in] SubnetMask The pointer to the subnet mask.
+ @param[in] Gateway The pointer to the gateway address.
+ @param[in, out] SrcPort The pointer to the source port.
+ @param[in] DoNotFragment If TRUE, fragment is not enabled.
+ Otherwise, fragment is enabled.
+ @param[in] Ttl The time to live field of the IP header.
+ @param[in] ToS The type of service field of the IP header.
@retval EFI_SUCCESS Successfully configured this instance.
@retval Others Failed to configure this instance.
@@ -161,7 +143,9 @@ PxeBcConfigUdp4Write (
IN EFI_IPv4_ADDRESS *SubnetMask,
IN EFI_IPv4_ADDRESS *Gateway,
IN OUT UINT16 *SrcPort,
- IN BOOLEAN DoNotFragment
+ IN BOOLEAN DoNotFragment,
+ IN UINT8 Ttl,
+ IN UINT8 ToS
);
@@ -286,7 +270,7 @@ PxeBcCheckByDestIp (
/**
Check the received packet with the destination port.
- @param[in] PxeBcMode Pointer to mode data of PxeBc.
+ @param[in] Mode Pointer to mode data of PxeBc.
@param[in] Session Pointer to the current UDPv4 session.
@param[in, out] DestPort Pointer to the destination port.
@param[in] OpFlags Operation flag for UdpRead/UdpWrite.
@@ -462,6 +446,7 @@ PxeBcUintnToAscDecWithFormat (
@param[in] Number Numeric value to be converted.
@param[in] Buffer Pointer to the buffer for ASCII string.
+ @param[in] BufferSize The maxsize of the buffer.
@return Length The actual length of the ASCII string.
@@ -469,7 +454,8 @@ PxeBcUintnToAscDecWithFormat (
UINTN
PxeBcUintnToAscDec (
IN UINTN Number,
- IN UINT8 *Buffer
+ IN UINT8 *Buffer,
+ IN UINTN BufferSize
);
/**
@@ -488,4 +474,40 @@ PxeBcUniHexToUint8 (
IN CHAR16 Char
);
+/**
+ Calculate the elapsed time.
+
+ @param[in] Private The pointer to PXE private data
+
+**/
+VOID
+CalcElapsedTime (
+ IN PXEBC_PRIVATE_DATA *Private
+ );
+
+/**
+ Get the Nic handle using any child handle in the IPv4 stack.
+
+ @param[in] ControllerHandle Pointer to child handle over IPv4.
+
+ @return NicHandle The pointer to the Nic handle.
+
+**/
+EFI_HANDLE
+PxeBcGetNicByIp4Children (
+ IN EFI_HANDLE ControllerHandle
+ );
+
+/**
+ Get the Nic handle using any child handle in the IPv6 stack.
+
+ @param[in] ControllerHandle Pointer to child handle over IPv6.
+
+ @return NicHandle The pointer to the Nic handle.
+
+**/
+EFI_HANDLE
+PxeBcGetNicByIp6Children (
+ IN EFI_HANDLE ControllerHandle
+ );
#endif