TianoCore EDK2 master
Loading...
Searching...
No Matches
PxeBcSupport.h File Reference

Go to the source code of this file.

Macros

#define ICMP_DEST_UNREACHABLE   3
 
#define ICMP_SOURCE_QUENCH   4
 
#define ICMP_REDIRECT   5
 
#define ICMP_ECHO_REQUEST   8
 
#define ICMP_TIME_EXCEEDED   11
 
#define ICMP_PARAMETER_PROBLEM   12
 

Functions

EFI_STATUS PxeBcFlushStationIp (PXEBC_PRIVATE_DATA *Private, EFI_IP_ADDRESS *StationIp OPTIONAL, EFI_IP_ADDRESS *SubnetMask OPTIONAL)
 
VOID EFIAPI PxeBcCommonNotify (IN EFI_EVENT Event, IN VOID *Context)
 
BOOLEAN PxeBcCheckArpCache (IN EFI_PXE_BASE_CODE_MODE *Mode, IN EFI_IPv4_ADDRESS *Ip4Addr, OUT EFI_MAC_ADDRESS *MacAddress)
 
VOID EFIAPI PxeBcArpCacheUpdate (IN EFI_EVENT Event, IN VOID *Context)
 
VOID EFIAPI PxeBcIcmpErrorUpdate (IN EFI_EVENT Event, IN VOID *Context)
 
