]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
Fix various 'EFIAPI' inconsistencies found while building MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcSupport.h
1 /** @file
2 Support routines for PxeBc.
3 Copyright (c) 2007 - 2009, Intel Corporation.<BR>
4 All rights reserved. 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 @return None
42
43 **/
44 VOID
45 EFIAPI
46 PxeBcCommonNotify (
47 IN EFI_EVENT Event,
48 IN VOID *Context
49 );
50
51
52 /**
53 This function initialize(or configure) the Udp4Write instance.
54
55 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.
56 @param StationIp Pointer to the station ip address.
57 @param SubnetMask Pointer to the subnetmask of the station ip address.
58 @param Gateway Pointer to the gateway ip address.
59 @param SrcPort Pointer to the srouce port of the station.
60
61 @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.
62 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
63 RARP, etc.) is not finished yet.
64 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
65 @retval EFI_ALREADY_STARTED The EFI UDPv4 Protocol instance is already started/configured
66 and must be stopped/reset before it can be reconfigured.
67 @retval EFI_ACCESS_DENIED UdpConfigData. AllowDuplicatePort is FALSE
68 and UdpConfigData.StationPort is already used by
69 other instance.
70 @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this
71 EFI UDPv4 Protocol instance.
72 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance
73 was not opened.
74 @retval Others Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.
75
76 **/
77 EFI_STATUS
78 PxeBcConfigureUdpWriteInstance (
79 IN EFI_UDP4_PROTOCOL *Udp4,
80 IN EFI_IPv4_ADDRESS *StationIp,
81 IN EFI_IPv4_ADDRESS *SubnetMask,
82 IN EFI_IPv4_ADDRESS *Gateway,
83 IN OUT UINT16 *SrcPort
84 );
85 /**
86 Convert number to ASCII value.
87
88 @param Number Numeric value to convert to decimal ASCII value.
89 @param Buffer Buffer to place ASCII version of the Number.
90 @param Length Length of Buffer.
91
92 **/
93 VOID
94 CvtNum (
95 IN UINTN Number,
96 IN UINT8 *Buffer,
97 IN UINTN Length
98 );
99
100
101 /**
102 Convert unsigned int number to decimal number.
103
104 @param Number The unsigned int number will be converted.
105 @param Buffer Pointer to the buffer to store the decimal number after transform.
106
107 @return the length of the number after transform.
108
109 **/
110 UINTN
111 UtoA10 (
112 IN UINTN Number,
113 IN CHAR8 *Buffer
114 );
115
116
117 /**
118 Convert ASCII numeric string to a UINTN value.
119
120 @param Buffer Pointer to the 8-byte unsigned int value.
121
122 @return UINTN value of the ASCII string.
123
124 **/
125 UINT64
126 AtoU64 (
127 IN UINT8 *Buffer
128 );
129
130
131 #endif
132