X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FArp.h;fp=MdePkg%2FInclude%2FProtocol%2FArp.h;h=1dc8a47fee2cd1808da864b1594c786cd3bde4ab;hp=8bb6bc7bd2927f5f42aae193a3bfed573dc88005;hb=9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107;hpb=d1102dba7210b95e41d06c2338a22ba6af248645 diff --git a/MdePkg/Include/Protocol/Arp.h b/MdePkg/Include/Protocol/Arp.h index 8bb6bc7bd2..1dc8a47fee 100644 --- a/MdePkg/Include/Protocol/Arp.h +++ b/MdePkg/Include/Protocol/Arp.h @@ -1,22 +1,22 @@ -/** @file +/** @file EFI ARP Protocol Definition - + The EFI ARP Service Binding Protocol is used to locate EFI ARP Protocol drivers to create and destroy child of the driver to communicate with other host using ARP protocol. The EFI ARP Protocol provides services to map IP network address to hardware address used by a data link protocol. - -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +http://opensource.org/licenses/bsd-license.php. - @par Revision Reference: +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + @par Revision Reference: This Protocol was introduced in UEFI Specification 2.0. **/ @@ -119,13 +119,13 @@ typedef struct { /** 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 + + 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 + + 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. @param This The pointer to the EFI_ARP_PROTOCOL instance. @@ -134,8 +134,8 @@ typedef struct { @retval EFI_SUCCESS The new station address was successfully registered. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - * This is NULL. - * SwAddressLength is zero when ConfigData is not NULL. + * This is NULL. + * SwAddressLength is zero when ConfigData is not NULL. * StationAddress is NULL when ConfigData is not NULL. @retval EFI_ACCESS_DENIED The SwAddressType, SwAddressLength, or StationAddress is different from the one that is @@ -144,27 +144,27 @@ typedef struct { allocated. **/ -typedef +typedef EFI_STATUS (EFIAPI *EFI_ARP_CONFIGURE)( IN EFI_ARP_PROTOCOL *This, IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL - ); + ); /** 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 + 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 terms 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 + 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 terms 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. - + @param This Pointer to the EFI_ARP_PROTOCOL instance. @param DenyFlag Set to TRUE if this entry is a deny entry. Set to FALSE if this entry is a normal entry. @@ -184,10 +184,10 @@ EFI_STATUS @retval EFI_SUCCESS The entry has been added or updated. @retval EFI_INVALID_PARAMETER One 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. + * This is NULL. + * DenyFlag is FALSE and TargetHwAddress is NULL. + * DenyFlag is FALSE and TargetSwAddress is NULL. + * TargetHwAddress is NULL and TargetSwAddress is NULL. * Neither TargetSwAddress nor TargetHwAddress are NULL when DenyFlag is TRUE. @retval EFI_OUT_OF_RESOURCES The new ARP cache entry could not be allocated. @@ -205,24 +205,24 @@ EFI_STATUS IN VOID *TargetHwAddress OPTIONAL, IN UINT32 TimeoutValue, IN BOOLEAN Overwrite - ); + ); /** 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 + + 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 + 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. - + @param This The pointer to the EFI_ARP_PROTOCOL instance. @param BySwAddress Set to TRUE to look for matching software protocol addresses. Set to FALSE to look for matching hardware protocol addresses. - @param AddressBuffer The pointer to the address buffer. Set to NULL + @param AddressBuffer The pointer to the address buffer. Set to NULL to match all addresses. @param EntryLength The size of an entry in the entries buffer. @param EntryCount The number of ARP cache entries that are found by @@ -241,7 +241,7 @@ EFI_STATUS @retval EFI_NOT_STARTED The ARP driver instance has not been configured. **/ -typedef +typedef EFI_STATUS (EFIAPI *EFI_ARP_FIND)( IN EFI_ARP_PROTOCOL *This, @@ -251,7 +251,7 @@ EFI_STATUS OUT UINT32 *EntryCount OPTIONAL, OUT EFI_ARP_FIND_DATA **Entries OPTIONAL, IN BOOLEAN Refresh - ); + ); /** @@ -277,7 +277,7 @@ EFI_STATUS IN EFI_ARP_PROTOCOL *This, IN BOOLEAN BySwAddress, IN VOID *AddressBuffer OPTIONAL - ); + ); /** This function delete all dynamic entries from the ARP cache that match the specified @@ -295,7 +295,7 @@ typedef EFI_STATUS (EFIAPI *EFI_ARP_FLUSH)( IN EFI_ARP_PROTOCOL *This - ); + ); /** This function tries to resolve the TargetSwAddress and optionally returns a @@ -322,22 +322,22 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_ARP_REQUEST)( - IN EFI_ARP_PROTOCOL *This, + IN EFI_ARP_PROTOCOL *This, IN VOID *TargetSwAddress OPTIONAL, IN EFI_EVENT ResolvedEvent OPTIONAL, - OUT VOID *TargetHwAddress - ); + OUT VOID *TargetHwAddress + ); /** 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 TargeSwAddress and ResolveEvent are both - NULL, all the pending asynchronous requests that have been issued by This + + 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 TargeSwAddress and ResolveEvent 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. - + @param This The pointer to the EFI_ARP_PROTOCOL instance. @param TargetSwAddress The pointer to the protocol address in previous request session. @@ -359,13 +359,13 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_ARP_CANCEL)( - IN EFI_ARP_PROTOCOL *This, + IN EFI_ARP_PROTOCOL *This, IN VOID *TargetSwAddress OPTIONAL, IN EFI_EVENT ResolvedEvent OPTIONAL - ); + ); /// -/// ARP is used to resolve local network protocol addresses into +/// ARP is used to resolve local network protocol addresses into /// network hardware addresses. /// struct _EFI_ARP_PROTOCOL {