]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
2 Support routines for PxeBc.
3 Copyright (c) 2007 - 2016, 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
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.
14 #ifndef __EFI_PXEBC_SUPPORT_H__
15 #define __EFI_PXEBC_SUPPORT_H__
19 The common notify function associated with various PxeBc events.
21 @param Event The event signaled.
22 @param Context The context.
34 This function initialize(or configure) the Udp4Write instance.
36 @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.
37 @param StationIp Pointer to the station ip address.
38 @param SubnetMask Pointer to the subnetmask of the station ip address.
39 @param Gateway Pointer to the gateway ip address.
40 @param SrcPort Pointer to the srouce port of the station.
41 @param Ttl The time to live field of the IP header.
42 @param ToS The type of service field of the IP header.
44 @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.
45 @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
46 RARP, etc.) is not finished yet.
47 @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
48 @retval EFI_ALREADY_STARTED The EFI UDPv4 Protocol instance is already started/configured
49 and must be stopped/reset before it can be reconfigured.
50 @retval EFI_ACCESS_DENIED UdpConfigData. AllowDuplicatePort is FALSE
51 and UdpConfigData.StationPort is already used by
53 @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this
54 EFI UDPv4 Protocol instance.
55 @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance
57 @retval Others Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.
61 PxeBcConfigureUdpWriteInstance (
62 IN EFI_UDP4_PROTOCOL
*Udp4
,
63 IN EFI_IPv4_ADDRESS
*StationIp
,
64 IN EFI_IPv4_ADDRESS
*SubnetMask
,
65 IN EFI_IPv4_ADDRESS
*Gateway
,
66 IN OUT UINT16
*SrcPort
,
71 Convert number to ASCII value.
73 @param Number Numeric value to convert to decimal ASCII value.
74 @param Buffer Buffer to place ASCII version of the Number.
75 @param Length Length of Buffer.
87 Convert unsigned int number to decimal number.
89 @param Number The unsigned int number will be converted.
90 @param Buffer Pointer to the buffer to store the decimal number after transform.
91 @param[in] BufferSize The maxsize of the buffer.
93 @return the length of the number after transform.
106 Convert ASCII numeric string to a UINTN value.
108 @param Buffer Pointer to the 8-byte unsigned int value.
110 @return UINTN value of the ASCII string.