]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcSupport.h
index 47c2a068899bc7262febac03d3d14dd4ef077394..a28c9740c171f5cbf8a73867d6b402dead5ce181 100644 (file)
-/** @file
-
-Copyright (c) 2007 - 2008, 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.
-
-Module Name:
-
-  PxeBcSupport.h
-
-Abstract:
-
-  Support routines for PxeBc
-
-
-**/
-
-#ifndef __EFI_PXEBC_SUPPORT_H__
-#define __EFI_PXEBC_SUPPORT_H__
-
-EFI_STATUS
-GetSmbiosSystemGuidAndSerialNumber (
-  IN  EFI_GUID  *SystemGuid,
-  OUT CHAR8     **SystemSerialNumber
-  );
-
-
-/**
-  GC_NOTO: Add function description
-
-  @param  Event      GC_NOTO: add argument description
-  @param  Context    GC_NOTO: add argument description
-
-  @return GC_NOTO: add return values
-
-**/
-VOID
-PxeBcCommonNotify (
-  IN EFI_EVENT           Event,
-  IN VOID                *Context
-  )
-;
-
-EFI_STATUS
-PxeBcConfigureUdpWriteInstance (
-  IN EFI_UDP4_PROTOCOL  *Udp4,
-  IN EFI_IPv4_ADDRESS   *StationIp,
-  IN EFI_IPv4_ADDRESS   *SubnetMask,
-  IN EFI_IPv4_ADDRESS   *Gateway,
-  IN OUT UINT16         *SrcPort
-  );
-VOID
-CvtNum (
-  IN UINTN  Number,
-  IN UINT8  *Buffer,
-  IN INTN   Length
-  );
-
-
-/**
-  GC_NOTO: Add function description
-
-  @param  Number     GC_NOTO: add argument description
-  @param  BufferPtr  GC_NOTO: add argument description
-
-  @return GC_NOTO: add return values
-
-**/
-UINTN
-UtoA10 (
-  UINTN Number,
-  CHAR8 *BufferPtr
-  )
-;
-
-
-/**
-  GC_NOTO: Add function description
-
-  @param  BufferPtr  GC_NOTO: add argument description
-
-  @return GC_NOTO: add return values
-
-**/
-UINT64
-AtoU64 (
-  UINT8 *BufferPtr
-  )
-;
-
-
-#endif
-
+/** @file\r
+  Support routines for PxeBc.\r
+Copyright (c) 2007 - 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __EFI_PXEBC_SUPPORT_H__\r
+#define __EFI_PXEBC_SUPPORT_H__\r
+\r
+\r
+/**\r
+  The common notify function associated with various PxeBc events.\r
+\r
+  @param  Event     The event signaled.\r
+  @param  Context   The context.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PxeBcCommonNotify (\r
+  IN EFI_EVENT           Event,\r
+  IN VOID                *Context\r
+  );\r
+\r
+\r
+/**\r
+  This function initialize(or configure) the Udp4Write instance.\r
+\r
+  @param  Udp4       Pointer to the EFI_UDP4_PROTOCOL instance.\r
+  @param  StationIp  Pointer to the station ip address.\r
+  @param  SubnetMask Pointer to the subnetmask of the station ip address.\r
+  @param  Gateway    Pointer to the gateway ip address.\r
+  @param  SrcPort    Pointer to the srouce port of the station.\r
+  @param  Ttl        The time to live field of the IP header.\r
+  @param  ToS        The type of service field of the IP header.\r
+\r
+  @retval EFI_SUCCESS           The configuration settings were set, changed, or reset successfully.\r
+  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,\r
+                                RARP, etc.) is not finished yet.\r
+  @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:\r
+  @retval EFI_ALREADY_STARTED   The EFI UDPv4 Protocol instance is already started/configured\r
+                                and must be stopped/reset before it can be reconfigured.\r
+  @retval EFI_ACCESS_DENIED     UdpConfigData. AllowDuplicatePort is FALSE\r
+                                and UdpConfigData.StationPort is already used by\r
+                                other instance.\r
+  @retval EFI_OUT_OF_RESOURCES  The EFI UDPv4 Protocol driver cannot allocate memory for this\r
+                                EFI UDPv4 Protocol instance.\r
+  @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred and this instance\r
+                                was not opened.\r
+  @retval Others                Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.\r
+\r
+**/\r
+EFI_STATUS\r
+PxeBcConfigureUdpWriteInstance (\r
+  IN EFI_UDP4_PROTOCOL  *Udp4,\r
+  IN EFI_IPv4_ADDRESS   *StationIp,\r
+  IN EFI_IPv4_ADDRESS   *SubnetMask,\r
+  IN EFI_IPv4_ADDRESS   *Gateway,\r
+  IN OUT UINT16         *SrcPort,\r
+  IN     UINT8          Ttl,\r
+  IN     UINT8          ToS\r
+  );\r
+\r
+\r
+/**\r
+  This function is to display the IPv4 address.\r
+\r
+  @param[in]  Ip        The pointer to the IPv4 address.\r
+\r
+**/\r
+VOID\r
+PxeBcShowIp4Addr (\r
+  IN EFI_IPv4_ADDRESS   *Ip\r
+  );\r
+\r
+\r
+/**\r
+  Convert number to ASCII value.\r
+\r
+  @param  Number              Numeric value to convert to decimal ASCII value.\r
+  @param  Buffer              Buffer to place ASCII version of the Number.\r
+  @param  Length              Length of Buffer.\r
+\r
+**/\r
+VOID\r
+CvtNum (\r
+  IN UINTN  Number,\r
+  IN UINT8  *Buffer,\r
+  IN UINTN   Length\r
+  );\r
+\r
+\r
+/**\r
+  Convert unsigned int number to decimal number.\r
+\r
+  @param      Number         The unsigned int number will be converted.\r
+  @param      Buffer         Pointer to the buffer to store the decimal number after transform.\r
+  @param[in]  BufferSize     The maxsize of the buffer.\r
+\r
+  @return the length of the number after transform.\r
+\r
+**/\r
+UINTN\r
+UtoA10 (\r
+  IN UINTN Number,\r
+  IN CHAR8 *Buffer,\r
+  IN UINTN BufferSize\r
+\r
+  );\r
+\r
+\r
+/**\r
+  Convert ASCII numeric string to a UINTN value.\r
+\r
+  @param  Buffer  Pointer to the 8-byte unsigned int value.\r
+\r
+  @return UINTN value of the ASCII string.\r
+\r
+**/\r
+UINT64\r
+AtoU64 (\r
+  IN UINT8 *Buffer\r
+  );\r
+\r
+\r
+#endif\r
+\r