]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/IpIoLib.h
MdeModulePkg: Add match2 opcode support in SetupBrowserDxe and sample code in DriverS...
[mirror_edk2.git] / MdeModulePkg / Include / Library / IpIoLib.h
index 09ff2c122a85259e26411324e8980e25c42b4920..37cba070a1fb946eec7bbdae94b219fd10646b07 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 - 2010, 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
@@ -280,7 +286,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 +300,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 +535,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