]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Arp.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Protocol / Arp.h
index 4e55277b9fbe457b3ed9532d503cf454d7b99cd3..168a2d192046d0875700b96624f97c92dc328d9e 100644 (file)
@@ -1,23 +1,17 @@
-/** @file  \r
+/** @file\r
   EFI ARP Protocol Definition\r
-  \r
+\r
   The EFI ARP Service Binding Protocol is used to locate EFI\r
   ARP Protocol drivers to create and destroy child of the\r
   driver to communicate with other host using ARP protocol.\r
   The EFI ARP Protocol provides services to map IP network\r
   address to hardware address used by a data link protocol.\r
-  \r
-  Copyright (c) 2006 - 2009, Intel Corporation.<BR>                                                         \r
-  All rights reserved. This program and the accompanying materials                          \r
-  are licensed and made available under the terms and conditions of the BSD License         \r
-  which accompanies this distribution.  The full text of the license may be found at<BR>        \r
-  http://opensource.org/licenses/bsd-license.php                                            \r
-    \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-  @par Revision Reference:          \r
-  This Protocol is introduced in UEFI Specification 2.0\r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+  @par Revision Reference:\r
+  This Protocol was introduced in UEFI Specification 2.0.\r
 \r
 **/\r
 \r
@@ -40,102 +34,101 @@ typedef struct {
   ///\r
   /// Length in bytes of this entry.\r
   ///\r
-  UINT32                      Size;\r
+  UINT32     Size;\r
 \r
   ///\r
   /// Set to TRUE if this entry is a "deny" entry.\r
   /// Set to FALSE if this entry is a "normal" entry.\r
   ///\r
-  BOOLEAN                     DenyFlag;\r
+  BOOLEAN    DenyFlag;\r
 \r
   ///\r
   /// Set to TRUE if this entry will not time out.\r
   /// Set to FALSE if this entry will time out.\r
   ///\r
-  BOOLEAN                     StaticFlag;\r
+  BOOLEAN    StaticFlag;\r
 \r
   ///\r
   /// 16-bit ARP hardware identifier number.\r
   ///\r
-  UINT16                      HwAddressType;\r
+  UINT16     HwAddressType;\r
 \r
   ///\r
   /// 16-bit protocol type number.\r
   ///\r
-  UINT16                      SwAddressType;\r
+  UINT16     SwAddressType;\r
 \r
   ///\r
-  /// Length of the hardware address.\r
+  /// The length of the hardware address.\r
   ///\r
-  UINT8                       HwAddressLength;\r
+  UINT8      HwAddressLength;\r
 \r
   ///\r
-  /// Length of the protocol address.\r
+  /// The length of the protocol address.\r
   ///\r
-  UINT8                       SwAddressLength;\r
+  UINT8      SwAddressLength;\r
 } EFI_ARP_FIND_DATA;\r
 \r
 typedef struct {\r
   ///\r
   /// 16-bit protocol type number in host byte order.\r
   ///\r
-  UINT16                    SwAddressType;\r
+  UINT16    SwAddressType;\r
 \r
   ///\r
-  /// Length in bytes of the station's protocol address to register.\r
+  /// The length in bytes of the station's protocol address to register.\r
   ///\r
-  UINT8                     SwAddressLength;\r
+  UINT8     SwAddressLength;\r
 \r
   ///\r
-  /// Pointer to the first byte of the protocol address to register. For\r
+  /// The pointer to the first byte of the protocol address to register. For\r
   /// example, if SwAddressType is 0x0800 (IP), then\r
   /// StationAddress points to the first byte of this station's IP\r
   /// address stored in network byte order.\r
   ///\r
-  VOID                      *StationAddress;\r
+  VOID      *StationAddress;\r
 \r
   ///\r
   /// The timeout value in 100-ns units that is associated with each\r
   /// new dynamic ARP cache entry. If it is set to zero, the value is\r
   /// implementation-specific.\r
   ///\r
-  UINT32                    EntryTimeOut;\r
+  UINT32    EntryTimeOut;\r
 \r
   ///\r
   /// The number of retries before a MAC address is resolved. If it is\r
   /// set to zero, the value is implementation-specific.\r
   ///\r
-  UINT32                    RetryCount;\r
+  UINT32    RetryCount;\r
 \r
   ///\r
   /// The timeout value in 100-ns units that is used to wait for the ARP\r
   /// reply packet or the timeout value between two retries. Set to zero\r
   /// to use implementation-specific value.\r
   ///\r
-  UINT32                    RetryTimeOut;\r
+  UINT32    RetryTimeOut;\r
 } EFI_ARP_CONFIG_DATA;\r
 \r
