X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FIp4Dxe%2FIp4Impl.h;h=1058432aaef4ae1e756ce865a01999f3901db25c;hp=35ada7feff294179b11ca5c2e93eadb5a9ee4761;hb=96e1079fa412753e42edf293ce28adda88e68a45;hpb=83cbd279b64f3081af5c06d50fa26e15a99fc066 diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h index 35ada7feff..1058432aae 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2005 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -25,8 +25,8 @@ Abstract: #include -#include -#include +#include +#include #include #include @@ -50,7 +50,7 @@ Abstract: #include "Ip4Input.h" #include "Ip4Output.h" -enum { +typedef enum { IP4_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', '4', 'P'), IP4_SERVICE_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', '4', 'S'), @@ -74,17 +74,17 @@ enum { IP4_SERVICE_STARTED, IP4_SERVICE_CONFIGED, IP4_SERVICE_DESTORY -}; - -// -// IP4_TXTOKEN_WRAP wraps the upper layer's transmit token. -// The user's data is kept in the Packet. When fragment is -// needed, each fragment of the Packet has a reference to the -// Packet, no data is actually copied. The Packet will be -// released when all the fragments of it have been recycled by -// MNP. Upon then, the IP4_TXTOKEN_WRAP will be released, and -// user's event signalled. -// +} IP4_IMPL_ENUM_TYPES; + +/// +/// IP4_TXTOKEN_WRAP wraps the upper layer's transmit token. +/// The user's data is kept in the Packet. When fragment is +/// needed, each fragment of the Packet has a reference to the +/// Packet, no data is actually copied. The Packet will be +/// released when all the fragments of it have been recycled by +/// MNP. Upon then, the IP4_TXTOKEN_WRAP will be released, and +/// user's event signalled. +/// typedef struct { IP4_PROTOCOL *IpInstance; EFI_IP4_COMPLETION_TOKEN *Token; @@ -93,23 +93,23 @@ typedef struct { INTN Life; } IP4_TXTOKEN_WRAP; -// -// IP4_RXDATA_WRAP wraps the data IP4 child delivers to the -// upper layers. The received packet is kept in the Packet. -// The Packet itself may be constructured from some fragments. -// All the fragments of the Packet is organized by a -// IP4_ASSEMBLE_ENTRY structure. If the Packet is recycled by -// the upper layer, the assemble entry and its associated -// fragments will be freed at last. -// +/// +/// IP4_RXDATA_WRAP wraps the data IP4 child delivers to the +/// upper layers. The received packet is kept in the Packet. +/// The Packet itself may be constructured from some fragments. +/// All the fragments of the Packet is organized by a +/// IP4_ASSEMBLE_ENTRY structure. If the Packet is recycled by +/// the upper layer, the assemble entry and its associated +/// fragments will be freed at last. +/// typedef struct { - NET_LIST_ENTRY Link; + LIST_ENTRY Link; IP4_PROTOCOL *IpInstance; NET_BUF *Packet; EFI_IP4_RECEIVE_DATA RxData; } IP4_RXDATA_WRAP; -struct _IP4_PROTOCOL { +typedef struct _IP4_PROTOCOL { UINT32 Signature; EFI_IP4_PROTOCOL Ip4Proto; @@ -117,15 +117,15 @@ struct _IP4_PROTOCOL { INTN State; IP4_SERVICE *Service; - NET_LIST_ENTRY Link; // Link to all the IP protocol from the service + LIST_ENTRY Link; // Link to all the IP protocol from the service // // User's transmit/receive tokens, and received/deliverd packets // NET_MAP RxTokens; NET_MAP TxTokens; // map between (User's Token, IP4_TXTOKE_WRAP) - NET_LIST_ENTRY Received; // Received but not delivered packet - NET_LIST_ENTRY Delivered; // Delivered and to be recycled packets + LIST_ENTRY Received; // Received but not delivered packet + LIST_ENTRY Delivered; // Delivered and to be recycled packets EFI_LOCK RecycleLock; // @@ -134,7 +134,7 @@ struct _IP4_PROTOCOL { // is used to communicate the current route info to the upper layer. // IP4_INTERFACE *Interface; - NET_LIST_ENTRY AddrLink; // Ip instances with the same IP address. + LIST_ENTRY AddrLink; // Ip instances with the same IP address. IP4_ROUTE_TABLE *RouteTable; EFI_IP4_ROUTE_TABLE *EfiRouteTable; @@ -148,9 +148,9 @@ struct _IP4_PROTOCOL { EFI_IP4_CONFIG_DATA ConfigData; -}; +} IP4_PROTOCOL; -struct _IP4_SERVICE { +typedef struct _IP4_SERVICE { UINT32 Signature; EFI_SERVICE_BINDING_PROTOCOL ServiceBinding; INTN State; @@ -161,9 +161,9 @@ struct _IP4_SERVICE { // interface and route table and caches. // UINTN NumChildren; - NET_LIST_ENTRY Children; + LIST_ENTRY Children; - NET_LIST_ENTRY Interfaces; + LIST_ENTRY Interfaces; IP4_INTERFACE *DefaultInterface; IP4_ROUTE_TABLE *DefaultRouteTable; @@ -194,13 +194,14 @@ struct _IP4_SERVICE { EFI_IP4_CONFIG_PROTOCOL *Ip4Config; EFI_EVENT DoneEvent; EFI_EVENT ReconfigEvent; + EFI_EVENT ActiveEvent; // // The string representation of the current mac address of the // NIC this IP4_SERVICE works on. // CHAR16 *MacString; -}; +} IP4_SERVICE; #define IP4_INSTANCE_FROM_PROTOCOL(Ip4) \ CR ((Ip4), IP4_PROTOCOL, Ip4Proto, IP4_PROTOCOL_SIGNATURE)