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

Go to the source code of this file.

Data Structures

struct  ARP_HEAD
 
struct  ARP_ADDRESS
 
struct  ARP_INSTANCE_DATA
 
struct  _ARP_SERVICE_DATA
 
struct  USER_REQUEST_CONTEXT
 
union  NET_ARP_ADDRESS_UNION
 
struct  NET_ARP_ADDRESS
 
struct  ARP_CACHE_ENTRY
 

Macros

#define ARP_ETHER_PROTO_TYPE   0x0806
 
#define IPV4_ETHER_PROTO_TYPE   0x0800
 
#define IPV6_ETHER_PROTO_TYPE   0x86DD
 
#define ARP_OPCODE_REQUEST   0x0001
 
#define ARP_OPCODE_REPLY   0x0002
 
#define ARP_DEFAULT_TIMEOUT_VALUE   (400 * TICKS_PER_SECOND)
 
#define ARP_DEFAULT_RETRY_COUNT   2
 
#define ARP_DEFAULT_RETRY_INTERVAL   (5 * TICKS_PER_MS)
 
#define ARP_PERIODIC_TIMER_INTERVAL   (500 * TICKS_PER_MS)
 
#define MATCH_SW_ADDRESS   0x1
 
#define MATCH_HW_ADDRESS   0x2
 
#define ARP_INSTANCE_DATA_SIGNATURE   SIGNATURE_32('A', 'R', 'P', 'I')
 
#define ARP_INSTANCE_DATA_FROM_THIS(a)
 
#define ARP_SERVICE_DATA_SIGNATURE   SIGNATURE_32('A', 'R', 'P', 'S')
 
#define ARP_SERVICE_DATA_FROM_THIS(a)
 
#define ARP_MAX_PROTOCOL_ADDRESS_LEN   sizeof(EFI_IP_ADDRESS)
 
#define ARP_MAX_HARDWARE_ADDRESS_LEN   sizeof(EFI_MAC_ADDRESS)
 

Typedefs

typedef struct _ARP_SERVICE_DATA ARP_SERVICE_DATA
 

Enumerations

enum  FIND_OPTYPE { ByNone = 0 , ByProtoAddress = MATCH_SW_ADDRESS , ByHwAddress = MATCH_HW_ADDRESS , ByBoth = MATCH_SW_ADDRESS | MATCH_HW_ADDRESS }
 
enum  ARP_ADDRESS_TYPE { Hardware , Protocol }
 

Functions

EFI_STATUS EFIAPI ArpConfigure (IN EFI_ARP_PROTOCOL *This, IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL)
 
EFI_STATUS EFIAPI ArpAdd (IN EFI_ARP_PROTOCOL *This, IN BOOLEAN DenyFlag, IN VOID *TargetSwAddress OPTIONAL, IN VOID *TargetHwAddress OPTIONAL, IN UINT32 TimeoutValue, IN BOOLEAN Overwrite)
 
EFI_STATUS EFIAPI ArpFind (IN EFI_ARP_PROTOCOL *This, IN BOOLEAN BySwAddress, IN VOID *AddressBuffer OPTIONAL, OUT UINT32 *EntryLength OPTIONAL, OUT UINT32 *EntryCount OPTIONAL, OUT EFI_ARP_FIND_DATA **Entries OPTIONAL, IN BOOLEAN Refresh)
 
EFI_STATUS EFIAPI ArpDelete (IN EFI_ARP_PROTOCOL *This, IN BOOLEAN BySwAddress, IN VOID *AddressBuffer OPTIONAL)
 
EFI_STATUS EFIAPI ArpFlush (IN EFI_ARP_PROTOCOL *This)
 
EFI_STATUS EFIAPI ArpRequest (IN EFI_ARP_PROTOCOL *This, IN VOID *TargetSwAddress OPTIONAL, IN EFI_EVENT ResolvedEvent OPTIONAL, OUT VOID *TargetHwAddress)
 
EFI_STATUS EFIAPI ArpCancel (IN EFI_ARP_PROTOCOL *This, IN VOID *TargetSwAddress OPTIONAL, IN EFI_EVENT ResolvedEvent OPTIONAL)
 
EFI_STATUS ArpConfigureInstance (IN ARP_INSTANCE_DATA *Instance, IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL)
 
