]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/IpIoLib.h
MdeModulePkg/NetLib: Add NetLibDetectMediaWaitTimeout() API to support EFI_NOT_READY...
[mirror_edk2.git] / MdeModulePkg / Include / Library / IpIoLib.h
index 09ff2c122a85259e26411324e8980e25c42b4920..aab0c6805948573cd37a5be372eead13418e7dcd 100644 (file)
@@ -2,7 +2,7 @@
   This library is only intended to be used by UEFI network stack modules.\r
   It provides the combined IpIo layer on the EFI IP4 Protocol and EFI IP6 protocol.\r
 \r
-Copyright (c) 2005 - 2010, Intel Corporation.  All rights reserved<BR>\r
+Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available under \r
 the terms and conditions of the BSD License that accompanies this distribution.  \r
 The full text of the license may be found at\r
@@ -153,6 +153,11 @@ typedef union {
   UINT8                     PrefixLength;\r
 } IP_IO_IP_MASK;\r
 \r
+typedef union {\r
+  EFI_IP4_PROTOCOL  *Ip4;\r
+  EFI_IP6_PROTOCOL  *Ip6;\r
+} IP_IO_IP_PROTOCOL;\r
+\r
 ///\r
 /// The IP session for an IP receive packet.\r
 ///\r
@@ -181,7 +186,7 @@ typedef struct _EFI_NET_SESSION_DATA {
 **/\r
 typedef\r
 VOID\r
-(*PKT_RCVD_NOTIFY) (\r
+(EFIAPI *PKT_RCVD_NOTIFY) (\r
   IN EFI_STATUS           Status, \r
   IN UINT8                IcmpErr,\r
   IN EFI_NET_SESSION_DATA *NetSession,\r
@@ -195,17 +200,18 @@ VOID
   @param[in] Status        Result of the IP packet being sent.\r
   @param[in] Context       The data provided by user for the received packet when\r
                            the callback is registered in IP_IO_OPEN_DATA::SndContext.\r
-  @param[in] Sender        A pointer to EFI_IP4_PROTOCOL or EFI_IP6_PROTOCOL.\r
+  @param[in] Sender        A Union type to specify a pointer of EFI_IP4_PROTOCOL \r
+                           or EFI_IP6_PROTOCOL.\r
   @param[in] NotifyData    The Context data specified when calling IpIoSend()\r
   \r
 **/\r
 typedef\r
 VOID\r
-(*PKT_SENT_NOTIFY) (\r
-  IN EFI_STATUS  Status,\r
-  IN VOID        *Context,\r
-  IN VOID        *Sender,\r
-  IN VOID        *NotifyData\r
+(EFIAPI *PKT_SENT_NOTIFY) (\r
+  IN EFI_STATUS        Status,\r
+  IN VOID              *Context,\r
+  IN IP_IO_IP_PROTOCOL Sender,\r
+  IN VOID              *NotifyData\r
   );\r
 \r
 ///\r
@@ -229,7 +235,7 @@ typedef struct _IP_IO {
   //\r
   // The IP instance consumed by this IP_IO\r
   //\r
-  VOID                          *Ip;\r
+  IP_IO_IP_PROTOCOL             Ip;\r
   BOOLEAN                       IsConfigured;\r
 \r
   ///\r
@@ -255,6 +261,8 @@ typedef struct _IP_IO {
   PKT_RCVD_NOTIFY               PktRcvdNotify;   ///< See IP_IO_OPEN_DATA::PktRcvdNotify.\r
   PKT_SENT_NOTIFY               PktSentNotify;   ///< See IP_IO_OPEN_DATA::PktSentNotify.\r
   UINT8                         IpVersion;\r
+  IP4_ADDR                      StationIp;\r
+  IP4_ADDR                      SubnetMask;\r
 } IP_IO;\r
 \r
 ///\r
@@ -280,7 +288,7 @@ typedef struct _IP_IO_SEND_ENTRY {
   IP_IO                     *IpIo;\r
   VOID                      *Context;\r
   VOID                      *NotifyData;\r
-  VOID                      *Ip;\r
+  IP_IO_IP_PROTOCOL         Ip;\r
   NET_BUF                   *Pkt;\r
   IP_IO_IP_COMPLETION_TOKEN SndToken;\r
 } IP_IO_SEND_ENTRY;\r
@@ -294,7 +302,7 @@ typedef struct _IP_IO_IP_INFO {
   IP_IO_IP_MASK             PreMask;\r
   LIST_ENTRY                Entry;\r
   EFI_HANDLE                ChildHandle;\r
-  VOID                      *Ip;\r
+  IP_IO_IP_PROTOCOL         Ip;\r
   IP_IO_IP_COMPLETION_TOKEN DummyRcvToken;\r
   INTN                      RefCnt;\r
   UINT8                     IpVersion;\r
@@ -529,10 +537,9 @@ IpIoFindSender (
 \r
   @param[in]   IcmpError             IcmpError Type.\r
   @param[in]   IpVersion             The version of the IP protocol to use,\r
-                                     either IPv4 or IPv6.\r
-  \r
-  @param[out]  IsHard                Whether it is a hard error.\r
-  @param[out]  Notify                Whether it need to notify SockError.\r
+                                     either IPv4 or IPv6. \r
+  @param[out]  IsHard                If TRUE, indicates that it is a hard error.\r
+  @param[out]  Notify                If TRUE, SockError needs to be notified.\r
 \r
   @return The ICMP Error Status, such as EFI_NETWORK_UNREACHABLE.\r
 \r