]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcSupport.h
CommitLineData
30368135 1/** @file\r
f737cfb9 2 Support routines for PxeBc.\r
e5eed7d3
HT
3Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials\r
30368135 5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
f737cfb9 12**/\r
30368135 13\r
f737cfb9 14#ifndef __EFI_PXEBC_SUPPORT_H__\r
15#define __EFI_PXEBC_SUPPORT_H__\r
30368135 16\r
f737cfb9 17/**\r
18 This function gets system guid and serial number from the smbios table.\r
30368135 19\r
f737cfb9 20 @param SystemGuid The pointer of returned system guid.\r
21 @param SystemSerialNumber The pointer of returned system serial number.\r
30368135 22\r
f737cfb9 23 @retval EFI_SUCCESS Successfully get the system guid and system serial\r
24 number.\r
25 @retval EFI_NOT_FOUND Not find the SMBIOS table.\r
30368135 26\r
27**/\r
30368135 28EFI_STATUS\r
29GetSmbiosSystemGuidAndSerialNumber (\r
30 IN EFI_GUID *SystemGuid,\r
31 OUT CHAR8 **SystemSerialNumber\r
32 );\r
33\r
34\r
35/**\r
f737cfb9 36 The common notify function associated with various PxeBc events. \r
30368135 37\r
f737cfb9 38 @param Event The event signaled.\r
39 @param Context The context.\r
30368135 40\r
30368135 41**/\r
42VOID\r
6d3ea23f 43EFIAPI\r
30368135 44PxeBcCommonNotify (\r
45 IN EFI_EVENT Event,\r
46 IN VOID *Context\r
d59b8b55 47 );\r
30368135 48\r
f737cfb9 49\r
50/**\r
51 This function initialize(or configure) the Udp4Write instance.\r
52 \r
53 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.\r
54 @param StationIp Pointer to the station ip address.\r
55 @param SubnetMask Pointer to the subnetmask of the station ip address.\r
56 @param Gateway Pointer to the gateway ip address.\r
57 @param SrcPort Pointer to the srouce port of the station.\r
58 \r
59 @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.\r
60 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,\r
61 RARP, etc.) is not finished yet.\r
62 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:\r
63 @retval EFI_ALREADY_STARTED The EFI UDPv4 Protocol instance is already started/configured\r
64 and must be stopped/reset before it can be reconfigured.\r
65 @retval EFI_ACCESS_DENIED UdpConfigData. AllowDuplicatePort is FALSE\r
66 and UdpConfigData.StationPort is already used by\r
67 other instance.\r
68 @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this\r
69 EFI UDPv4 Protocol instance.\r
70 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance\r
71 was not opened.\r
72 @retval Others Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.\r
73 \r
74**/\r
30368135 75EFI_STATUS\r
76PxeBcConfigureUdpWriteInstance (\r
77 IN EFI_UDP4_PROTOCOL *Udp4,\r
78 IN EFI_IPv4_ADDRESS *StationIp,\r
79 IN EFI_IPv4_ADDRESS *SubnetMask,\r
80 IN EFI_IPv4_ADDRESS *Gateway,\r
81 IN OUT UINT16 *SrcPort\r
82 );\r
f737cfb9 83/**\r
84 Convert number to ASCII value.\r
85\r
86 @param Number Numeric value to convert to decimal ASCII value.\r
81b07614 87 @param Buffer Buffer to place ASCII version of the Number.\r
f737cfb9 88 @param Length Length of Buffer.\r
89\r
f737cfb9 90**/\r
30368135 91VOID\r
92CvtNum (\r
93 IN UINTN Number,\r
94 IN UINT8 *Buffer,\r
f737cfb9 95 IN UINTN Length\r
30368135 96 );\r
97\r
98\r
99/**\r
f737cfb9 100 Convert unsigned int number to decimal number.\r
30368135 101\r
d59b8b55 102 @param Number The unsigned int number will be converted.\r
103 @param Buffer Pointer to the buffer to store the decimal number after transform.\r
30368135 104\r
f737cfb9 105 @return the length of the number after transform.\r
30368135 106\r
107**/\r
108UINTN\r
109UtoA10 (\r
f737cfb9 110 IN UINTN Number,\r
111 IN CHAR8 *Buffer\r
d59b8b55 112 );\r
30368135 113\r
114\r
115/**\r
f737cfb9 116 Convert ASCII numeric string to a UINTN value.\r
30368135 117\r
f737cfb9 118 @param Buffer Pointer to the 8-byte unsigned int value.\r
d59b8b55 119\r
f737cfb9 120 @return UINTN value of the ASCII string.\r
30368135 121\r
122**/\r
123UINT64\r
124AtoU64 (\r
f737cfb9 125 IN UINT8 *Buffer\r
d59b8b55 126 );\r
30368135 127\r
128\r
129#endif\r
130\r