ARP_CACHE_ENTRYArpFindDeniedCacheEntry (IN ARP_SERVICE_DATA *ArpService, IN NET_ARP_ADDRESS *ProtocolAddress OPTIONAL, IN NET_ARP_ADDRESS *HardwareAddress OPTIONAL)
 
ARP_CACHE_ENTRYArpFindNextCacheEntryInTable (IN LIST_ENTRY *CacheTable, IN LIST_ENTRY *StartEntry, IN FIND_OPTYPE FindOpType, IN NET_ARP_ADDRESS *ProtocolAddress OPTIONAL, IN NET_ARP_ADDRESS *HardwareAddress OPTIONAL)
 
ARP_CACHE_ENTRYArpAllocCacheEntry (IN ARP_INSTANCE_DATA *Instance)
 
VOID ArpFillAddressInCacheEntry (IN ARP_CACHE_ENTRY *CacheEntry, IN NET_ARP_ADDRESS *HwAddr OPTIONAL, IN NET_ARP_ADDRESS *SwAddr OPTIONAL)
 
UINTN ArpAddressResolved (IN ARP_CACHE_ENTRY *CacheEntry, IN ARP_INSTANCE_DATA *Instance OPTIONAL, IN EFI_EVENT UserEvent OPTIONAL)
 
UINTN ArpDeleteCacheEntry (IN ARP_INSTANCE_DATA *Instance, IN BOOLEAN BySwAddress, IN UINT8 *AddressBuffer OPTIONAL, IN BOOLEAN Force)
 
VOID ArpSendFrame (IN ARP_INSTANCE_DATA *Instance, IN ARP_CACHE_ENTRY *CacheEntry, IN UINT16 ArpOpCode)
 
VOID ArpInitInstance (IN ARP_SERVICE_DATA *ArpService, OUT ARP_INSTANCE_DATA *Instance)
 
VOID EFIAPI ArpOnFrameRcvdDpc (IN VOID *Context)
 
VOID EFIAPI ArpOnFrameRcvd (IN EFI_EVENT Event, IN VOID *Context)
 
VOID EFIAPI ArpOnFrameSentDpc (IN VOID *Context)
 
VOID EFIAPI ArpOnFrameSent (IN EFI_EVENT Event, IN VOID *Context)
 
VOID EFIAPI ArpTimerHandler (IN EFI_EVENT Event, IN VOID *Context)
 
UINTN ArpCancelRequest (IN ARP_INSTANCE_DATA *Instance, IN VOID *TargetSwAddress OPTIONAL, IN EFI_EVENT UserEvent OPTIONAL)
 
EFI_STATUS ArpFindCacheEntry (IN ARP_INSTANCE_DATA *Instance, IN BOOLEAN BySwAddress, IN VOID *AddressBuffer OPTIONAL, OUT UINT32 *EntryLength OPTIONAL, OUT UINT32 *EntryCount OPTIONAL, OUT EFI_ARP_FIND_DATA **Entries OPTIONAL, IN BOOLEAN Refresh)
 

Detailed Description

EFI Address Resolution Protocol (ARP) Protocol interface header file.

Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file ArpImpl.h.

Macro Definition Documentation

◆ ARP_DEFAULT_RETRY_COUNT

#define ARP_DEFAULT_RETRY_COUNT   2

Definition at line 45 of file ArpImpl.h.

◆ ARP_DEFAULT_RETRY_INTERVAL

#define ARP_DEFAULT_RETRY_INTERVAL   (5 * TICKS_PER_MS)

Definition at line 46 of file ArpImpl.h.

◆ ARP_DEFAULT_TIMEOUT_VALUE

#define ARP_DEFAULT_TIMEOUT_VALUE   (400 * TICKS_PER_SECOND)

Definition at line 44 of file ArpImpl.h.

◆ ARP_ETHER_PROTO_TYPE

#define ARP_ETHER_PROTO_TYPE   0x0806

Definition at line 31 of file ArpImpl.h.

◆ ARP_INSTANCE_DATA_FROM_THIS

#define ARP_INSTANCE_DATA_FROM_THIS (   a)
Value:
CR ( \
(a), \
ArpProto, \
ARP_INSTANCE_DATA_SIGNATURE \
)
#define CR(Record, TYPE, Field, TestSignature)
Definition: DebugLib.h:659

Returns a pointer to the ARP_INSTANCE_DATA structure from the input a.

If the signatures matches, then a pointer to the data structure that contains a specified field of that data structure is returned.

