Extensible Firmware Interface Specification
266 12/12/00 Version 1.02
14.1.8 EFI_PXE_BASE_CODE.SetIpFilter()
Summary
Updates the IP receive filters of a network device and enables software filtering.
Prototype
EFI_STATUS
(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
IN EFI_PXE_BASE_CODE *This,
IN EFI_PXE_BASE_CODE_IP_FILTER *NewFilter
);
Parameters
This Pointer to the EFI_PXE_BASE_CODE instance.
NewFilter Pointer to the new set of IP receive filters.
Description
The NewFilter field is used to modify the network devices current IP receive filter settings and
to enable a software filter. This function updates the IpFilter field of the
EFI_PXE_BASE_CODE_MODE structure with the contents of NewIpFilter. The software
filter is used when the USE_FILTER in OpFlags is set to UdpRead(). The current hardware
filter remains in effect no matter what the settings of OpFlags are, so that the meaning of
ANY_DEST_IP set in OpFlags to UdpRead() is from those packets whose reception is
enabled in hardware physical NIC address (unicast), broadcast address, logical address or
addresses (multicast), or all (promiscuous). UdpRead() does not modify the IP filter settings.
Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP receive filter list
emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. If an
application or driver wishes to preserve the IP receive filter settings, it will have to preserve the IP
receive filter settings before these calls, and use SetIpFilter() to restore them after the calls.
If incompatible filtering is requested (for example, PROMISCUOUS with anything else) or if the
device does not support a requested filter setting and it cannot be accommodated in software (for
example, PROMISCUOUS not supported), EFI_INVALID_PARAMETER will be returned. The
IPlist field is used to enable IPs other than the StationIP. They may be multicast or
unicast. If IPcnt is set as well as EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP, then
both the StationIP and the IPs from the IPlist will be used.
Status Codes Returned
EFI_SUCCESS The IP receive filter settings were updated.
EFI_INVALID_PARAMETER One of the parameters is not valid.
EFI_NOT_STARTED The PXE Base Code Protocol is not in the started state.