]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h
Scrubbed more.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Impl.h
index 35ada7feff294179b11ca5c2e93eadb5a9ee4761..1058432aaef4ae1e756ce865a01999f3901db25c 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2006, Intel Corporation\r
+Copyright (c) 2005 - 2007, Intel Corporation                                                         \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
@@ -25,8 +25,8 @@ Abstract:
 \r
 #include <PiDxe.h>\r
 \r
-#include <Protocol/IP4.h>\r
-#include <Protocol/IP4Config.h>\r
+#include <Protocol/Ip4.h>\r
+#include <Protocol/Ip4Config.h>\r
 #include <Protocol/Arp.h>\r
 #include <Protocol/ManagedNetwork.h>\r
 \r
@@ -50,7 +50,7 @@ Abstract:
 #include "Ip4Input.h"\r
 #include "Ip4Output.h"\r
 \r
-enum {\r
+typedef enum {\r
   IP4_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', '4', 'P'),\r
   IP4_SERVICE_SIGNATURE  = EFI_SIGNATURE_32 ('I', 'P', '4', 'S'),\r
 \r
@@ -74,17 +74,17 @@ enum {
   IP4_SERVICE_STARTED,\r
   IP4_SERVICE_CONFIGED,\r
   IP4_SERVICE_DESTORY\r
-};\r
-\r
-//\r
-// IP4_TXTOKEN_WRAP wraps the upper layer's transmit token.\r
-// The user's data is kept in the Packet. When fragment is\r
-// needed, each fragment of the Packet has a reference to the\r
-// Packet, no data is actually copied. The Packet will be\r
-// released when all the fragments of it have been recycled by\r
-// MNP. Upon then, the IP4_TXTOKEN_WRAP will be released, and\r
-// user's event signalled.\r
-//\r
+} IP4_IMPL_ENUM_TYPES;\r
+\r
+///\r
+/// IP4_TXTOKEN_WRAP wraps the upper layer's transmit token.\r
+/// The user's data is kept in the Packet. When fragment is\r
+/// needed, each fragment of the Packet has a reference to the\r
+/// Packet, no data is actually copied. The Packet will be\r
+/// released when all the fragments of it have been recycled by\r
+/// MNP. Upon then, the IP4_TXTOKEN_WRAP will be released, and\r
+/// user's event signalled.\r
+///\r
 typedef struct {\r
   IP4_PROTOCOL              *IpInstance;\r
   EFI_IP4_COMPLETION_TOKEN  *Token;\r
@@ -93,23 +93,23 @@ typedef struct {
   INTN                      Life;\r
 } IP4_TXTOKEN_WRAP;\r
 \r
-//\r
-// IP4_RXDATA_WRAP wraps the data IP4 child delivers to the\r
-// upper layers. The received packet is kept in the Packet.\r
-// The Packet itself may be constructured from some fragments.\r
-// All the fragments of the Packet is organized by a\r
-// IP4_ASSEMBLE_ENTRY structure. If the Packet is recycled by\r
-// the upper layer, the assemble entry and its associated\r
-// fragments will be freed at last.\r
-//\r
+///\r
+/// IP4_RXDATA_WRAP wraps the data IP4 child delivers to the\r
+/// upper layers. The received packet is kept in the Packet.\r
+/// The Packet itself may be constructured from some fragments.\r
+/// All the fragments of the Packet is organized by a\r
+/// IP4_ASSEMBLE_ENTRY structure. If the Packet is recycled by\r
+/// the upper layer, the assemble entry and its associated\r
+/// fragments will be freed at last.\r
+///\r
 typedef struct {\r
-  NET_LIST_ENTRY            Link;\r
+  LIST_ENTRY                Link;\r
   IP4_PROTOCOL              *IpInstance;\r
   NET_BUF                   *Packet;\r
   EFI_IP4_RECEIVE_DATA      RxData;\r
 } IP4_RXDATA_WRAP;\r
 \r
-struct _IP4_PROTOCOL {\r
+typedef struct _IP4_PROTOCOL {\r
   UINT32                    Signature;\r
 \r
   EFI_IP4_PROTOCOL          Ip4Proto;\r
@@ -117,15 +117,15 @@ struct _IP4_PROTOCOL {
   INTN                      State;\r
 \r
   IP4_SERVICE               *Service;\r
-  NET_LIST_ENTRY            Link; // Link to all the IP protocol from the service\r
+  LIST_ENTRY                Link; // Link to all the IP protocol from the service\r
 \r
   //\r
   // User's transmit/receive tokens, and received/deliverd packets\r
   //\r
   NET_MAP                   RxTokens;\r
   NET_MAP                   TxTokens;   // map between (User's Token, IP4_TXTOKE_WRAP)\r
-  NET_LIST_ENTRY            Received;   // Received but not delivered packet\r
-  NET_LIST_ENTRY            Delivered;  // Delivered and to be recycled packets\r
+  LIST_ENTRY                Received;   // Received but not delivered packet\r
+  LIST_ENTRY                Delivered;  // Delivered and to be recycled packets\r
   EFI_LOCK                  RecycleLock;\r
 \r
   //\r
@@ -134,7 +134,7 @@ struct _IP4_PROTOCOL {
   // is used to communicate the current route info to the upper layer.\r
   //\r
   IP4_INTERFACE             *Interface;\r
-  NET_LIST_ENTRY            AddrLink;   // Ip instances with the same IP address.\r
+  LIST_ENTRY                AddrLink;   // Ip instances with the same IP address.\r
   IP4_ROUTE_TABLE           *RouteTable;\r
 \r
   EFI_IP4_ROUTE_TABLE       *EfiRouteTable;\r
@@ -148,9 +148,9 @@ struct _IP4_PROTOCOL {
 \r
   EFI_IP4_CONFIG_DATA       ConfigData;\r
 \r
-};\r
+} IP4_PROTOCOL;\r
 \r
-struct _IP4_SERVICE {\r
+typedef struct _IP4_SERVICE {\r
   UINT32                          Signature;\r
   EFI_SERVICE_BINDING_PROTOCOL    ServiceBinding;\r
   INTN                            State;\r
@@ -161,9 +161,9 @@ struct _IP4_SERVICE {
   // interface and route table and caches.\r
   //\r
   UINTN                           NumChildren;\r
-  NET_LIST_ENTRY                  Children;\r
+  LIST_ENTRY                      Children;\r
 \r
-  NET_LIST_ENTRY                  Interfaces;\r
+  LIST_ENTRY                      Interfaces;\r
 \r
   IP4_INTERFACE                   *DefaultInterface;\r
   IP4_ROUTE_TABLE                 *DefaultRouteTable;\r
@@ -194,13 +194,14 @@ struct _IP4_SERVICE {
   EFI_IP4_CONFIG_PROTOCOL         *Ip4Config;\r
   EFI_EVENT                       DoneEvent;\r
   EFI_EVENT                       ReconfigEvent;\r
+  EFI_EVENT                       ActiveEvent;\r
 \r
   //\r
   // The string representation of the current mac address of the\r
   // NIC this IP4_SERVICE works on.\r
   //\r
   CHAR16                          *MacString;\r
-};\r
+} IP4_SERVICE;\r
 \r
 #define IP4_INSTANCE_FROM_PROTOCOL(Ip4) \\r
           CR ((Ip4), IP4_PROTOCOL, Ip4Proto, IP4_PROTOCOL_SIGNATURE)\r