Parameters
aPointer to the field specified by ArpProto within a data structure of type ARP_INSTANCE_DATA.

Definition at line 98 of file ArpImpl.h.

◆ ARP_INSTANCE_DATA_SIGNATURE

#define ARP_INSTANCE_DATA_SIGNATURE   SIGNATURE_32('A', 'R', 'P', 'I')

Definition at line 86 of file ArpImpl.h.

◆ ARP_MAX_HARDWARE_ADDRESS_LEN

#define ARP_MAX_HARDWARE_ADDRESS_LEN   sizeof(EFI_MAC_ADDRESS)

Definition at line 180 of file ArpImpl.h.

◆ ARP_MAX_PROTOCOL_ADDRESS_LEN

#define ARP_MAX_PROTOCOL_ADDRESS_LEN   sizeof(EFI_IP_ADDRESS)

Definition at line 179 of file ArpImpl.h.

◆ ARP_OPCODE_REPLY

#define ARP_OPCODE_REPLY   0x0002

Definition at line 39 of file ArpImpl.h.

◆ ARP_OPCODE_REQUEST

#define ARP_OPCODE_REQUEST   0x0001

Definition at line 38 of file ArpImpl.h.

◆ ARP_PERIODIC_TIMER_INTERVAL

#define ARP_PERIODIC_TIMER_INTERVAL   (500 * TICKS_PER_MS)

Definition at line 47 of file ArpImpl.h.

◆ ARP_SERVICE_DATA_FROM_THIS

#define ARP_SERVICE_DATA_FROM_THIS (   a)
Value:
CR ( \
(a), \
ServiceBinding, \
ARP_SERVICE_DATA_SIGNATURE \
)

Returns a pointer to the ARP_SERVICE_DATA structure from the input a.

If the signatures matches, then a pointer to the data structure that contains a specified field of that data structure is returned.

Parameters
aPointer to the field specified by ServiceBinding within a data structure of type ARP_SERVICE_DATA.

Definition at line 134 of file ArpImpl.h.

◆ ARP_SERVICE_DATA_SIGNATURE

#define ARP_SERVICE_DATA_SIGNATURE   SIGNATURE_32('A', 'R', 'P', 'S')

Definition at line 122 of file ArpImpl.h.

◆ IPV4_ETHER_PROTO_TYPE

#define IPV4_ETHER_PROTO_TYPE   0x0800

Definition at line 32 of file ArpImpl.h.

◆ IPV6_ETHER_PROTO_TYPE

#define IPV6_ETHER_PROTO_TYPE   0x86DD

Definition at line 33 of file ArpImpl.h.

◆ MATCH_HW_ADDRESS

#define MATCH_HW_ADDRESS   0x2

Definition at line 73 of file ArpImpl.h.

◆ MATCH_SW_ADDRESS

#define MATCH_SW_ADDRESS   0x1

Definition at line 72 of file ArpImpl.h.

Typedef Documentation

◆ ARP_SERVICE_DATA

Definition at line 106 of file ArpImpl.h.

Enumeration Type Documentation

◆ ARP_ADDRESS_TYPE

enum ARP_ADDRESS_TYPE

Definition at line 200 of file ArpImpl.h.

◆ FIND_OPTYPE

enum FIND_OPTYPE

Definition at line 79 of file ArpImpl.h.

Function Documentation

◆ ArpAdd()

EFI_STATUS EFIAPI ArpAdd ( IN EFI_ARP_PROTOCOL This,
IN BOOLEAN  DenyFlag,
IN VOID *TargetSwAddress  OPTIONAL,
IN VOID *TargetHwAddress  OPTIONAL,
IN UINT32  TimeoutValue,
IN BOOLEAN  Overwrite 
)

This function is used to insert entries into the ARP cache.

ARP cache entries are typically inserted and updated by network protocol drivers as network traffic is processed. Most ARP cache entries will time out and be deleted if the network traffic stops. ARP cache entries that were inserted by the Add() function may be static (will not time out) or dynamic (will time out). Default ARP cache timeout values are not covered in most network protocol specifications (although RFC 1122 comes pretty close) and will only be discussed in general in this specification. The timeout values that are used in the EFI Sample Implementation should be used only as a guideline. Final product implementations of the EFI network stack should be tuned for their expected network environments.

