beautypg.com

Description – Intel Extensible Firmware Interface User Manual

Page 663

background image

Protocols

— Network Support

Version 1.10

12/01/02

15-57

Description

This function reads a UDP packet from a network interface. The data contents are returned in (the
optional

HeaderPtr

and)

BufferPtr

, and the size of the buffer received is returned in

BufferSize

. If the input

BufferSize

is smaller than the UDP packet received (less optional

HeaderSize

), it will be set to the required size, and

EFI_BUFFER_TOO_SMALL

will be

returned. In this case, the contents of

BufferPtr

are undefined, and the packet is lost. If a UDP

packet is successfully received, then

EFI_SUCCESS

will be returned, and the information from the

UDP header will be returned in

DestIp

,

DestPort

,

SrcIp

, and

SrcPort

if they are not

NULL

. Depending on the values of

OpFlags

and the

DestIp

,

DestPort

,

SrcIp

, and

SrcPort

input values, different types of UDP packet receive filtering will be performed. The

following tables summarize these receive filter operations.

Table 15-2. Destination IP Filter Operation

OpFlags
USE_FILTER

OpFlags
ANY_DEST_IP


DestIp


Action

0 0

NULL

Receive a packet sent to

StationIp

.

0

1

NULL

Receive a packet sent to any IP address.

1

x

NULL

Receive a packet whose destination IP address passes
the IP filter.

0

0

not NULL

Receive a packet whose destination IP address matches

DestIp

.

0

1

not NULL

Receive a packet sent to any IP address and, return the
destination IP address in

DestIp

.

1

x

not NULL

Receive a packet whose destination IP address passes the
IP filter, and return the destination IP address in

DestIp

.

Table 15-3. Destination UDP Port Filter Operation

OpFlags
ANY_DEST_PORT


DestPort


Action

0 NULL

Return

EFI_INVALID_PARAMETER

.

1

NULL

Receive a packet sent to any UDP port.

0 not

NULL

Receive a packet whose destination Port matches

DestPort

.

1

not NULL

Receive a packet sent to any UDP port, and return the destination port in

DestPort

.