-\r
 /**\r
   This function is used to assign a station address to the ARP cache for this instance\r
   of the ARP driver.\r
-  \r
-  Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will \r
-  respond to ARP requests that match this registered station address. A call to \r
+\r
+  Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will\r
+  respond to ARP requests that match this registered station address. A call to\r
   this function with the ConfigData field set to NULL will reset this ARP instance.\r
-  \r
-  Once a protocol type and station address have been assigned to this ARP instance, \r
-  all the following ARP functions will use this information. Attempting to change \r
+\r
+  Once a protocol type and station address have been assigned to this ARP instance,\r
+  all the following ARP functions will use this information. Attempting to change\r
   the protocol type or station address to a configured ARP instance will result in errors.\r
 \r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
-  @param  ConfigData             Pointer to the EFI_ARP_CONFIG_DATA structure.\r
+  @param  This                   The pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param  ConfigData             The pointer to the EFI_ARP_CONFIG_DATA structure.\r
 \r
   @retval EFI_SUCCESS            The new station address was successfully\r
                                  registered.\r
   @retval EFI_INVALID_PARAMETER  One or more of the following conditions is TRUE:\r
-                                 * This is NULL. \r
-                                 * SwAddressLength is zero when ConfigData is not NULL. \r
+                                 * This is NULL.\r
+                                 * SwAddressLength is zero when ConfigData is not NULL.\r
                                  * StationAddress is NULL when ConfigData is not NULL.\r
   @retval EFI_ACCESS_DENIED      The SwAddressType, SwAddressLength, or\r
                                  StationAddress is different from the one that is\r
@@ -144,27 +137,27 @@ typedef struct {
                                  allocated.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_ARP_CONFIGURE)(\r
   IN EFI_ARP_PROTOCOL       *This,\r
   IN EFI_ARP_CONFIG_DATA    *ConfigData   OPTIONAL\r
-  );  \r
+  );\r
 \r
 /**\r
   This function is used to insert entries into the ARP cache.\r
 \r
-  ARP cache entries are typically inserted and updated by network protocol drivers \r
-  as network traffic is processed. Most ARP cache entries will time out and be \r
-  deleted if the network traffic stops. ARP cache entries that were inserted \r
+  ARP cache entries are typically inserted and updated by network protocol drivers\r
+  as network traffic is processed. Most ARP cache entries will time out and be\r
+  deleted if the network traffic stops. ARP cache entries that were inserted\r
   by the Add() function may be static (will not time out) or dynamic (will time out).\r
-  Default ARP cache timeout values are not covered in most network protocol \r
-  specifications (although RFC 1122 comes pretty close) and will only be \r
-  discussed in general in this specification. The timeout values that are \r
-  used in the EFI Sample Implementation should be used only as a guideline. \r
-  Final product implementations of the EFI network stack should be tuned for \r
+  Default ARP cache timeout values are not covered in most network protocol\r
+  specifications (although RFC 1122 comes pretty close) and will only be\r
+  discussed in general terms in this specification. The timeout values that are\r
+  used in the EFI Sample Implementation should be used only as a guideline.\r
+  Final product implementations of the EFI network stack should be tuned for\r
   their expected network environments.\r
-  \r
+\r
   @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
   @param  DenyFlag               Set to TRUE if this entry is a deny entry. Set to\r
                                  FALSE if this  entry is a normal entry.\r
@@ -184,10 +177,10 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS            The entry has been added or updated.\r
   @retval EFI_INVALID_PARAMETER  One or more of the following conditions is TRUE:\r
-                                 * This is NULL. \r
-                                 * DenyFlag is FALSE and TargetHwAddress is NULL. \r
-                                 * DenyFlag is FALSE and TargetSwAddress is NULL. \r
-                                 * TargetHwAddress is NULL and TargetSwAddress is NULL. \r
+                                 * This is NULL.\r
+                                 * DenyFlag is FALSE and TargetHwAddress is NULL.\r
+                                 * DenyFlag is FALSE and TargetSwAddress is NULL.\r
+                                 * TargetHwAddress is NULL and TargetSwAddress is NULL.\r
                                  * Neither TargetSwAddress nor TargetHwAddress are NULL when DenyFlag is\r
                                  TRUE.\r
   @retval EFI_OUT_OF_RESOURCES   The new ARP cache entry could not be allocated.\r
@@ -205,29 +198,29 @@ EFI_STATUS
   IN VOID                   *TargetHwAddress  OPTIONAL,\r
   IN UINT32                 TimeoutValue,\r
   IN BOOLEAN                Overwrite\r
-  );  \r
+  );\r
 \r
 /**\r
   This function searches the ARP cache for matching entries and allocates a buffer into\r
   which those entries are copied.\r
-  \r
-  The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which \r
+\r
+  The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which\r
   are protocol address pairs and hardware address pairs.\r
-  When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer \r
-  is not NULL), the ARP cache timeout for the found entry is reset if Refresh is \r
-  set to TRUE. If the found ARP cache entry is a permanent entry, it is not \r
+  When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer\r
+  is not NULL), the ARP cache timeout for the found entry is reset if Refresh is\r
+  set to TRUE. If the found ARP cache entry is a permanent entry, it is not\r
   affected by Refresh.\r
-  \r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
+\r
+  @param  This                   The pointer to the EFI_ARP_PROTOCOL instance.\r
   @param  BySwAddress            Set to TRUE to look for matching software protocol\r
                                  addresses. Set to FALSE to look for matching\r
                                  hardware protocol addresses.\r
-  @param  AddressBuffer          Pointer to address buffer. Set to NULL to match\r
-                                 all addresses.\r
+  @param  AddressBuffer          The pointer to the address buffer. Set to NULL\r
+                                 to match all addresses.\r
   @param  EntryLength            The size of an entry in the entries buffer.\r
   @param  EntryCount             The number of ARP cache entries that are found by\r
                                  the specified criteria.\r
-  @param  Entries                Pointer to the buffer that will receive the ARP\r
+  @param  Entries                The pointer to the buffer that will receive the ARP\r
                                  cache entries.\r
   @param  Refresh                Set to TRUE to refresh the timeout value of the\r
                                  matching ARP cache entry.\r
@@ -241,7 +234,7 @@ EFI_STATUS
   @retval EFI_NOT_STARTED        The ARP driver instance has not been configured.\r
 \r
 **/\r