Parameters
ThisPointer to the EFI_ARP_PROTOCOL instance.
DenyFlagSet to TRUE if this entry is a deny entry. Set to FALSE if this entry is a normal entry.
TargetSwAddressPointer to a protocol address to add (or deny). May be set to NULL if DenyFlag is TRUE.
TargetHwAddressPointer to a hardware address to add (or deny). May be set to NULL if DenyFlag is TRUE.
TimeoutValueTime in 100-ns units that this entry will remain in the ARP cache. A value of zero means that the entry is permanent. A nonzero value will override the one given by Configure() if the entry to be added is a dynamic entry.
OverwriteIf TRUE, the matching cache entry will be overwritten with the supplied parameters. If FALSE, EFI_ACCESS_DENIED is returned if the corresponding cache entry already exists.
Return values
EFI_SUCCESSThe entry has been added or updated.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. DenyFlag is FALSE and TargetHwAddress is NULL. DenyFlag is FALSE and TargetSwAddress is NULL. TargetHwAddress is NULL and TargetSwAddress is NULL. Both TargetSwAddress and TargetHwAddress are not NULL when DenyFlag is TRUE.
EFI_OUT_OF_RESOURCESThe new ARP cache entry could not be allocated.
EFI_ACCESS_DENIEDThe ARP cache entry already exists and Overwrite is not true.
EFI_NOT_STARTEDThe ARP driver instance has not been configured.

Definition at line 123 of file ArpMain.c.

◆ ArpAddressResolved()

UINTN ArpAddressResolved ( IN ARP_CACHE_ENTRY CacheEntry,
IN ARP_INSTANCE_DATA *Instance  OPTIONAL,
IN EFI_EVENT UserEvent  OPTIONAL 
)

Turn the CacheEntry into the resolved status.

Parameters
[in]CacheEntryPointer to the resolved cache entry.
[in]InstancePointer to the instance context data.
[in]UserEventPointer to the UserEvent to notify.
Returns
The count of notifications sent to the instance.

Definition at line 783 of file ArpImpl.c.

◆ ArpAllocCacheEntry()

ARP_CACHE_ENTRY * ArpAllocCacheEntry ( IN ARP_INSTANCE_DATA Instance)

Allocate a cache entry and initialize it.

Parameters
[in]InstancePointer to the instance context data.
Returns
Pointer to the new created cache entry.

Definition at line 715 of file ArpImpl.c.

◆ ArpCancel()

EFI_STATUS EFIAPI ArpCancel ( IN EFI_ARP_PROTOCOL This,
IN VOID *TargetSwAddress  OPTIONAL,
IN EFI_EVENT ResolvedEvent  OPTIONAL 
)

