]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code scrubbing.
authorjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 8 Dec 2008 05:09:57 +0000 (05:09 +0000)
committerjgong5 <jgong5@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 8 Dec 2008 05:09:57 +0000 (05:09 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6916 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c
MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h
MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.c
MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h
MdeModulePkg/Universal/Network/ArpDxe/ArpMain.c
MdeModulePkg/Universal/Network/ArpDxe/ComponentName.c

index 49352c0bb115bfae7e31515dd60e8bb16e9891b8..e946549278051a58871859412fc9cacb27f3b9f8 100644 (file)
@@ -1,24 +1,17 @@
 /** @file\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+  Abstract:\r
+  \r
+Copyright (c) 2006 - 2008, 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\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
-Module Name:\r
-\r
-  ArpDriver.c\r
-\r
-Abstract:\r
-\r
-\r
 **/\r
 \r
-\r
 #include "ArpDriver.h"\r
 #include "ArpImpl.h"\r
 \r
@@ -35,14 +28,14 @@ EFI_DRIVER_BINDING_PROTOCOL gArpDriverBinding = {
 /**\r
   Create and initialize the arp service context data.\r
 \r
-  @param  ImageHandle            The image handle representing the loaded driver\r
-                                 image.\r
-  @param  ControllerHandle       The controller handle the driver binds to.\r
-  @param  ArpService             Pointer to the buffer containing the arp service\r
-                                 context data.\r
+  @param[in]  ImageHandle            The image handle representing the loaded driver\r
+                                     image.\r
+  @param[in]  ControllerHandle       The controller handle the driver binds to.\r
+  @param[in]  ArpService             Pointer to the buffer containing the arp service\r
+                                     context data.\r
 \r
-  @retval EFI_SUCCESS            The arp service context is initialized.\r
-  @retval other                  Failed to initialize the arp service context.\r
+  @retval EFI_SUCCESS                The arp service context is initialized.\r
+  @retval other                      Failed to initialize the arp service context.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -193,8 +186,8 @@ ERROR_EXIT:
 /**\r
   Clean the arp service context data.\r
 \r
-  @param  ArpService             Pointer to the buffer containing the arp service\r
-                                 context data.\r
+  @param[in]  ArpService             Pointer to the buffer containing the arp service\r
+                                     context data.\r
 \r
   @return None.\r
 \r
@@ -248,18 +241,23 @@ ArpCleanService (
   }\r
 }\r
 \r
-\r
 /**\r
   Test to see if this driver supports ControllerHandle.\r
-\r
-  @param  This                   Protocol instance pointer.\r
-  @param  ControllerHandle       Handle of device to test.\r
-  @param  RemainingDevicePath    Optional parameter use to pick a specific child\r
-                                 device to start.\r
-\r
-  @retval EFI_SUCCES             This driver supports this device\r
-  @retval EFI_ALREADY_STARTED    This driver is already running on this device.\r
-  @retval other                  This driver does not support this device.\r
+  \r
+  This service is called by the EFI boot service ConnectController(). In\r
+  order to make drivers as small as possible, there are a few calling\r
+  restrictions for this service. ConnectController() must\r
+  follow these calling restrictions. If any other agent wishes to call\r
+  Supported() it must also follow these calling restrictions.\r
+  \r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ControllerHandle       Handle of device to test.\r
+  @param[in]  RemainingDevicePath    Optional parameter use to pick a specific child\r
+                                     device to start.\r
+\r
+  @retval EFI_SUCCES                 This driver supports this device\r
+  @retval EFI_ALREADY_STARTED        This driver is already running on this device.\r
+  @retval other                      This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -305,15 +303,21 @@ ArpDriverBindingSupported (
 \r
 /**\r
   Start this driver on ControllerHandle.\r
-\r
-  @param  This                   Protocol instance pointer.\r
-  @param  ControllerHandle       Handle of device to bind driver to\r
-  @param  RemainingDevicePath    Optional parameter use to pick a specific child\r
-                                 device to start.\r
-\r
-  @retval EFI_SUCCES             This driver is added to ControllerHandle\r
-  @retval EFI_ALREADY_STARTED    This driver is already running on ControllerHandle\r
-  @retval other                  This driver does not support this device\r
+  \r
+  This service is called by the EFI boot service ConnectController(). In order to make\r
+  drivers as small as possible, there are a few calling restrictions for\r
+  this service. ConnectController() must follow these\r
+  calling restrictions. If any other agent wishes to call Start() it\r
+  must also follow these calling restrictions.\r
+\r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ControllerHandle       Handle of device to bind driver to.\r
+  @param[in]  RemainingDevicePath    Optional parameter use to pick a specific child\r
+                                     device to start.\r
+\r
+  @retval EFI_SUCCES                 This driver is added to ControllerHandle.\r
+  @retval EFI_ALREADY_STARTED        This driver is already running on ControllerHandle.\r
+  @retval other                      This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -380,15 +384,21 @@ ERROR:
 \r
 /**\r
   Stop this driver on ControllerHandle.\r
-\r
-  @param  This                   Protocol instance pointer.\r
-  @param  ControllerHandle       Handle of device to stop driver on\r
-  @param  NumberOfChildren       Number of Handles in ChildHandleBuffer. If number\r
-                                 of  children is zero stop the entire bus driver.\r
-  @param  ChildHandleBuffer      List of Child Handles to Stop.\r
-\r
-  @retval EFI_SUCCES             This driver is removed ControllerHandle\r
-  @retval other                  This driver was not removed from this device\r
+  \r
+  This service is called by the EFI boot service DisconnectController(). In order to\r
+  make drivers as small as possible, there are a few calling\r
+  restrictions for this service. DisconnectController()\r
+  must follow these calling restrictions. If any other agent wishes\r
+  to call Stop() it must also follow these calling restrictions.\r
+  \r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ControllerHandle       Handle of device to stop driver on\r
+  @param[in]  NumberOfChildren       Number of Handles in ChildHandleBuffer. If number\r
+                                     of children is zero stop the entire bus driver.\r
+  @param[in]  ChildHandleBuffer      List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCES                 This driver is removed ControllerHandle\r
+  @retval other                      This driver was not removed from this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -468,17 +478,17 @@ ArpDriverBindingStop (
 /**\r
   Creates a child handle with a set of I/O services.\r
 \r
-  @param  This                   Protocol instance pointer.\r
-  @param  ChildHandle            Pointer to the handle of the child to create. If\r
-                                 it is NULL, then a new handle is created. If it is\r
-                                 not NULL, then the I/O services are  added to the\r
-                                 existing child handle.\r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ChildHandle            Pointer to the handle of the child to create. If\r
+                                     it is NULL, then a new handle is created. If it is\r
+                                     not NULL, then the I/O services are  added to the\r
+                                     existing child handle.\r
 \r
-  @retval EFI_SUCCES             The child handle was created with the I/O\r
-                                 services.\r
-  @retval EFI_OUT_OF_RESOURCES   There are not enough resources availabe to create\r
-                                 the child.\r
-  @retval other                  The child handle was not created.\r
+  @retval EFI_SUCCES                 The child handle was created with the I/O\r
+                                     services.\r
+  @retval EFI_OUT_OF_RESOURCES       There are not enough resources availabe to create\r
+                                     the child.\r
+  @retval other                      The child handle was not created.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -592,17 +602,17 @@ ERROR:
 /**\r
   Destroys a child handle with a set of I/O services.\r
 \r
-  @param  This                   Protocol instance pointer.\r
-  @param  ChildHandle            Handle of the child to destroy.\r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ChildHandle            Handle of the child to destroy.\r
 \r
-  @retval EFI_SUCCES             The I/O services were removed from the child\r
-                                 handle.\r
-  @retval EFI_UNSUPPORTED        The child handle does not support the I/O services\r
-                                  that are being removed.\r
-  @retval EFI_INVALID_PARAMETER  Child handle is not a valid EFI Handle.\r
-  @retval EFI_ACCESS_DENIED      The child handle could not be destroyed because\r
-                                 its  I/O services are being used.\r
-  @retval other                  The child handle was not destroyed.\r
+  @retval EFI_SUCCES                 The I/O services were removed from the child\r
+                                     handle.\r
+  @retval EFI_UNSUPPORTED            The child handle does not support the I/O services\r
+                                     that are being removed.\r
+  @retval EFI_INVALID_PARAMETER      Child handle is not a valid EFI Handle.\r
+  @retval EFI_ACCESS_DENIED          The child handle could not be destroyed because\r
+                                     its  I/O services are being used.\r
+  @retval other                      The child handle was not destroyed.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -708,8 +718,8 @@ ArpServiceBindingDestroyChild (
   The entry point for Arp driver which installs the driver binding and component name\r
   protocol on its ImageHandle.\r
 \r
-  @param  ImageHandle            The image handle of the driver.\r
-  @param  SystemTable            The system table.\r
+  @param[in]  ImageHandle        The image handle of the driver.\r
+  @param[in]  SystemTable        The system table.\r
 \r
   @retval EFI_SUCCES             if the driver binding and component name protocols are successfully\r
   @retval Others                 Failed to install the protocols.\r
index 73b7f0804205e559cf6b520fc2371edebb77ad05..cace02ee90baa8b29aacea834c748b4ae59325c8 100644 (file)
@@ -1,21 +1,15 @@
 /** @file\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+  Abstract:\r
+  \r
+Copyright (c) 2006 - 2008, 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\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
-Module Name:\r
-\r
-  ArpDriver.c\r
-\r
-Abstract:\r
-\r
-\r
 **/\r
 \r
 #ifndef _ARP_DRIVER_H_\r
@@ -41,17 +35,26 @@ extern EFI_DRIVER_BINDING_PROTOCOL    gArpDriverBinding;
 extern EFI_COMPONENT_NAME_PROTOCOL    gArpComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL   gArpComponentName2;\r
 \r
+//\r
+// Function prototypes for the Drivr Binding Protocol\r
+//\r
 /**\r
   Test to see if this driver supports ControllerHandle.\r
-\r
-  @param  This                   Protocol instance pointer.\r
-  @param  ControllerHandle       Handle of device to test.\r
-  @param  RemainingDevicePath    Optional parameter use to pick a specific child\r
-                                 device to start.\r
-\r
-  @retval EFI_SUCCES             This driver supports this device\r
-  @retval EFI_ALREADY_STARTED    This driver is already running on this device.\r
-  @retval other                  This driver does not support this device.\r
+  \r
+  This service is called by the EFI boot service ConnectController(). In\r
+  order to make drivers as small as possible, there are a few calling\r
+  restrictions for this service. ConnectController() must\r
+  follow these calling restrictions. If any other agent wishes to call\r
+  Supported() it must also follow these calling restrictions.\r
+  \r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ControllerHandle       Handle of device to test.\r
+  @param[in]  RemainingDevicePath    Optional parameter use to pick a specific child\r
+                                     device to start.\r
+\r
+  @retval EFI_SUCCES                 This driver supports this device\r
+  @retval EFI_ALREADY_STARTED        This driver is already running on this device.\r
+  @retval other                      This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -64,15 +67,21 @@ ArpDriverBindingSupported (
 \r
 /**\r
   Start this driver on ControllerHandle.\r
-\r
-  @param  This                   Protocol instance pointer.\r
-  @param  ControllerHandle       Handle of device to bind driver to\r
-  @param  RemainingDevicePath    Optional parameter use to pick a specific child\r
-                                 device to start.\r
-\r
-  @retval EFI_SUCCES             This driver is added to ControllerHandle\r
-  @retval EFI_ALREADY_STARTED    This driver is already running on ControllerHandle\r
-  @retval other                  This driver does not support this device\r
+  \r
+  This service is called by the EFI boot service ConnectController(). In order to make\r
+  drivers as small as possible, there are a few calling restrictions for\r
+  this service. ConnectController() must follow these\r
+  calling restrictions. If any other agent wishes to call Start() it\r
+  must also follow these calling restrictions.\r
+\r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ControllerHandle       Handle of device to bind driver to.\r
+  @param[in]  RemainingDevicePath    Optional parameter use to pick a specific child\r
+                                     device to start.\r
+\r
+  @retval EFI_SUCCES                 This driver is added to ControllerHandle.\r
+  @retval EFI_ALREADY_STARTED        This driver is already running on ControllerHandle.\r
+  @retval other                      This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -85,15 +94,21 @@ ArpDriverBindingStart (
 \r
 /**\r
   Stop this driver on ControllerHandle.\r
-\r
-  @param  This                   Protocol instance pointer.\r
-  @param  ControllerHandle       Handle of device to stop driver on\r
-  @param  NumberOfChildren       Number of Handles in ChildHandleBuffer. If number\r
-                                 of  children is zero stop the entire bus driver.\r
-  @param  ChildHandleBuffer      List of Child Handles to Stop.\r
-\r
-  @retval EFI_SUCCES             This driver is removed ControllerHandle\r
-  @retval other                  This driver was not removed from this device\r
+  \r
+  This service is called by the EFI boot service DisconnectController(). In order to\r
+  make drivers as small as possible, there are a few calling\r
+  restrictions for this service. DisconnectController()\r
+  must follow these calling restrictions. If any other agent wishes\r
+  to call Stop() it must also follow these calling restrictions.\r
+  \r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ControllerHandle       Handle of device to stop driver on\r
+  @param[in]  NumberOfChildren       Number of Handles in ChildHandleBuffer. If number\r
+                                     of children is zero stop the entire bus driver.\r
+  @param[in]  ChildHandleBuffer      List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCES                 This driver is removed ControllerHandle\r
+  @retval other                      This driver was not removed from this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -108,17 +123,17 @@ ArpDriverBindingStop (
 /**\r
   Creates a child handle with a set of I/O services.\r
 \r
-  @param  This                   Protocol instance pointer.\r
-  @param  ChildHandle            Pointer to the handle of the child to create. If\r
-                                 it is NULL, then a new handle is created. If it is\r
-                                 not NULL, then the I/O services are  added to the\r
-                                 existing child handle.\r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ChildHandle            Pointer to the handle of the child to create. If\r
+                                     it is NULL, then a new handle is created. If it is\r
+                                     not NULL, then the I/O services are  added to the\r
+                                     existing child handle.\r
 \r
-  @retval EFI_SUCCES             The child handle was created with the I/O\r
-                                 services.\r
-  @retval EFI_OUT_OF_RESOURCES   There are not enough resources availabe to create\r
-                                 the child.\r
-  @retval other                  The child handle was not created.\r
+  @retval EFI_SUCCES                 The child handle was created with the I/O\r
+                                     services.\r
+  @retval EFI_OUT_OF_RESOURCES       There are not enough resources availabe to create\r
+                                     the child.\r
+  @retval other                      The child handle was not created.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -131,17 +146,17 @@ ArpServiceBindingCreateChild (
 /**\r
   Destroys a child handle with a set of I/O services.\r
 \r
-  @param  This                   Protocol instance pointer.\r
-  @param  ChildHandle            Handle of the child to destroy.\r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ChildHandle            Handle of the child to destroy.\r
 \r
-  @retval EFI_SUCCES             The I/O services were removed from the child\r
-                                 handle.\r
-  @retval EFI_UNSUPPORTED        The child handle does not support the I/O services\r
-                                  that are being removed.\r
-  @retval EFI_INVALID_PARAMETER  Child handle is not a valid EFI Handle.\r
-  @retval EFI_ACCESS_DENIED      The child handle could not be destroyed because\r
-                                 its  I/O services are being used.\r
-  @retval other                  The child handle was not destroyed.\r
+  @retval EFI_SUCCES                 The I/O services were removed from the child\r
+                                     handle.\r
+  @retval EFI_UNSUPPORTED            The child handle does not support the I/O services\r
+                                     that are being removed.\r
+  @retval EFI_INVALID_PARAMETER      Child handle is not a valid EFI Handle.\r
+  @retval EFI_ACCESS_DENIED          The child handle could not be destroyed because\r
+                                     its  I/O services are being used.\r
+  @retval other                      The child handle was not destroyed.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -165,10 +180,10 @@ ArpServiceBindingDestroyChild (
   by This does not support the language specified by Language,\r
   then EFI_UNSUPPORTED is returned.\r
 \r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
                                 array indicating the language. This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
@@ -177,7 +192,7 @@ ArpServiceBindingDestroyChild (
                                 to the driver writer. Language is specified\r
                                 in RFC 3066 or ISO 639-2 language code format.\r
 \r
-  @param  DriverName[out]       A pointer to the Unicode string to return.\r
+  @param[out]  DriverName       A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
                                 driver specified by This in the language\r
                                 specified by Language.\r
@@ -216,15 +231,15 @@ ArpComponentNameGetDriverName (
   then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
   support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
 \r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
-  @param  ControllerHandle[in]  The handle of a controller that the driver\r
+  @param[in]  ControllerHandle  The handle of a controller that the driver\r
                                 specified by This is managing.  This handle\r
                                 specifies the controller whose name is to be\r
                                 returned.\r
 \r
-  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
+  @param[in]  ChildHandle       The handle of the child controller to retrieve\r
                                 the name of.  This is an optional parameter that\r
                                 may be NULL.  It will be NULL for device\r
                                 drivers.  It will also be NULL for a bus drivers\r
@@ -233,7 +248,7 @@ ArpComponentNameGetDriverName (
                                 driver that wishes to retrieve the name of a\r
                                 child controller.\r
 \r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
                                 array indicating the language.  This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
@@ -242,7 +257,7 @@ ArpComponentNameGetDriverName (
                                 to the driver writer. Language is specified in\r
                                 RFC 3066 or ISO 639-2 language code format.\r
 \r
-  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
+  @param[out]  ControllerName   A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
                                 controller specified by ControllerHandle and\r
                                 ChildHandle in the language specified by\r
index e29fbf872ca157214f6f8b6d2e246b6fc3ebf748..79346db1780ab9113b5fbe731f6b972d698960cb 100644 (file)
@@ -1,24 +1,17 @@
 /** @file\r
-\r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+  Abstract:\r
+  \r
+Copyright (c) 2006 - 2008, 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\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
-Module Name:\r
-\r
-  ArpImpl.c\r
-\r
-Abstract:\r
-\r
-\r
 **/\r
 \r
-\r
 #include "ArpImpl.h"\r
 \r
 EFI_ARP_PROTOCOL  mEfiArpProtocolTemplate = {\r
@@ -35,9 +28,9 @@ EFI_ARP_PROTOCOL  mEfiArpProtocolTemplate = {
 /**\r
   Initialize the instance context data.\r
 \r
-  @param  ArpService             Pointer to the arp service context data this\r
-                                 instance belongs to.\r
-  @param  Instance               Pointer to the instance context data.\r
+  @param[in]  ArpService             Pointer to the arp service context data this\r
+                                     instance belongs to.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
 \r
   @return None.\r
 \r
@@ -65,7 +58,7 @@ ArpInitInstance (
 /**\r
   Process the Arp packets received from Mnp, the procedure conforms to RFC826.\r
 \r
-  @param  Context                Pointer to the context data registerd to the\r
+  @param[in]  Context            Pointer to the context data registerd to the\r
                                  Event.\r
 \r
   @return None.\r
@@ -312,9 +305,9 @@ RESTART_RECEIVE:
 /**\r
   Queue ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK.\r
 \r
-  @param  Event                  The Event this notify function registered to.\r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  @param[in]  Event                  The Event this notify function registered to.\r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -334,9 +327,9 @@ ArpOnFrameRcvd (
 \r
 /**\r
   Process the already sent arp packets.\r
-\r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  \r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -373,9 +366,9 @@ ArpOnFrameSentDpc (
 /**\r
   Request ArpOnFrameSentDpc as a DPC at TPL_CALLBACK.\r
 \r
-  @param  Event                  The Event this notify function registered to.\r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  @param[in]  Event                  The Event this notify function registered to.\r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -397,9 +390,9 @@ ArpOnFrameSent (
 /**\r
   Process the arp cache olding and drive the retrying arp requests.\r
 \r
-  @param  Event                  The Event this notify function registered to.\r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  @param[in]  Event                  The Event this notify function registered to.\r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -525,8 +518,8 @@ ArpTimerHandler (
 /**\r
   Match the two NET_ARP_ADDRESSes.\r
 \r
-  @param  AddressOne             Pointer to the first address to match.\r
-  @param  AddressTwo             Pointer to the second address to match.\r
+  @param[in]  AddressOne             Pointer to the first address to match.\r
+  @param[in]  AddressTwo             Pointer to the second address to match.\r
 \r
   @return The two addresses match or not.\r
 \r
@@ -564,12 +557,12 @@ ArpMatchAddress (
 /**\r
   Find the CacheEntry which matches the requirements in the specified CacheTable.\r
 \r
-  @param  CacheTable             Pointer to the arp cache table.\r
-  @param  StartEntry             Pointer to the start entry this search begins with\r
-                                 in the cache table.\r
-  @param  FindOpType             The search type.\r
-  @param  ProtocolAddress        Pointer to the protocol address to match.\r
-  @param  HardwareAddress        Pointer to the hardware address to match.\r
+  @param[in]  CacheTable             Pointer to the arp cache table.\r
+  @param[in]  StartEntry             Pointer to the start entry this search begins with\r
+                                     in the cache table.\r
+  @param[in]  FindOpType             The search type.\r
+  @param[in]  ProtocolAddress        Pointer to the protocol address to match.\r
+  @param[in]  HardwareAddress        Pointer to the hardware address to match.\r
 \r
   @return Pointer to the matched arp cache entry, if NULL, no match is found.\r
 \r
@@ -637,9 +630,9 @@ ArpFindNextCacheEntryInTable (
   Find the CacheEntry, using ProtocolAddress or HardwareAddress or both, as the keyword,\r
   in the DeniedCacheTable.\r
 \r
-  @param  ArpService             Pointer to the arp service context data.\r
-  @param  ProtocolAddress        Pointer to the protocol address.\r
-  @param  HardwareAddress        Pointer to the hardware address.\r
+  @param[in]  ArpService             Pointer to the arp service context data.\r
+  @param[in]  ProtocolAddress        Pointer to the protocol address.\r
+  @param[in]  HardwareAddress        Pointer to the hardware address.\r
 \r
   @return Pointer to the matched cache entry, if NULL no match is found.\r
 \r
@@ -697,7 +690,7 @@ ArpFindDeniedCacheEntry (
 /**\r
   Allocate a cache entry and initialize it.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
 \r
   @return Pointer to the new created cache entry.\r
 \r
@@ -764,9 +757,9 @@ ArpAllocCacheEntry (
 /**\r
   Turn the CacheEntry into the resolved status.\r
 \r
-  @param  CacheEntry             Pointer to the resolved cache entry.\r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  UserEvent              Pointer to the UserEvent to notify.\r
+  @param[in]  CacheEntry             Pointer to the resolved cache entry.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  UserEvent              Pointer to the UserEvent to notify.\r
 \r
   @return The count of notifications sent to the instance.\r
 \r
@@ -826,9 +819,9 @@ ArpAddressResolved (
   Fill the addresses in the CacheEntry using the information passed in by\r
   HwAddr and SwAddr.\r
 \r
-  @param  CacheEntry             Pointer to the cache entry.\r
-  @param  HwAddr                 Pointer to the software address.\r
-  @param  SwAddr                 Pointer to the hardware address.\r
+  @param[in]  CacheEntry             Pointer to the cache entry.\r
+  @param[in]  HwAddr                 Pointer to the software address.\r
+  @param[in]  SwAddr                 Pointer to the hardware address.\r
 \r
   @return None.\r
 \r
@@ -880,9 +873,9 @@ ArpFillAddressInCacheEntry (
 /**\r
   Configure the instance using the ConfigData. ConfigData is already validated.\r
 \r
-  @param  Instance               Pointer to the instance context data to be\r
+  @param[in]  Instance           Pointer to the instance context data to be\r
                                  configured.\r
-  @param  ConfigData             Pointer to the configuration data used to\r
+  @param[in]  ConfigData         Pointer to the configuration data used to\r
                                  configure the instance.\r
 \r
   @retval EFI_SUCCESS            The instance is configured with the ConfigData.\r
@@ -1005,11 +998,11 @@ ArpConfigureInstance (
 /**\r
   Send out an arp frame using the CachEntry and the ArpOpCode.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  CacheEntry             Pointer to the configuration data used to\r
-                                 configure the instance.\r
-  @param  ArpOpCode              The opcode used to send out this Arp frame, either\r
-                                 request or reply.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  CacheEntry             Pointer to the configuration data used to\r
+                                     configure the instance.\r
+  @param[in]  ArpOpCode              The opcode used to send out this Arp frame, either\r
+                                     request or reply.\r
 \r
   @return None.\r
 \r
@@ -1212,13 +1205,13 @@ CLEAN_EXIT:
   SwAddressType, AddressBuffer combination as the matching key, if Force is TRUE,\r
   the cache is deleted event it's a static entry.\r
 \r
-  @param  CacheTable             Pointer to the cache table to do the deletion.\r
-  @param  BySwAddress            Delete the cache entry by software address or by\r
-                                 hardware address.\r
-  @param  SwAddressType          The software address used to do the deletion.\r
-  @param  AddressBuffer          Pointer to the buffer containing the address to\r
-                                 match for the deletion.\r
-  @param  Force                  This deletion is forced or not.\r
+  @param[in]  CacheTable             Pointer to the cache table to do the deletion.\r
+  @param[in]  BySwAddress            Delete the cache entry by software address or by\r
+                                     hardware address.\r
+  @param[in]  SwAddressType          The software address used to do the deletion.\r
+  @param[in]  AddressBuffer          Pointer to the buffer containing the address to\r
+                                     match for the deletion.\r
+  @param[in]  Force                  This deletion is forced or not.\r
 \r
   @return The count of the deleted cache entries.\r
 \r
@@ -1301,12 +1294,12 @@ MATCHED:
 /**\r
   Delete cache entries in all the cache tables.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  BySwAddress            Delete the cache entry by software address or by\r
-                                 hardware address.\r
-  @param  AddressBuffer          Pointer to the buffer containing the address to\r
-                                 match for the deletion.\r
-  @param  Force                  This deletion is forced or not.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  BySwAddress            Delete the cache entry by software address or by\r
+                                     hardware address.\r
+  @param[in]  AddressBuffer          Pointer to the buffer containing the address to\r
+                                     match for the deletion.\r
+  @param[in]  Force                  This deletion is forced or not.\r
 \r
   @return The count of the deleted cache entries.\r
 \r
@@ -1355,11 +1348,11 @@ ArpDeleteCacheEntry (
 /**\r
   Cancel the arp request.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  TargetSwAddress        Pointer to the buffer containing the target\r
-                                 software address to match the arp request.\r
-  @param  UserEvent              The user event used to notify this request\r
-                                 cancellation.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  TargetSwAddress        Pointer to the buffer containing the target\r
+                                     software address to match the arp request.\r
+  @param[in]  UserEvent              The user event used to notify this request\r
+                                     cancellation.\r
 \r
   @return The count of the cancelled requests.\r
 \r
@@ -1414,18 +1407,18 @@ ArpCancelRequest (
 /**\r
   Find the cache entry in the cache table.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  BySwAddress            Set to TRUE to look for matching software protocol\r
+  @param[in]  Instance           Pointer to the instance context data.\r
+  @param[in]  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
+  @param[in]  AddressBuffer      Pointer to address buffer. Set to NULL to match\r
                                  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
+  @param[out] EntryLength        The size of an entry in the entries buffer.\r
+  @param[out] 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[out] Entries            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
+  @param[in]  Refresh            Set to TRUE to refresh the timeout value of the\r
                                  matching ARP cache entry.\r
 \r
   @retval EFI_SUCCESS            The requested ARP cache entries are copied into\r
index 935d788280192057a78d3cf4415e5b696762097f..db889d4672c6094c6f241a986ff8159f6a4cd8cf 100644 (file)
@@ -1,21 +1,15 @@
 /** @file\r
+  Abstract:\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
+Copyright (c) 2006 - 2008, 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\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
-Module Name:\r
-\r
-  ArpImpl.h\r
-\r
-Abstract:\r
-\r
-\r
 **/\r
 \r
 #ifndef _ARP_IMPL_H_\r
@@ -51,7 +45,7 @@ Abstract:
 #define ARP_PERIODIC_TIMER_INTERVAL  (500 * TICKS_PER_MS)\r
 \r
 #pragma pack(1)\r
-typedef struct _ARP_HEAD {\r
+typedef struct {\r
   UINT16  HwType;\r
   UINT16  ProtoType;\r
   UINT8   HwAddrLen;\r
@@ -60,7 +54,7 @@ typedef struct _ARP_HEAD {
 } ARP_HEAD;\r
 #pragma pack()\r
 \r
-typedef struct _ARP_ADDRESS {\r
+typedef struct {\r
   UINT8  *SenderHwAddr;\r
   UINT8  *SenderProtoAddr;\r
   UINT8  *TargetHwAddr;\r
@@ -79,6 +73,9 @@ typedef enum {
 \r
 #define ARP_INSTANCE_DATA_SIGNATURE  EFI_SIGNATURE_32('A', 'R', 'P', 'I')\r
 \r
+//\r
+//comment for macro\r
+//\r
 #define ARP_INSTANCE_DATA_FROM_THIS(a) \\r
   CR ( \\r
   (a), \\r
@@ -89,7 +86,7 @@ typedef enum {
 \r
 typedef struct _ARP_SERVICE_DATA  ARP_SERVICE_DATA;\r
 \r
-typedef struct _ARP_INSTANCE_DATA {\r
+typedef struct {\r
   UINT32               Signature;\r
   ARP_SERVICE_DATA     *ArpService;\r
   EFI_HANDLE           Handle;\r
@@ -102,6 +99,9 @@ typedef struct _ARP_INSTANCE_DATA {
 \r
 #define ARP_SERVICE_DATA_SIGNATURE  EFI_SIGNATURE_32('A', 'R', 'P', 'S')\r
 \r
+//\r
+//comment for macro\r
+//\r
 #define ARP_SERVICE_DATA_FROM_THIS(a) \\r
   CR ( \\r
   (a), \\r
@@ -134,7 +134,7 @@ struct _ARP_SERVICE_DATA {
   EFI_EVENT                        PeriodicTimer;\r
 };\r
 \r
-typedef struct _USER_REQUEST_CONTEXT {\r
+typedef struct {\r
   LIST_ENTRY         List;\r
   ARP_INSTANCE_DATA  *Instance;\r
   EFI_EVENT          UserRequestEvent;\r
@@ -144,7 +144,7 @@ typedef struct _USER_REQUEST_CONTEXT {
 #define ARP_MAX_PROTOCOL_ADDRESS_LEN  sizeof(EFI_IP_ADDRESS)\r
 #define ARP_MAX_HARDWARE_ADDRESS_LEN  sizeof(EFI_MAC_ADDRESS)\r
 \r
-typedef struct _NET_ARP_ADDRESS {\r
+typedef struct {\r
   UINT16  Type;\r
   UINT8   Length;\r
   UINT8   *AddressPtr;\r
@@ -159,7 +159,7 @@ typedef enum {
   Protocol\r
 } ARP_ADDRESS_TYPE;\r
 \r
-typedef struct _ARP_CACHE_ENTRY {\r
+typedef struct {\r
   LIST_ENTRY      List;\r
 \r
   UINT32          RetryCount;\r
@@ -174,11 +174,17 @@ typedef struct _ARP_CACHE_ENTRY {
 \r
 /**\r
   This function is used to assign a station address to the ARP cache for this instance\r
-  of the ARP driver. A call to this function with the ConfigData field set to NULL\r
-  will reset this ARP instance.\r
-\r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
-  @param  ConfigData             Pointer to the EFI_ARP_CONFIG_DATA structure.\r
+  of the ARP driver. Each ARP instance has one station address. The EFI_ARP_PROTOCOL \r
+  driver will respond to ARP requests that match this registered station address. \r
+  A call to this function with the ConfigData field set to NULL will reset this \r
+  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
+  the protocol type or station address to a configured ARP instance will result in errors.\r
+\r
+  @param[in]  This               Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param[in]  ConfigData         Pointer to the EFI_ARP_CONFIG_DATA structure.\r
 \r
   @retval EFI_SUCCESS            The new station address was successfully\r
                                  registered.\r
@@ -203,19 +209,30 @@ ArpConfigure (
 /**\r
   This function is used to insert entries into the ARP cache.\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
+  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
+  their expected network environments.\r
+  \r
+  @param[in]  This               Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param[in]  DenyFlag           Set to TRUE if this entry is a deny entry. Set to\r
                                  FALSE if this  entry is a normal entry.\r
-  @param  TargetSwAddress        Pointer to a protocol address to add (or deny).\r
+  @param[in]  TargetSwAddress    Pointer to a protocol address to add (or deny).\r
                                  May be set to NULL if DenyFlag is TRUE.\r
-  @param  TargetHwAddress        Pointer to a hardware address to add (or deny).\r
+  @param[in]  TargetHwAddress    Pointer to a hardware address to add (or deny).\r
                                  May be set to NULL if DenyFlag is TRUE.\r
-  @param  TimeoutValue           Time in 100-ns units that this entry will remain\r
+  @param[in]  TimeoutValue       Time in 100-ns units that this entry will remain\r
                                  in the ARP cache. A value of zero means that the\r
                                  entry is permanent. A nonzero value will override\r
                                  the one given by Configure() if the entry to be\r
                                  added is a dynamic entry.\r
-  @param  Overwrite              If TRUE, the matching cache entry will be\r
+  @param[in]  Overwrite          If TRUE, the matching cache entry will be\r
                                  overwritten with the supplied parameters. If\r
                                  FALSE, EFI_ACCESS_DENIED is returned if the\r
                                  corresponding cache entry already exists.\r
@@ -248,19 +265,26 @@ ArpAdd (
 /**\r
   This function searches the ARP cache for matching entries and allocates a buffer into\r
   which those entries are copied.\r
-\r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
-  @param  BySwAddress            Set to TRUE to look for matching software protocol\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
+  affected by Refresh.\r
+  \r
+  @param[in]  This               Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param[in]  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
+  @param[in]  AddressBuffer      Pointer to address buffer. Set to NULL to match\r
                                  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
+  @param[out]  EntryLength       The size of an entry in the entries buffer.\r
+  @param[out]  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[out]  Entries           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
+  @param[in]  Refresh            Set to TRUE to refresh the timeout value of the\r
                                  matching ARP cache entry.\r
 \r
   @retval EFI_SUCCESS            The requested ARP cache entries were copied into\r
@@ -287,11 +311,11 @@ ArpFind (
 /**\r
   This function removes specified ARP cache entries.\r
 \r
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
-  @param  BySwAddress            Set to TRUE to delete matching protocol addresses.\r
+  @param[in]  This               Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param[in]  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[in]  AddressBuffer      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
@@ -313,7 +337,7 @@ ArpDelete (
   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[in]  This               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
@@ -331,11 +355,11 @@ ArpFlush (
   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[in]  This               Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param[in]  TargetSwAddress    Pointer to the protocol address to resolve.\r
+  @param[in]  ResolvedEvent      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[out]  TargetHwAddress   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
@@ -361,11 +385,17 @@ ArpRequest (
 /**\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
-  @param  This                   Pointer to the EFI_ARP_PROTOCOL instance.\r
-  @param  TargetSwAddress        Pointer to the protocol address in previous\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[in]  This               Pointer to the EFI_ARP_PROTOCOL instance.\r
+  @param[in]  TargetSwAddress    Pointer to the protocol address in previous\r
                                  request session.\r
-  @param  ResolvedEvent          Pointer to the event that is used as the\r
+  @param[in]  ResolvedEvent      Pointer to the event that is used as the\r
                                  notification event in previous request session.\r
 \r
   @retval EFI_SUCCESS            The pending request session(s) is/are aborted and\r
@@ -390,9 +420,9 @@ ArpCancel (
 /**\r
   Configure the instance using the ConfigData. ConfigData is already validated.\r
 \r
-  @param  Instance               Pointer to the instance context data to be\r
+  @param[in]  Instance           Pointer to the instance context data to be\r
                                  configured.\r
-  @param  ConfigData             Pointer to the configuration data used to\r
+  @param[in]  ConfigData         Pointer to the configuration data used to\r
                                  configure the instance.\r
 \r
   @retval EFI_SUCCESS            The instance is configured with the ConfigData.\r
@@ -415,9 +445,9 @@ ArpConfigureInstance (
   Find the CacheEntry, using ProtocolAddress or HardwareAddress or both, as the keyword,\r
   in the DeniedCacheTable.\r
 \r
-  @param  ArpService             Pointer to the arp service context data.\r
-  @param  ProtocolAddress        Pointer to the protocol address.\r
-  @param  HardwareAddress        Pointer to the hardware address.\r
+  @param[in]  ArpService             Pointer to the arp service context data.\r
+  @param[in]  ProtocolAddress        Pointer to the protocol address.\r
+  @param[in]  HardwareAddress        Pointer to the hardware address.\r
 \r
   @return Pointer to the matched cache entry, if NULL no match is found.\r
 \r
@@ -432,12 +462,12 @@ ArpFindDeniedCacheEntry (
 /**\r
   Find the CacheEntry which matches the requirements in the specified CacheTable.\r
 \r
-  @param  CacheTable             Pointer to the arp cache table.\r
-  @param  StartEntry             Pointer to the start entry this search begins with\r
-                                 in the cache table.\r
-  @param  FindOpType             The search type.\r
-  @param  ProtocolAddress        Pointer to the protocol address to match.\r
-  @param  HardwareAddress        Pointer to the hardware address to match.\r
+  @param[in]  CacheTable             Pointer to the arp cache table.\r
+  @param[in]  StartEntry             Pointer to the start entry this search begins with\r
+                                     in the cache table.\r
+  @param[in]  FindOpType             The search type.\r
+  @param[in]  ProtocolAddress        Pointer to the protocol address to match.\r
+  @param[in]  HardwareAddress        Pointer to the hardware address to match.\r
 \r
   @return Pointer to the matched arp cache entry, if NULL, no match is found.\r
 \r
@@ -454,7 +484,7 @@ ArpFindNextCacheEntryInTable (
 /**\r
   Allocate a cache entry and initialize it.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
 \r
   @return Pointer to the new created cache entry.\r
 \r
@@ -468,9 +498,9 @@ ArpAllocCacheEntry (
   Fill the addresses in the CacheEntry using the information passed in by\r
   HwAddr and SwAddr.\r
 \r
-  @param  CacheEntry             Pointer to the cache entry.\r
-  @param  HwAddr                 Pointer to the software address.\r
-  @param  SwAddr                 Pointer to the hardware address.\r
+  @param[in]  CacheEntry             Pointer to the cache entry.\r
+  @param[in]  HwAddr                 Pointer to the software address.\r
+  @param[in]  SwAddr                 Pointer to the hardware address.\r
 \r
   @return None.\r
 \r
@@ -485,9 +515,9 @@ ArpFillAddressInCacheEntry (
 /**\r
   Turn the CacheEntry into the resolved status.\r
 \r
-  @param  CacheEntry             Pointer to the resolved cache entry.\r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  UserEvent              Pointer to the UserEvent to notify.\r
+  @param[in]  CacheEntry             Pointer to the resolved cache entry.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  UserEvent              Pointer to the UserEvent to notify.\r
 \r
   @return The count of notifications sent to the instance.\r
 \r
@@ -502,12 +532,12 @@ ArpAddressResolved (
 /**\r
   Delete cache entries in all the cache tables.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  BySwAddress            Delete the cache entry by software address or by\r
-                                 hardware address.\r
-  @param  AddressBuffer          Pointer to the buffer containing the address to\r
-                                 match for the deletion.\r
-  @param  Force                  This deletion is forced or not.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  BySwAddress            Delete the cache entry by software address or by\r
+                                     hardware address.\r
+  @param[in]  AddressBuffer          Pointer to the buffer containing the address to\r
+                                     match for the deletion.\r
+  @param[in]  Force                  This deletion is forced or not.\r
 \r
   @return The count of the deleted cache entries.\r
 \r
@@ -523,11 +553,11 @@ ArpDeleteCacheEntry (
 /**\r
   Send out an arp frame using the CachEntry and the ArpOpCode.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  CacheEntry             Pointer to the configuration data used to\r
-                                 configure the instance.\r
-  @param  ArpOpCode              The opcode used to send out this Arp frame, either\r
-                                 request or reply.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  CacheEntry             Pointer to the configuration data used to\r
+                                     configure the instance.\r
+  @param[in]  ArpOpCode              The opcode used to send out this Arp frame, either\r
+                                     request or reply.\r
 \r
   @return None.\r
 \r
@@ -542,9 +572,9 @@ ArpSendFrame (
 /**\r
   Initialize the instance context data.\r
 \r
-  @param  ArpService             Pointer to the arp service context data this\r
-                                 instance belongs to.\r
-  @param  Instance               Pointer to the instance context data.\r
+  @param[in]  ArpService             Pointer to the arp service context data this\r
+                                     instance belongs to.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
 \r
   @return None.\r
 \r
@@ -558,7 +588,7 @@ ArpInitInstance (
 /**\r
   Process the Arp packets received from Mnp, the procedure conforms to RFC826.\r
 \r
-  @param  Context                Pointer to the context data registerd to the\r
+  @param[in]  Context            Pointer to the context data registerd to the\r
                                  Event.\r
 \r
   @return None.\r
@@ -573,9 +603,9 @@ ArpOnFrameRcvdDpc (
 /**\r
   Queue ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK.\r
 \r
-  @param  Event                  The Event this notify function registered to.\r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  @param[in]  Event                  The Event this notify function registered to.\r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -590,8 +620,8 @@ ArpOnFrameRcvd (
 /**\r
   Process the already sent arp packets.\r
 \r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -605,9 +635,9 @@ ArpOnFrameSentDpc (
 /**\r
   Queue ArpOnFrameRcvdDpc as a DPC at TPL_CALLBACK.\r
 \r
-  @param  Event                  The Event this notify function registered to.\r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  @param[in]  Event                  The Event this notify function registered to.\r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -622,9 +652,9 @@ ArpOnFrameSent (
 /**\r
   Process the arp cache olding and drive the retrying arp requests.\r
 \r
-  @param  Event                  The Event this notify function registered to.\r
-  @param  Context                Pointer to the context data registerd to the\r
-                                 Event.\r
+  @param[in]  Event                  The Event this notify function registered to.\r
+  @param[in]  Context                Pointer to the context data registerd to the\r
+                                     Event.\r
 \r
   @return None.\r
 \r
@@ -639,11 +669,11 @@ ArpTimerHandler (
 /**\r
   Cancel the arp request.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  TargetSwAddress        Pointer to the buffer containing the target\r
-                                 software address to match the arp request.\r
-  @param  UserEvent              The user event used to notify this request\r
-                                 cancellation.\r
+  @param[in]  Instance               Pointer to the instance context data.\r
+  @param[in]  TargetSwAddress        Pointer to the buffer containing the target\r
+                                     software address to match the arp request.\r
+  @param[in]  UserEvent              The user event used to notify this request\r
+                                     cancellation.\r
 \r
   @return The count of the cancelled requests.\r
 \r
@@ -658,18 +688,18 @@ ArpCancelRequest (
 /**\r
   Find the cache entry in the cache table.\r
 \r
-  @param  Instance               Pointer to the instance context data.\r
-  @param  BySwAddress            Set to TRUE to look for matching software protocol\r
+  @param[in]  Instance           Pointer to the instance context data.\r
+  @param[in]  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
+  @param[in]  AddressBuffer      Pointer to address buffer. Set to NULL to match\r
                                  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
+  @param[out] EntryLength        The size of an entry in the entries buffer.\r
+  @param[out] 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[out] Entries            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
+  @param[in]  Refresh            Set to TRUE to refresh the timeout value of the\r
                                  matching ARP cache entry.\r
 \r
   @retval EFI_SUCCESS            The requested ARP cache entries are copied into\r
@@ -690,4 +720,3 @@ ArpFindCacheEntry (
   );\r
 \r
 #endif\r
-\r
index 2d607fbf02569dfb4c88ceef11dec9cb8b064501..02fdf0be24b578db89629e5332c1a6a8f74bc7e7 100644 (file)
@@ -1,21 +1,15 @@
 /** @file\r
-\r
-Copyright (c) 2006, Intel Corporation\r
+  Abstract:\r
+  \r
+Copyright (c) 2006, 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\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
-Module Name:\r
-\r
-  ArpMain.c\r
-\r
-Abstract:\r
-\r
-\r
 **/\r
 \r
 #include "ArpImpl.h"\r
@@ -23,8 +17,14 @@ Abstract:
 \r
 /**\r
   This function is used to assign a station address to the ARP cache for this instance\r
-  of the ARP driver. A call to this function with the ConfigData field set to NULL\r
-  will reset this ARP instance.\r
+  of the ARP driver. Each ARP instance has one station address. The EFI_ARP_PROTOCOL \r
+  driver will respond to ARP requests that match this registered station address. \r
+  A call to this function with the ConfigData field set to NULL will reset this \r
+  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
+  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
@@ -82,6 +82,17 @@ ArpConfigure (
 /**\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
+  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
+  their expected network environments.\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
@@ -269,7 +280,14 @@ UNLOCK_EXIT:
 /**\r
   This function searches the ARP cache for matching entries and allocates a buffer into\r
   which those entries are copied.\r
-\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
+  affected by Refresh.\r
+  \r
   @param  This                   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
@@ -659,7 +677,13 @@ SIGNAL_USER:
 /**\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
+  \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
                                  request session.\r
index 97bab4ed8b382937e807939ba6d42c3caf9117ab..90ab11a1df031537542523c70334ed880f68e484 100644 (file)
@@ -1,21 +1,15 @@
 /** @file\r
+  UEFI Component Name(2) protocol implementation for ArpDxe driver.\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2007, 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\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
-Module Name:\r
-\r
-  ComponentName.c\r
-\r
-Abstract:\r
-\r
-\r
 **/\r
 \r
 #include "ArpDriver.h"\r
@@ -55,10 +49,10 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mArpDriverNameTable[] = {
   by This does not support the language specified by Language,\r
   then EFI_UNSUPPORTED is returned.\r
 \r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
                                 array indicating the language. This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
@@ -67,7 +61,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mArpDriverNameTable[] = {
                                 to the driver writer. Language is specified\r
                                 in RFC 3066 or ISO 639-2 language code format.\r
 \r
-  @param  DriverName[out]       A pointer to the Unicode string to return.\r
+  @param[out]  DriverName       A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
                                 driver specified by This in the language\r
                                 specified by Language.\r
@@ -114,15 +108,15 @@ ArpComponentNameGetDriverName (
   then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
   support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
 \r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
-  @param  ControllerHandle[in]  The handle of a controller that the driver\r
+  @param[in]  ControllerHandle  The handle of a controller that the driver\r
                                 specified by This is managing.  This handle\r
                                 specifies the controller whose name is to be\r
                                 returned.\r
 \r
-  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
+  @param[in]  ChildHandle       The handle of the child controller to retrieve\r
                                 the name of.  This is an optional parameter that\r
                                 may be NULL.  It will be NULL for device\r
                                 drivers.  It will also be NULL for a bus drivers\r
@@ -131,7 +125,7 @@ ArpComponentNameGetDriverName (
                                 driver that wishes to retrieve the name of a\r
                                 child controller.\r
 \r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
                                 array indicating the language.  This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
@@ -140,7 +134,7 @@ ArpComponentNameGetDriverName (
                                 to the driver writer. Language is specified in\r
                                 RFC 3066 or ISO 639-2 language code format.\r
 \r
-  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
+  @param[out]  ControllerName   A pointer to the Unicode string to return.\r
                                 This Unicode string is the name of the\r
                                 controller specified by ControllerHandle and\r
                                 ChildHandle in the language specified by\r