-typedef \r
+typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_ARP_FIND)(\r
   IN EFI_ARP_PROTOCOL       *This,\r
@@ -251,17 +244,16 @@ EFI_STATUS
   OUT UINT32                *EntryCount       OPTIONAL,\r
   OUT EFI_ARP_FIND_DATA     **Entries         OPTIONAL,\r
   IN BOOLEAN                Refresh\r
-  );  \r
-\r
+  );\r
 \r
 /**\r
   This function removes specified ARP cache entries.\r
 \r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param  This                   The pointer to the EFI_ARP_PROTOCOL instance.\r
   @param  BySwAddress            Set to TRUE to delete matching protocol addresses.\r
                                  Set to FALSE to delete matching hardware\r
                                  addresses.\r
-  @param  AddressBuffer          Pointer to the address buffer that is used as a\r
+  @param  AddressBuffer          The pointer to the address buffer that is used as a\r
                                  key to look for the cache entry. Set to NULL to\r
                                  delete all entries.\r
 \r
@@ -277,13 +269,13 @@ EFI_STATUS
   IN EFI_ARP_PROTOCOL       *This,\r
   IN BOOLEAN                BySwAddress,\r
   IN VOID                   *AddressBuffer   OPTIONAL\r
-  );  \r
+  );\r
 \r
 /**\r
   This function delete all dynamic entries from the ARP cache that match the specified\r
   software protocol type.\r
 \r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param  This                   The pointer to the EFI_ARP_PROTOCOL instance.\r
 \r
   @retval EFI_SUCCESS            The cache has been flushed.\r
   @retval EFI_INVALID_PARAMETER  This is NULL.\r
@@ -295,17 +287,17 @@ typedef
 EFI_STATUS\r
 (EFIAPI *EFI_ARP_FLUSH)(\r
   IN EFI_ARP_PROTOCOL       *This\r
-  );  \r
+  );\r
 \r
 /**\r
   This function tries to resolve the TargetSwAddress and optionally returns a\r
   TargetHwAddress if it already exists in the ARP cache.\r
 \r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
-  @param  TargetSwAddress        Pointer to the protocol address to resolve.\r
-  @param  ResolvedEvent          Pointer to the event that will be signaled when\r
+  @param  This                   The pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param  TargetSwAddress        The pointer to the protocol address to resolve.\r
+  @param  ResolvedEvent          The pointer to the event that will be signaled when\r
                                  the address is resolved or some error occurs.\r
-  @param  TargetHwAddress        Pointer to the buffer for the resolved hardware\r
+  @param  TargetHwAddress        The pointer to the buffer for the resolved hardware\r
                                  address in network byte order.\r
 \r
   @retval EFI_SUCCESS            The data is copied from the ARP cache into the\r
@@ -322,24 +314,24 @@ EFI_STATUS
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_ARP_REQUEST)(\r
-  IN EFI_ARP_PROTOCOL       *This, \r
+  IN EFI_ARP_PROTOCOL       *This,\r
   IN VOID                   *TargetSwAddress  OPTIONAL,\r
   IN EFI_EVENT              ResolvedEvent     OPTIONAL,\r
-  OUT VOID                  *TargetHwAddress  \r
-  );  \r
+  OUT VOID                  *TargetHwAddress\r
+  );\r
 \r
 /**\r
   This function aborts the previous ARP request (identified by This, TargetSwAddress\r
   and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().\r
-  \r
-  If the request is in the internal ARP request queue, the request is aborted \r
-  immediately and its ResolvedEvent is signaled. Only an asynchronous address \r
-  request needs to be canceled. If TargeSwAddress and ResolveEvent are both \r
-  NULL, all the pending asynchronous requests that have been issued by This \r
+\r
+  If the request is in the internal ARP request queue, the request is aborted\r
+  immediately and its ResolvedEvent is signaled. Only an asynchronous address\r
+  request needs to be canceled. If TargeSwAddress and ResolveEvent are both\r
+  NULL, all the pending asynchronous requests that have been issued by This\r
   instance will be cancelled and their corresponding events will be signaled.\r
-  \r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
-  @param  TargetSwAddress        Pointer to the protocol address in previous\r
+\r
+  @param  This                   The pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param  TargetSwAddress        The pointer to the protocol address in previous\r
                                  request session.\r
   @param  ResolvedEvent          Pointer to the event that is used as the\r
                                  notification event in previous request session.\r
@@ -359,27 +351,26 @@ EFI_STATUS
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_ARP_CANCEL)(\r
-  IN EFI_ARP_PROTOCOL       *This, \r
+  IN EFI_ARP_PROTOCOL       *This,\r
   IN VOID                   *TargetSwAddress  OPTIONAL,\r
   IN EFI_EVENT              ResolvedEvent     OPTIONAL\r
-  );  \r
+  );\r
 \r
 ///\r
-/// ARP is used to resolve local network protocol addresses into \r
+/// ARP is used to resolve local network protocol addresses into\r
 /// network hardware addresses.\r
 ///\r
 struct _EFI_ARP_PROTOCOL {\r
-  EFI_ARP_CONFIGURE         Configure;\r
-  EFI_ARP_ADD               Add;\r
-  EFI_ARP_FIND              Find;\r
-  EFI_ARP_DELETE            Delete;\r
-  EFI_ARP_FLUSH             Flush;\r
-  EFI_ARP_REQUEST           Request;\r
-  EFI_ARP_CANCEL            Cancel;\r
+  EFI_ARP_CONFIGURE    Configure;\r
+  EFI_ARP_ADD          Add;\r
+  EFI_ARP_FIND         Find;\r
+  EFI_ARP_DELETE       Delete;\r
+  EFI_ARP_FLUSH        Flush;\r
+  EFI_ARP_REQUEST      Request;\r
+  EFI_ARP_CANCEL       Cancel;\r
 };\r
 \r
-\r
-extern EFI_GUID gEfiArpServiceBindingProtocolGuid;\r
-extern EFI_GUID gEfiArpProtocolGuid;\r
+extern EFI_GUID  gEfiArpServiceBindingProtocolGuid;\r
+extern EFI_GUID  gEfiArpProtocolGuid;\r
 \r
 #endif\r