This function aborts the previous ARP request (identified by This, TargetSwAddress and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().

If the request is in the internal ARP request queue, the request is aborted immediately and its ResolvedEvent is signaled. Only an asynchronous address request needs to be canceled. If TargetSwAddress and ResolvedEvent are both NULL, all the pending asynchronous requests that have been issued by This instance will be cancelled and their corresponding events will be signaled.

Parameters
ThisPointer to the EFI_ARP_PROTOCOL instance.
TargetSwAddressPointer to the protocol address in previous request session.
ResolvedEventPointer to the event that is used as the notification event in previous request session.
Return values
EFI_SUCCESSThe pending request session(s) is/are aborted and corresponding event(s) is/are signaled.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. TargetSwAddress is not NULL and ResolvedEvent is NULL. TargetSwAddress is NULL and ResolvedEvent is not NULL.
EFI_NOT_STARTEDThe ARP driver instance has not been configured.
EFI_NOT_FOUNDThe request is not issued by EFI_ARP_PROTOCOL.Request().

Definition at line 698 of file ArpMain.c.

◆ ArpCancelRequest()

UINTN ArpCancelRequest ( IN ARP_INSTANCE_DATA Instance,
IN VOID *TargetSwAddress  OPTIONAL,
IN EFI_EVENT UserEvent  OPTIONAL 
)

Cancel the arp request.

Parameters
[in]InstancePointer to the instance context data.
[in]TargetSwAddressPointer to the buffer containing the target software address to match the arp request.
[in]UserEventThe user event used to notify this request cancellation.
Returns
The count of the cancelled requests.

Definition at line 1378 of file ArpImpl.c.

◆ ArpConfigure()

EFI_STATUS EFIAPI ArpConfigure ( IN EFI_ARP_PROTOCOL This,
IN EFI_ARP_CONFIG_DATA *ConfigData  OPTIONAL 
)

This function is used to assign a station address to the ARP cache for this instance of the ARP driver.

Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will respond to ARP requests that match this registered station address. A call to this function with the ConfigData field set to NULL will reset this ARP instance.

Once a protocol type and station address have been assigned to this ARP instance, all the following ARP functions will use this information. Attempting to change the protocol type or station address to a configured ARP instance will result in errors.

Parameters
ThisPointer to the EFI_ARP_PROTOCOL instance.
ConfigDataPointer to the EFI_ARP_CONFIG_DATA structure.
Return values
EFI_SUCCESSThe new station address was successfully registered.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. SwAddressLength is zero when ConfigData is not NULL. StationAddress is NULL when ConfigData is not NULL.
EFI_ACCESS_DENIEDThe SwAddressType, SwAddressLength, or StationAddress is different from the one that is already registered.
EFI_OUT_OF_RESOURCESStorage for the new StationAddress could not be allocated.

Definition at line 41 of file ArpMain.c.

◆ ArpConfigureInstance()

EFI_STATUS ArpConfigureInstance ( IN ARP_INSTANCE_DATA Instance,
IN EFI_ARP_CONFIG_DATA *ConfigData  OPTIONAL 
)

Configure the instance using the ConfigData. ConfigData is already validated.

Parameters
[in]InstancePointer to the instance context data to be configured.
[in]ConfigDataPointer to the configuration data used to configure the instance.
Return values
EFI_SUCCESSThe instance is configured with the ConfigData.
EFI_ACCESS_DENIEDThe instance is already configured and the ConfigData tries to reset some unchangeable fields.
EFI_INVALID_PARAMETERThe ConfigData provides a non-unicast IPv4 address when the SwAddressType is IPv4.
EFI_OUT_OF_RESOURCESThe instance fails to configure due to memory limitation.

Definition at line 906 of file ArpImpl.c.

◆ ArpDelete()

EFI_STATUS EFIAPI ArpDelete ( IN EFI_ARP_PROTOCOL This,
IN BOOLEAN  BySwAddress,
IN VOID *AddressBuffer  OPTIONAL 
)

This function removes specified ARP cache entries.

Parameters
ThisPointer to the EFI_ARP_PROTOCOL instance.
BySwAddressSet to TRUE to delete matching protocol addresses. Set to FALSE to delete matching hardware addresses.
AddressBufferPointer to the address buffer that is used as a key to look for the cache entry. Set to NULL to delete all entries.
Return values
EFI_SUCCESSThe entry was removed from the ARP cache.
EFI_INVALID_PARAMETERThis is NULL.
EFI_NOT_FOUNDThe specified deletion key was not found.
EFI_NOT_STARTEDThe ARP driver instance has not been configured.

Definition at line 376 of file ArpMain.c.

◆ ArpDeleteCacheEntry()

UINTN ArpDeleteCacheEntry ( IN ARP_INSTANCE_DATA Instance,
IN BOOLEAN  BySwAddress,
IN UINT8 *AddressBuffer  OPTIONAL,
IN BOOLEAN  Force 
)

Delete cache entries in all the cache tables.

Parameters
[in]InstancePointer to the instance context data.
[in]BySwAddressDelete the cache entry by software address or by hardware address.
[in]AddressBufferPointer to the buffer containing the address to match for the deletion.
[in]ForceThis deletion is forced or not.
Returns
The count of the deleted cache entries.

Definition at line 1326 of file ArpImpl.c.

◆ ArpFillAddressInCacheEntry()

VOID ArpFillAddressInCacheEntry ( IN ARP_CACHE_ENTRY CacheEntry,
IN NET_ARP_ADDRESS *HwAddr  OPTIONAL,
IN NET_ARP_ADDRESS *SwAddr  OPTIONAL 
)

Fill the addresses in the CacheEntry using the information passed in by HwAddr and SwAddr.

Parameters
[in]CacheEntryPointer to the cache entry.
[in]HwAddrPointer to the software address.
[in]SwAddrPointer to the hardware address.
Returns
None.

Definition at line 845 of file ArpImpl.c.

◆ ArpFind()

EFI_STATUS EFIAPI ArpFind ( IN EFI_ARP_PROTOCOL This,
IN BOOLEAN  BySwAddress,
IN VOID *AddressBuffer  OPTIONAL,
OUT UINT32 *EntryLength  OPTIONAL,
OUT UINT32 *EntryCount  OPTIONAL,
OUT EFI_ARP_FIND_DATA **Entries  OPTIONAL,
IN BOOLEAN  Refresh 
)

This function searches the ARP cache for matching entries and allocates a buffer into which those entries are copied.

The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which are protocol address pairs and hardware address pairs. When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer is not NULL), the ARP cache timeout for the found entry is reset if Refresh is set to TRUE. If the found ARP cache entry is a permanent entry, it is not affected by Refresh.

