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