]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h
MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol,
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4If.h
index 35c1380388657f150bf7fa0d2fceaacce528bb1b..6dada9605b8ca468fbb96ed55443f3ed7cc6b59d 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Definition for IP4 pesudo interface structure.\r
   \r
-Copyright (c) 2005 - 2006, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php\r
@@ -15,12 +15,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __EFI_IP4_IF_H__\r
 #define __EFI_IP4_IF_H__\r
 \r
-typedef enum {\r
-  IP4_FRAME_RX_SIGNATURE  = SIGNATURE_32 ('I', 'P', 'F', 'R'),\r
-  IP4_FRAME_TX_SIGNATURE  = SIGNATURE_32 ('I', 'P', 'F', 'T'),\r
-  IP4_FRAME_ARP_SIGNATURE = SIGNATURE_32 ('I', 'P', 'F', 'A'),\r
-  IP4_INTERFACE_SIGNATURE = SIGNATURE_32 ('I', 'P', 'I', 'F')\r
-} IP4_IF_ENUM_TYPES;\r
+#define IP4_FRAME_RX_SIGNATURE  SIGNATURE_32 ('I', 'P', 'F', 'R')\r
+#define IP4_FRAME_TX_SIGNATURE  SIGNATURE_32 ('I', 'P', 'F', 'T')\r
+#define IP4_FRAME_ARP_SIGNATURE SIGNATURE_32 ('I', 'P', 'F', 'A')\r
+#define IP4_INTERFACE_SIGNATURE SIGNATURE_32 ('I', 'P', 'I', 'F')\r
 \r
 /**\r
   This prototype is used by both receive and transmission.\r
@@ -156,7 +154,7 @@ struct _IP4_INTERFACE {
   BOOLEAN                       Configured;\r
 \r
   //\r
-  // Handle used to create/destory ARP child. All the IP children\r
+  // Handle used to create/destroy ARP child. All the IP children\r
   // share one MNP which is owned by IP service binding.\r
   //\r
   EFI_HANDLE                    Controller;\r
@@ -194,10 +192,10 @@ struct _IP4_INTERFACE {
   the interface is configured.\r
 \r
   @param[in]  Mnp               The shared MNP child of this IP4 service binding\r
-                                instance\r
+                                instance.\r
   @param[in]  Controller        The controller this IP4 service binding instance\r
                                 is installed. Most like the UNDI handle.\r
-  @param[in]  ImageHandle       This driver's image handle\r
+  @param[in]  ImageHandle       This driver's image handle.\r
 \r
   @return Point to the created IP4_INTERFACE, otherwise NULL.\r
 \r
@@ -213,9 +211,9 @@ Ip4CreateInterface (
   Set the interface's address, create and configure\r
   the ARP child if necessary.\r
 \r
-  @param  Interface         The interface to set the address\r
-  @param  IpAddr            The interface's IP address\r
-  @param  SubnetMask        The interface's netmask\r
+  @param  Interface         The interface to set the address.\r
+  @param  IpAddr            The interface's IP address.\r
+  @param  SubnetMask        The interface's netmask.\r
 \r
   @retval EFI_SUCCESS           The interface is configured with Ip/netmask pair,\r
                                 and a ARP is created for it.\r
@@ -236,7 +234,7 @@ Ip4SetAddress (
   Because the IpInstance is optional, the caller must remove\r
   IpInstance from the interface's instance list itself.\r
 \r
-  @param[in]  Interface         The interface used by the IpInstance\r
+  @param[in]  Interface         The interface used by the IpInstance.\r
   @param[in]  IpInstance        The Ip instance that free the interface. NULL if\r
                                 the Ip driver is releasing the default interface.\r
 \r
@@ -274,7 +272,7 @@ Ip4FreeInterface (
 EFI_STATUS\r
 Ip4SendFrame (\r
   IN  IP4_INTERFACE         *Interface,\r
-  IN  IP4_PROTOCOL          *IpInstance,      OPTIONAL\r
+  IN  IP4_PROTOCOL          *IpInstance       OPTIONAL,\r
   IN  NET_BUF               *Packet,\r
   IN  IP4_ADDR              NextHop,\r
   IN  IP4_FRAME_CALLBACK    CallBack,\r
@@ -286,19 +284,19 @@ Ip4SendFrame (
   either queued on ARP queues or that have already been delivered to\r
   MNP and not yet recycled.\r
 \r
-  @param[in]  Interface         Interface to remove the frames from\r
+  @param[in]  Interface         Interface to remove the frames from.\r
   @param[in]  IoStatus          The transmit status returned to the frames'\r
-                                callback\r
+                                callback.\r
   @param[in]  FrameToCancel     Function to select the frame to cancel, NULL to\r
-                                select all\r
-  @param[in]  Context           Opaque parameters passed to FrameToCancel\r
+                                select all.\r
+  @param[in]  Context           Opaque parameters passed to FrameToCancel.\r
 \r
 **/\r
 VOID\r
 Ip4CancelFrames (\r
   IN IP4_INTERFACE          *Interface,\r
   IN EFI_STATUS             IoStatus,\r
-  IN IP4_FRAME_TO_CANCEL    FrameToCancel,   OPTIONAL\r
+  IN IP4_FRAME_TO_CANCEL    FrameToCancel    OPTIONAL,\r
   IN VOID                   *Context\r
   );\r
 \r
@@ -322,14 +320,14 @@ Ip4CancelReceive (
 /**\r
   Request to receive the packet from the interface.\r
 \r
-  @param[in]  Interface         The interface to receive the frames from\r
+  @param[in]  Interface         The interface to receive the frames from.\r
   @param[in]  IpInstance        The instance that requests the receive. NULL for\r
                                 the driver itself.\r
   @param[in]  CallBack          Function to call when receive finished.\r
-  @param[in]  Context           Opaque parameter to the callback\r
+  @param[in]  Context           Opaque parameter to the callback.\r
 \r
   @retval EFI_ALREADY_STARTED   There is already a pending receive request.\r
-  @retval EFI_OUT_OF_RESOURCES  Failed to allocate resource to receive\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to allocate resource to receive.\r
   @retval EFI_SUCCESS           The recieve request has been started.\r
   @retval other                 Other error occurs.\r
 \r
@@ -337,7 +335,7 @@ Ip4CancelReceive (
 EFI_STATUS\r
 Ip4ReceiveFrame (\r
   IN  IP4_INTERFACE         *Interface,\r
-  IN  IP4_PROTOCOL          *IpInstance,      OPTIONAL\r
+  IN  IP4_PROTOCOL          *IpInstance       OPTIONAL,\r
   IN  IP4_FRAME_CALLBACK    CallBack,\r
   IN  VOID                  *Context\r
   );\r