Parameters
ThisPointer to the EFI_ARP_PROTOCOL instance.
BySwAddressSet to TRUE to look for matching software protocol addresses. Set to FALSE to look for matching hardware protocol addresses.
AddressBufferPointer to address buffer. Set to NULL to match all addresses.
EntryLengthThe size of an entry in the entries buffer.
EntryCountThe number of ARP cache entries that are found by the specified criteria.
EntriesPointer to the buffer that will receive the ARP cache entries.
RefreshSet to TRUE to refresh the timeout value of the matching ARP cache entry.
Return values
EFI_SUCCESSThe requested ARP cache entries were copied into the buffer.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. Both EntryCount and EntryLength are NULL, when Refresh is FALSE.
EFI_NOT_FOUNDNo matching entries were found.
EFI_NOT_STARTEDThe ARP driver instance has not been configured.

Definition at line 310 of file ArpMain.c.

◆ ArpFindCacheEntry()

EFI_STATUS ArpFindCacheEntry ( IN ARP_INSTANCE_DATA Instance,
IN BOOLEAN  BySwAddress,
IN VOID *AddressBuffer  OPTIONAL,
OUT UINT32 *EntryLength  OPTIONAL,
OUT UINT32 *EntryCount  OPTIONAL,
OUT EFI_ARP_FIND_DATA **Entries  OPTIONAL,
IN BOOLEAN  Refresh 
)

Find the cache entry in the cache table.

Parameters
[in]InstancePointer to the instance context data.
[in]BySwAddressSet to TRUE to look for matching software protocol addresses. Set to FALSE to look for matching hardware protocol addresses.
[in]AddressBufferPointer to address buffer. Set to NULL to match all addresses.
[out]EntryLengthThe size of an entry in the entries buffer.
[out]EntryCountThe number of ARP cache entries that are found by the specified criteria.
[out]EntriesPointer to the buffer that will receive the ARP cache entries.
[in]RefreshSet to TRUE to refresh the timeout value of the matching ARP cache entry.
Return values
EFI_SUCCESSThe requested ARP cache entries are copied into the buffer.
EFI_NOT_FOUNDNo matching entries found.
EFI_OUT_OF_RESOURCEThere is a memory allocation failure.

Definition at line 1448 of file ArpImpl.c.

◆ ArpFindDeniedCacheEntry()

ARP_CACHE_ENTRY * ArpFindDeniedCacheEntry ( IN ARP_SERVICE_DATA ArpService,
IN NET_ARP_ADDRESS *ProtocolAddress  OPTIONAL,
IN NET_ARP_ADDRESS *HardwareAddress  OPTIONAL 
)

Find the CacheEntry, using ProtocolAddress or HardwareAddress or both, as the keyword, in the DeniedCacheTable.

Parameters
[in]ArpServicePointer to the arp service context data.
[in]ProtocolAddressPointer to the protocol address.
[in]HardwareAddressPointer to the hardware address.
Returns
Pointer to the matched cache entry, if NULL no match is found.

Definition at line 658 of file ArpImpl.c.

◆ ArpFindNextCacheEntryInTable()

ARP_CACHE_ENTRY * ArpFindNextCacheEntryInTable ( IN LIST_ENTRY CacheTable,
IN LIST_ENTRY StartEntry,
IN FIND_OPTYPE  FindOpType,
IN NET_ARP_ADDRESS *ProtocolAddress  OPTIONAL,
IN NET_ARP_ADDRESS *HardwareAddress  OPTIONAL 
)

Find the CacheEntry which matches the requirements in the specified CacheTable.

Parameters
[in]CacheTablePointer to the arp cache table.
[in]StartEntryPointer to the start entry this search begins with in the cache table.
[in]FindOpTypeThe search type.
[in]ProtocolAddressPointer to the protocol address to match.
[in]HardwareAddressPointer to the hardware address to match.
Returns
Pointer to the matched arp cache entry, if NULL, no match is found.