VOID EFIAPI PxeBcIcmp6ErrorUpdate (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS PxeBcConfigUdp4Write (IN EFI_UDP4_PROTOCOL *Udp4, IN EFI_IPv4_ADDRESS *StationIp, IN EFI_IPv4_ADDRESS *SubnetMask, IN EFI_IPv4_ADDRESS *Gateway, IN OUT UINT16 *SrcPort, IN BOOLEAN DoNotFragment, IN UINT8 Ttl, IN UINT8 ToS)
 
EFI_STATUS PxeBcConfigUdp6Write (IN EFI_UDP6_PROTOCOL *Udp6, IN EFI_IPv6_ADDRESS *StationIp, IN OUT UINT16 *SrcPort)
 
EFI_STATUS PxeBcUdp4Write (IN EFI_UDP4_PROTOCOL *Udp4, IN EFI_UDP4_SESSION_DATA *Session, IN EFI_EVENT TimeoutEvent, IN EFI_IPv4_ADDRESS *Gateway OPTIONAL, IN UINTN *HeaderSize OPTIONAL, IN VOID *HeaderPtr OPTIONAL, IN UINTN *BufferSize, IN VOID *BufferPtr)
 
EFI_STATUS PxeBcUdp6Write (IN EFI_UDP6_PROTOCOL *Udp6, IN EFI_UDP6_SESSION_DATA *Session, IN EFI_EVENT TimeoutEvent, IN UINTN *HeaderSize OPTIONAL, IN VOID *HeaderPtr OPTIONAL, IN UINTN *BufferSize, IN VOID *BufferPtr)
 
BOOLEAN PxeBcCheckByIpFilter (IN EFI_PXE_BASE_CODE_MODE *Mode, IN VOID *Session, IN UINT16 OpFlags)
 
BOOLEAN PxeBcCheckByDestIp (IN EFI_PXE_BASE_CODE_MODE *Mode, IN VOID *Session, IN OUT EFI_IP_ADDRESS *DestIp, IN UINT16 OpFlags)
 
BOOLEAN PxeBcCheckByDestPort (IN EFI_PXE_BASE_CODE_MODE *Mode, IN VOID *Session, IN OUT UINT16 *DestPort, IN UINT16 OpFlags)
 
BOOLEAN PxeBcFilterBySrcIp (IN EFI_PXE_BASE_CODE_MODE *Mode, IN VOID *Session, IN OUT EFI_IP_ADDRESS *SrcIp, IN UINT16 OpFlags)
 
BOOLEAN PxeBcFilterBySrcPort (IN EFI_PXE_BASE_CODE_MODE *Mode, IN VOID *Session, IN OUT UINT16 *SrcPort, IN UINT16 OpFlags)
 
EFI_STATUS PxeBcUdp4Read (IN EFI_UDP4_PROTOCOL *Udp4, IN EFI_UDP4_COMPLETION_TOKEN *Token, IN EFI_PXE_BASE_CODE_MODE *Mode, IN EFI_EVENT TimeoutEvent, IN UINT16 OpFlags, IN BOOLEAN *IsDone, OUT BOOLEAN *IsMatched, IN OUT EFI_IP_ADDRESS *DestIp OPTIONAL, IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort OPTIONAL, IN OUT EFI_IP_ADDRESS *SrcIp OPTIONAL, IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL)
 
EFI_STATUS PxeBcUdp6Read (IN EFI_UDP6_PROTOCOL *Udp6, IN EFI_UDP6_COMPLETION_TOKEN *Token, IN EFI_PXE_BASE_CODE_MODE *Mode, IN EFI_EVENT TimeoutEvent, IN UINT16 OpFlags, IN BOOLEAN *IsDone, OUT BOOLEAN *IsMatched, IN OUT EFI_IP_ADDRESS *DestIp OPTIONAL, IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort OPTIONAL, IN OUT EFI_IP_ADDRESS *SrcIp OPTIONAL, IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort OPTIONAL)
 
VOID PxeBcShowIp4Addr (IN EFI_IPv4_ADDRESS *Ip)
 
VOID PxeBcShowIp6Addr (IN EFI_IPv6_ADDRESS *Ip)
 
VOID PxeBcUintnToAscDecWithFormat (IN UINTN Number, IN UINT8 *Buffer, IN INTN Length)
 
UINTN PxeBcUintnToAscDec (IN UINTN Number, IN UINT8 *Buffer, IN UINTN BufferSize)
 
EFI_STATUS PxeBcUniHexToUint8 (OUT UINT8 *Digit, IN CHAR16 Char)
 
VOID CalcElapsedTime (IN PXEBC_PRIVATE_DATA *Private)
 
EFI_HANDLE PxeBcGetNicByIp4Children (IN EFI_HANDLE ControllerHandle)
 
EFI_HANDLE PxeBcGetNicByIp6Children (IN EFI_HANDLE ControllerHandle)
 

Detailed Description

Support functions declaration for UefiPxeBc Driver.

Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PxeBcSupport.h.

Macro Definition Documentation

◆ ICMP_DEST_UNREACHABLE

#define ICMP_DEST_UNREACHABLE   3

Definition at line 13 of file PxeBcSupport.h.

◆ ICMP_ECHO_REQUEST

#define ICMP_ECHO_REQUEST   8

Definition at line 16 of file PxeBcSupport.h.

◆ ICMP_PARAMETER_PROBLEM

#define ICMP_PARAMETER_PROBLEM   12

Definition at line 18 of file PxeBcSupport.h.

◆ ICMP_REDIRECT

#define ICMP_REDIRECT   5

Definition at line 15 of file PxeBcSupport.h.

◆ ICMP_SOURCE_QUENCH

#define ICMP_SOURCE_QUENCH   4

Definition at line 14 of file PxeBcSupport.h.

◆ ICMP_TIME_EXCEEDED

#define ICMP_TIME_EXCEEDED   11

Definition at line 17 of file PxeBcSupport.h.

Function Documentation

◆ CalcElapsedTime()

VOID CalcElapsedTime ( IN PXEBC_PRIVATE_DATA Private)

Calculate the elapsed time.

Parameters
[in]PrivateThe pointer to PXE private data

Definition at line 1495 of file PxeBcSupport.c.

◆ PxeBcArpCacheUpdate()

VOID EFIAPI PxeBcArpCacheUpdate ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Update arp cache periodically.

Parameters
EventPointer to EFI_PXE_BC_PROTOCOL.
ContextContext of the timer event.

Update the arp cache periodically.

Parameters
EventThe pointer to EFI_PXE_BC_PROTOCOL.
ContextContext of the timer event.

Definition at line 180 of file PxeBcSupport.c.

◆ PxeBcCheckArpCache()

BOOLEAN PxeBcCheckArpCache ( IN EFI_PXE_BASE_CODE_MODE Mode,
IN EFI_IPv4_ADDRESS Ip4Addr,
OUT EFI_MAC_ADDRESS MacAddress 
)

Perform arp resolution from the arp cache in PxeBcMode.

Parameters
ModePointer to EFI_PXE_BASE_CODE_MODE.
Ip4AddrThe Ip4 address for resolution.
MacAddressThe resolved MAC address if the resolution is successful. The value is undefined if resolution fails.
Return values
TRUEFound a matched entry.
FALSEDid not find a matched entry.

Do arp resolution from arp cache in PxeBcMode.

Parameters
ModeThe pointer to EFI_PXE_BASE_CODE_MODE.
Ip4AddrThe Ip4 address for resolution.
MacAddressThe resolved MAC address if the resolution is successful. The value is undefined if the resolution fails.
Return values
TRUEFound an matched entry.
FALSEDid not find a matched entry.

Definition at line 144 of file PxeBcSupport.c.

◆ PxeBcCheckByDestIp()

BOOLEAN PxeBcCheckByDestIp ( IN EFI_PXE_BASE_CODE_MODE Mode,
IN VOID *  Session,
IN OUT EFI_IP_ADDRESS DestIp,
IN UINT16  OpFlags 
)

Filter the received packet with the destination Ip.

Parameters
[in]ModePointer to mode data of PxeBc.
[in]SessionPointer to the current UDPv4 session.
[in,out]DestIpPointer to the dest Ip address.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUESuccessfully passed the IPv4 filter.
FALSEFailed to pass the IPv4 filter.

Filter the received packet using the destination Ip.

Parameters
[in]ModeThe pointer to the mode data of PxeBc.
[in]SessionThe pointer to the current UDPv4 session.
[in,out]DestIpThe pointer to the destination Ip address.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUEPassed the IPv4 filter successfully.
FALSEFailed to pass the IPv4 filter.

Definition at line 929 of file PxeBcSupport.c.

◆ PxeBcCheckByDestPort()

BOOLEAN PxeBcCheckByDestPort ( IN EFI_PXE_BASE_CODE_MODE Mode,
IN VOID *  Session,
IN OUT UINT16 *  DestPort,
IN UINT16  OpFlags 
)

Check the received packet with the destination port.

Parameters
[in]ModePointer to mode data of PxeBc.
[in]SessionPointer to the current UDPv4 session.
[in,out]DestPortPointer to the destination port.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUESuccessfully passed the IPv4 filter.
FALSEFailed to pass the IPv4 filter.

Check the received packet using the destination port.

Parameters
[in]ModeThe pointer to the mode data of PxeBc.
[in]SessionThe pointer to the current UDPv4 session.
[in,out]DestPortThe pointer to the destination port.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUEPassed the IPv4 filter successfully.
FALSEFailed to pass the IPv4 filter.

Definition at line 991 of file PxeBcSupport.c.

◆ PxeBcCheckByIpFilter()

BOOLEAN PxeBcCheckByIpFilter ( IN EFI_PXE_BASE_CODE_MODE Mode,
IN VOID *  Session,
IN UINT16  OpFlags 
)

Check the received packet with the Ip filter.

Parameters
[in]ModePointer to mode data of PxeBc.
[in]SessionPointer to the current UDPv4 session.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUESuccessfully passed the Ip filter.
FALSEFailed to pass the Ip filter.

Check the received packet using the Ip filter.

Parameters
[in]ModeThe pointer to the mode data of PxeBc.
[in]SessionThe pointer to the current UDPv4 session.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUEPassed the Ip filter successfully.
FALSEFailed to pass the Ip filter.

Definition at line 840 of file PxeBcSupport.c.

◆ PxeBcCommonNotify()

VOID EFIAPI PxeBcCommonNotify ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Notify callback function when an event is triggered.

Parameters
[in]EventThe triggered event.
[in]ContextThe opaque parameter to the function.

Notify the callback function when an event is triggered.

Parameters
[in]EventThe triggered event.
[in]ContextThe opaque parameter to the function.

Definition at line 123 of file PxeBcSupport.c.

◆ PxeBcConfigUdp4Write()

EFI_STATUS PxeBcConfigUdp4Write ( IN EFI_UDP4_PROTOCOL Udp4,
IN EFI_IPv4_ADDRESS StationIp,
IN EFI_IPv4_ADDRESS SubnetMask,
IN EFI_IPv4_ADDRESS Gateway,
IN OUT UINT16 *  SrcPort,
IN BOOLEAN  DoNotFragment,
IN UINT8  Ttl,
IN UINT8  ToS 
)

This function is to configure a UDPv4 instance for UdpWrite.

Parameters
[in]Udp4The pointer to EFI_UDP4_PROTOCOL.
[in]StationIpThe pointer to the station address.
[in]SubnetMaskThe pointer to the subnet mask.
[in]GatewayThe pointer to the gateway address.
[in,out]SrcPortThe pointer to the source port.
[in]DoNotFragmentIf TRUE, fragment is not enabled. Otherwise, fragment is enabled.
[in]TtlThe time to live field of the IP header.
[in]ToSThe type of service field of the IP header.
Return values
EFI_SUCCESSSuccessfully configured this instance.
OthersFailed to configure this instance.

Definition at line 519 of file PxeBcSupport.c.

◆ PxeBcConfigUdp6Write()

EFI_STATUS PxeBcConfigUdp6Write ( IN EFI_UDP6_PROTOCOL Udp6,
IN EFI_IPv6_ADDRESS StationIp,
IN OUT UINT16 *  SrcPort 
)

This function is to configure a UDPv6 instance for UdpWrite.

Parameters
[in]Udp6Pointer to EFI_UDP6_PROTOCOL.
[in]StationIpPointer to the station address.
[in,out]SrcPortPointer to the source port.
Return values
EFI_SUCCESSSuccessfully configured this instance.
OthersFailed to configure this instance.

This function is to configure a UDPv6 instance for UdpWrite.

Parameters
[in]Udp6The pointer to EFI_UDP6_PROTOCOL.
[in]StationIpThe pointer to the station address.
[in,out]SrcPortThe pointer to the source port.
Return values
EFI_SUCCESSSuccessfully configured this instance.
OthersFailed to configure this instance.

Definition at line 583 of file PxeBcSupport.c.

◆ PxeBcFilterBySrcIp()

BOOLEAN PxeBcFilterBySrcIp ( IN EFI_PXE_BASE_CODE_MODE Mode,
IN VOID *  Session,
IN OUT EFI_IP_ADDRESS SrcIp,
IN UINT16  OpFlags 
)

Filter the received packet with the source Ip.

Parameters
[in]ModePointer to mode data of PxeBc.
[in]SessionPointer to the current UDPv4 session.
[in,out]SrcIpPointer to the source Ip address.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUESuccessfully passed the IPv4 filter.
FALSEFailed to pass the IPv4 filter.

Filter the received packet using the source Ip.

Parameters
[in]ModeThe pointer to the mode data of PxeBc.
[in]SessionThe pointer to the current UDPv4 session.
[in,out]SrcIpThe pointer to the source Ip address.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUEPassed the IPv4 filter successfully.
FALSEFailed to pass the IPv4 filter.

Definition at line 1038 of file PxeBcSupport.c.

◆ PxeBcFilterBySrcPort()

BOOLEAN PxeBcFilterBySrcPort ( IN EFI_PXE_BASE_CODE_MODE Mode,
IN VOID *  Session,
IN OUT UINT16 *  SrcPort,
IN UINT16  OpFlags 
)

Filter the received packet with the source port.

Parameters
[in]ModePointer to mode data of PxeBc.
[in]SessionPointer to the current UDPv4 session.
[in,out]SrcPortPointer to the source port.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUESuccessfully passed the IPv4 filter.
FALSEFailed to pass the IPv4 filter.

Filter the received packet using the source port.

Parameters
[in]ModeThe pointer to the mode data of PxeBc.
[in]SessionThe pointer to the current UDPv4 session.
[in,out]SrcPortThe pointer to the source port.
[in]OpFlagsOperation flag for UdpRead/UdpWrite.
Return values
TRUEPassed the IPv4 filter successfully.
FALSEFailed to pass the IPv4 filter.

Definition at line 1093 of file PxeBcSupport.c.

◆ PxeBcFlushStationIp()

EFI_STATUS PxeBcFlushStationIp ( PXEBC_PRIVATE_DATA Private,
EFI_IP_ADDRESS *StationIp  OPTIONAL,
EFI_IP_ADDRESS *SubnetMask  OPTIONAL 
)

Flush the previous configuration using the new station Ip address.

Parameters
[in]PrivatePointer to PxeBc private data.
[in]StationIpPointer to the station Ip address.
[in]SubnetMaskPointer to the subnet mask address for v4.
Return values
EFI_SUCCESSSuccessfully flushed the previous config.
OthersFailed to flush using the new station Ip.

Flush the previous configuration using the new station Ip address.

Parameters
[in]PrivateThe pointer to the PxeBc private data.
[in]StationIpThe pointer to the station Ip address.
[in]SubnetMaskThe pointer to the subnet mask address for v4.
Return values
EFI_SUCCESSSuccessfully flushed the previous configuration.
OthersFailed to flush using the new station Ip.

Definition at line 24 of file PxeBcSupport.c.

◆ PxeBcGetNicByIp4Children()

EFI_HANDLE PxeBcGetNicByIp4Children ( IN EFI_HANDLE  ControllerHandle)

Get the Nic handle using any child handle in the IPv4 stack.

Parameters
[in]ControllerHandlePointer to child handle over IPv4.
Returns
NicHandle The pointer to the Nic handle.

Definition at line 41 of file PxeBcDriver.c.

◆ PxeBcGetNicByIp6Children()

EFI_HANDLE PxeBcGetNicByIp6Children ( IN EFI_HANDLE  ControllerHandle)

Get the Nic handle using any child handle in the IPv6 stack.

Parameters
[in]ControllerHandlePointer to child handle over IPv6.
Returns
NicHandle The pointer to the Nic handle.

Definition at line 76 of file PxeBcDriver.c.

◆ PxeBcIcmp6ErrorUpdate()

VOID EFIAPI PxeBcIcmp6ErrorUpdate ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

xxx

Parameters
EventThe event signaled.
ContextThe context passed in by the event notifier.

Callback function to update the latest ICMP6 error message.

Parameters
EventThe event signalled.
ContextThe context passed in using the event notifier.

Definition at line 493 of file PxeBcSupport.c.

◆ PxeBcIcmpErrorUpdate()

VOID EFIAPI PxeBcIcmpErrorUpdate ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

xxx

Parameters
EventThe event signaled.
ContextThe context passed in by the event notifier.

Callback function to update the latest ICMP6 error message.

Parameters
EventThe event signalled.
ContextThe context passed in using the event notifier.

Definition at line 361 of file PxeBcSupport.c.

◆ PxeBcShowIp4Addr()

VOID PxeBcShowIp4Addr ( IN EFI_IPv4_ADDRESS Ip)

This function is to display the IPv4 address.

Parameters
[in]IpPointer to the IPv4 address.

This function is to display the IPv4 address.

Parameters
[in]IpThe pointer to the IPv4 address.

Definition at line 1344 of file PxeBcSupport.c.

◆ PxeBcShowIp6Addr()

VOID PxeBcShowIp6Addr ( IN EFI_IPv6_ADDRESS Ip)

This function is to display the IPv6 address.

Parameters
[in]IpPointer to the IPv6 address.

This function is to display the IPv6 address.

Parameters
[in]IpThe pointer to the IPv6 address.

Definition at line 1365 of file PxeBcSupport.c.

◆ PxeBcUdp4Read()

EFI_STATUS PxeBcUdp4Read ( IN EFI_UDP4_PROTOCOL Udp4,
IN EFI_UDP4_COMPLETION_TOKEN Token,
IN EFI_PXE_BASE_CODE_MODE Mode,
IN EFI_EVENT  TimeoutEvent,
IN UINT16  OpFlags,
IN BOOLEAN *  IsDone,
OUT BOOLEAN *  IsMatched,
IN OUT EFI_IP_ADDRESS *DestIp  OPTIONAL,
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort  OPTIONAL,
IN OUT EFI_IP_ADDRESS *SrcIp  OPTIONAL,
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort  OPTIONAL 
)

This function is to receive packet with Udp4Read.

Parameters
[in]Udp4Pointer to EFI_UDP4_PROTOCOL.
[in]TokenPointer to EFI_UDP4_COMPLETION_TOKEN.
[in]ModePointer to EFI_PXE_BASE_CODE_MODE.
[in]TimeoutEventThe event for timeout.
[in]OpFlagsThe UDP operation flags.
[in]IsDonePointer to IsDone flag.
[out]IsMatchedPointer to IsMatched flag.
[in,out]DestIpPointer to destination address.
[in,out]DestPortPointer to destination port.
[in,out]SrcIpPointer to source address.
[in,out]SrcPortPointer to source port.
Return values
EFI_SUCCESSSuccessfully read data with Udp4.
OthersFailed to send out data.

This function is to receive packet using Udp4Read.

Parameters
[in]Udp4The pointer to EFI_UDP4_PROTOCOL.
[in]TokenThe pointer to EFI_UDP4_COMPLETION_TOKEN.
[in]ModeThe pointer to EFI_PXE_BASE_CODE_MODE.
[in]TimeoutEventThe event for timeout.
[in]OpFlagsThe UDP operation flags.
[in]IsDoneThe pointer to the IsDone flag.
[out]IsMatchedThe pointer to the IsMatched flag.
[in,out]DestIpThe pointer to the destination address.
[in,out]DestPortThe pointer to the destination port.
[in,out]SrcIpThe pointer to the source address.
[in,out]SrcPortThe pointer to the source port.
Return values
EFI_SUCCESSSuccessfully read the data using Udp4.
OthersFailed to send out data.

Definition at line 1147 of file PxeBcSupport.c.

◆ PxeBcUdp4Write()

EFI_STATUS PxeBcUdp4Write ( IN EFI_UDP4_PROTOCOL Udp4,
IN EFI_UDP4_SESSION_DATA Session,
IN EFI_EVENT  TimeoutEvent,
IN EFI_IPv4_ADDRESS *Gateway  OPTIONAL,
IN UINTN *HeaderSize  OPTIONAL,
IN VOID *HeaderPtr  OPTIONAL,
IN UINTN BufferSize,
IN VOID *  BufferPtr 
)

This function is to configure a UDPv4 instance for UdpWrite.

Parameters
[in]Udp4Pointer to EFI_UDP4_PROTOCOL.
[in]SessionPointer to the UDP4 session data.
[in]TimeoutEventThe event for timeout.
[in]GatewayPointer to the gateway address.
[in]HeaderSizeAn optional field which may be set to the length of a header at HeaderPtr to be prefixed to the data at BufferPtr.
[in]HeaderPtrIf HeaderSize is not NULL, a pointer to a header to be prefixed to the data at BufferPtr.
[in]BufferSizeA pointer to the size of the data at BufferPtr.
[in]BufferPtrA pointer to the data to be written.
Return values
EFI_SUCCESSSuccessfully sent out data with Udp4Write.
OthersFailed to send out data.

This function is to configure a UDPv4 instance for UdpWrite.

Parameters
[in]Udp4The pointer to EFI_UDP4_PROTOCOL.
[in]SessionThe pointer to the UDP4 session data.
[in]TimeoutEventThe event for timeout.
[in]GatewayThe pointer to the gateway address.
[in]HeaderSizeAn optional field which may be set to the length of a header at HeaderPtr to be prefixed to the data at BufferPtr.
[in]HeaderPtrIf HeaderSize is not NULL, a pointer to a header to be prefixed to the data at BufferPtr.
[in]BufferSizeA pointer to the size of the data at BufferPtr.
[in]BufferPtrA pointer to the data to be written.
Return values
EFI_SUCCESSSuccessfully send out data using Udp4Write.
OthersFailed to send out data.

Definition at line 639 of file PxeBcSupport.c.

◆ PxeBcUdp6Read()

EFI_STATUS PxeBcUdp6Read ( IN EFI_UDP6_PROTOCOL Udp6,
IN EFI_UDP6_COMPLETION_TOKEN Token,
IN EFI_PXE_BASE_CODE_MODE Mode,
IN EFI_EVENT  TimeoutEvent,
IN UINT16  OpFlags,
IN BOOLEAN *  IsDone,
OUT BOOLEAN *  IsMatched,
IN OUT EFI_IP_ADDRESS *DestIp  OPTIONAL,
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *DestPort  OPTIONAL,
IN OUT EFI_IP_ADDRESS *SrcIp  OPTIONAL,
IN OUT EFI_PXE_BASE_CODE_UDP_PORT *SrcPort  OPTIONAL 
)

This function is to receive packet with Udp6Read.

Parameters
[in]Udp6Pointer to EFI_UDP6_PROTOCOL.
[in]TokenPointer to EFI_UDP6_COMPLETION_TOKEN.
[in]ModePointer to EFI_PXE_BASE_CODE_MODE.
[in]TimeoutEventThe event for timeout.
[in]OpFlagsThe UDP operation flags.
[in]IsDonePointer to IsDone flag.
[out]IsMatchedPointer to IsMatched flag.
[in,out]DestIpPointer to destination address.
[in,out]DestPortPointer to destination port.
[in,out]SrcIpPointer to source address.
[in,out]SrcPortPointer to source port.
Return values
EFI_SUCCESSSuccessfully read data with Udp6.
OthersFailed to send out data.

This function is to receive packets using Udp6Read.

Parameters
[in]Udp6The pointer to EFI_UDP6_PROTOCOL.
[in]TokenThe pointer to EFI_UDP6_COMPLETION_TOKEN.
[in]ModeThe pointer to EFI_PXE_BASE_CODE_MODE.
[in]TimeoutEventThe event for timeout.
[in]OpFlagsThe UDP operation flags.
[in]IsDoneThe pointer to the IsDone flag.
[out]IsMatchedThe pointer to the IsMatched flag.
[in,out]DestIpThe pointer to the destination address.
[in,out]DestPortThe pointer to the destination port.
[in,out]SrcIpThe pointer to the source address.
[in,out]SrcPortThe pointer to the source port.
Return values
EFI_SUCCESSSuccessfully read data using Udp6.
OthersFailed to send out data.

Definition at line 1252 of file PxeBcSupport.c.

◆ PxeBcUdp6Write()

EFI_STATUS PxeBcUdp6Write ( IN EFI_UDP6_PROTOCOL Udp6,
IN EFI_UDP6_SESSION_DATA Session,
IN EFI_EVENT  TimeoutEvent,
IN UINTN *HeaderSize  OPTIONAL,
IN VOID *HeaderPtr  OPTIONAL,
IN UINTN BufferSize,
IN VOID *  BufferPtr 
)

This function is to configure a UDPv6 instance for UdpWrite.

Parameters
[in]Udp6Pointer to EFI_UDP6_PROTOCOL.
[in]SessionPointer to the UDP6 session data.
[in]TimeoutEventThe event for timeout.
[in]HeaderSizeAn optional field which may be set to the length of a header at HeaderPtr to be prefixed to the data at BufferPtr.
[in]HeaderPtrIf HeaderSize is not NULL, a pointer to a header to be prefixed to the data at BufferPtr.
[in]BufferSizeA pointer to the size of the data at BufferPtr.
[in]BufferPtrA pointer to the data to be written.
Return values
EFI_SUCCESSSuccessfully to send out data with Udp6Write.
OthersFailed to send out data.

This function is to configure a UDPv4 instance for UdpWrite.

Parameters
[in]Udp6The pointer to EFI_UDP6_PROTOCOL.
[in]SessionThe pointer to the UDP6 session data.
[in]TimeoutEventThe event for timeout.
[in]HeaderSizeAn optional field which may be set to the length of a header at HeaderPtr to be prefixed to the data at BufferPtr.
[in]HeaderPtrIf HeaderSize is not NULL, a pointer to a header to be prefixed to the data at BufferPtr.
[in]BufferSizeA pointer to the size of the data at BufferPtr.
[in]BufferPtrA pointer to the data to be written.
Return values
EFI_SUCCESSSuccessfully sent out data using Udp6Write.
OthersFailed to send out data.

Definition at line 745 of file PxeBcSupport.c.

◆ PxeBcUintnToAscDec()

UINTN PxeBcUintnToAscDec ( IN UINTN  Number,
IN UINT8 *  Buffer,
IN UINTN  BufferSize 
)

This function is to convert a UINTN to a ASCII string, and return the actual length of the buffer.

Parameters
[in]NumberNumeric value to be converted.
[in]BufferPointer to the buffer for ASCII string.
[in]BufferSizeThe maxsize of the buffer.
Returns
Length The actual length of the ASCII string.

This function is to convert a UINTN to a ASCII string, and return the actual length of the buffer.

Parameters
[in]NumberNumeric value to be converted.
[in]BufferThe pointer to the buffer for ASCII string.
[in]BufferSizeThe maxsize of the buffer.
Returns
Length The actual length of the ASCII string.

Definition at line 1428 of file PxeBcSupport.c.

◆ PxeBcUintnToAscDecWithFormat()

VOID PxeBcUintnToAscDecWithFormat ( IN UINTN  Number,
IN UINT8 *  Buffer,
IN INTN  Length 
)

This function is to convert UINTN to ASCII string with required format.

Parameters
[in]NumberNumeric value to be converted.
[in]BufferPointer to the buffer for ASCII string.
[in]LengthLength of the required format.

This function is to convert UINTN to ASCII string with the required formatting.

Parameters
[in]NumberNumeric value to be converted.
[in]BufferThe pointer to the buffer for ASCII string.
[in]LengthThe length of the required format.

Definition at line 1401 of file PxeBcSupport.c.

◆ PxeBcUniHexToUint8()

EFI_STATUS PxeBcUniHexToUint8 ( OUT UINT8 *  Digit,
IN CHAR16  Char 
)

This function is to convert unicode hex number to a UINT8.

Parameters
[out]DigitThe converted UINT8 for output.
[in]CharThe unicode hex number to be converted.
Return values
EFI_SUCCESSSuccessfully converted the unicode hex.
EFI_INVALID_PARAMETERFailed to convert the unicode hex.

Definition at line 1465 of file PxeBcSupport.c.