Definition at line 589 of file ArpImpl.c.

◆ ArpFlush()

EFI_STATUS EFIAPI ArpFlush ( IN EFI_ARP_PROTOCOL This)

This function delete all dynamic entries from the ARP cache that match the specified software protocol type.

Parameters
ThisPointer to the EFI_ARP_PROTOCOL instance.
Return values
EFI_SUCCESSThe cache has been flushed.
EFI_INVALID_PARAMETERThis is NULL.
EFI_NOT_FOUNDThere are no matching dynamic cache entries.
EFI_NOT_STARTEDThe ARP driver instance has not been configured.

Definition at line 422 of file ArpMain.c.

◆ ArpInitInstance()

VOID ArpInitInstance ( IN ARP_SERVICE_DATA ArpService,
OUT ARP_INSTANCE_DATA Instance 
)

Initialize the instance context data.

Parameters
[in]ArpServicePointer to the arp service context data this instance belongs to.
[out]InstancePointer to the instance context data.
Returns
None.

Definition at line 35 of file ArpImpl.c.

◆ ArpOnFrameRcvd()

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

Queue ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK.

Parameters
[in]EventThe Event this notify function registered to.
[in]ContextPointer to the context data registered to the Event.
Returns
None.

Definition at line 333 of file ArpImpl.c.

◆ ArpOnFrameRcvdDpc()

VOID EFIAPI ArpOnFrameRcvdDpc ( IN VOID *  Context)

Process the Arp packets received from Mnp, the procedure conforms to RFC826.

Parameters
[in]ContextPointer to the context data registered to the Event.
Returns
None.

Definition at line 64 of file ArpImpl.c.

◆ ArpOnFrameSent()

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

Request ArpOnFrameSentDpc as a DPC at TPL_CALLBACK.

Parameters
[in]EventThe Event this notify function registered to.
[in]ContextPointer to the context data registered to the Event.
Returns
None.

Definition at line 395 of file ArpImpl.c.

◆ ArpOnFrameSentDpc()

VOID EFIAPI ArpOnFrameSentDpc ( IN VOID *  Context)

Process the already sent arp packets.

Parameters
[in]ContextPointer to the context data registered to the Event.
Returns
None.

Definition at line 355 of file ArpImpl.c.

◆ ArpRequest()

EFI_STATUS EFIAPI ArpRequest ( IN EFI_ARP_PROTOCOL This,
IN VOID *TargetSwAddress  OPTIONAL,
IN EFI_EVENT ResolvedEvent  OPTIONAL,
OUT VOID *  TargetHwAddress 
)

This function tries to resolve the TargetSwAddress and optionally returns a TargetHwAddress if it already exists in the ARP cache.

Parameters
ThisPointer to the EFI_ARP_PROTOCOL instance.
TargetSwAddressPointer to the protocol address to resolve.
ResolvedEventPointer to the event that will be signaled when the address is resolved or some error occurs.
TargetHwAddressPointer to the buffer for the resolved hardware address in network byte order.
Return values
EFI_SUCCESSThe data is copied from the ARP cache into the TargetHwAddress buffer.
EFI_INVALID_PARAMETEROne or more of the following conditions is TRUE: This is NULL. TargetHwAddress is NULL.
EFI_ACCESS_DENIEDThe requested address is not present in the normal ARP cache but is present in the deny address list. Outgoing traffic to that address is forbidden.
EFI_NOT_STARTEDThe ARP driver instance has not been configured.
EFI_NOT_READYThe request has been started and is not finished.

Definition at line 476 of file ArpMain.c.

◆ ArpSendFrame()

VOID ArpSendFrame ( IN ARP_INSTANCE_DATA Instance,
IN ARP_CACHE_ENTRY CacheEntry,
IN UINT16  ArpOpCode 
)

Send out an arp frame using the CacheEntry and the ArpOpCode.

Parameters
[in]InstancePointer to the instance context data.
[in]CacheEntryPointer to the configuration data used to configure the instance.
[in]ArpOpCodeThe opcode used to send out this Arp frame, either request or reply.
Returns
None.

Definition at line 1027 of file ArpImpl.c.

◆ ArpTimerHandler()

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

Process the arp cache olding and drive the retrying arp requests.

Parameters
[in]EventThe Event this notify function registered to.
[in]ContextPointer to the context data registered to the Event.
Returns
None.

Definition at line 418 of file ArpImpl.c.