diff options
author | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-13 08:18:10 +0000 |
---|---|---|
committer | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-06-13 08:18:10 +0000 |
commit | 2a2e33b20feb245572416333bf26eb8a77e73aa9 (patch) | |
tree | 93d49cc2d0887fc4bcb669bcc099950ee5711271 /MdeModulePkg/Include/Library | |
parent | 0ccabf7bab741234721a8ee78113ef191c0ce8d5 (diff) | |
download | edk2-platforms-2a2e33b20feb245572416333bf26eb8a77e73aa9.tar.xz |
Add a UNION definition (IP_IO_IP_PROTOOCL) for EFI_IP4/6_PROTOCOL and change IP_IO structure using this UNION to point the special IP Protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10578 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Include/Library')
-rw-r--r-- | MdeModulePkg/Include/Library/IpIoLib.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/MdeModulePkg/Include/Library/IpIoLib.h b/MdeModulePkg/Include/Library/IpIoLib.h index df29c04190..37cba070a1 100644 --- a/MdeModulePkg/Include/Library/IpIoLib.h +++ b/MdeModulePkg/Include/Library/IpIoLib.h @@ -153,6 +153,11 @@ typedef union { UINT8 PrefixLength;
} IP_IO_IP_MASK;
+typedef union {
+ EFI_IP4_PROTOCOL *Ip4;
+ EFI_IP6_PROTOCOL *Ip6;
+} IP_IO_IP_PROTOCOL;
+
///
/// The IP session for an IP receive packet.
///
@@ -195,17 +200,18 @@ VOID @param[in] Status Result of the IP packet being sent.
@param[in] Context The data provided by user for the received packet when
the callback is registered in IP_IO_OPEN_DATA::SndContext.
- @param[in] Sender A pointer to EFI_IP4_PROTOCOL or EFI_IP6_PROTOCOL.
+ @param[in] Sender A Union type to specify a pointer of EFI_IP4_PROTOCOL
+ or EFI_IP6_PROTOCOL.
@param[in] NotifyData The Context data specified when calling IpIoSend()
**/
typedef
VOID
(EFIAPI *PKT_SENT_NOTIFY) (
- IN EFI_STATUS Status,
- IN VOID *Context,
- IN VOID *Sender,
- IN VOID *NotifyData
+ IN EFI_STATUS Status,
+ IN VOID *Context,
+ IN IP_IO_IP_PROTOCOL Sender,
+ IN VOID *NotifyData
);
///
@@ -229,7 +235,7 @@ typedef struct _IP_IO { //
// The IP instance consumed by this IP_IO
//
- VOID *Ip;
+ IP_IO_IP_PROTOCOL Ip;
BOOLEAN IsConfigured;
///
@@ -280,7 +286,7 @@ typedef struct _IP_IO_SEND_ENTRY { IP_IO *IpIo;
VOID *Context;
VOID *NotifyData;
- VOID *Ip;
+ IP_IO_IP_PROTOCOL Ip;
NET_BUF *Pkt;
IP_IO_IP_COMPLETION_TOKEN SndToken;
} IP_IO_SEND_ENTRY;
@@ -294,7 +300,7 @@ typedef struct _IP_IO_IP_INFO { IP_IO_IP_MASK PreMask;
LIST_ENTRY Entry;
EFI_HANDLE ChildHandle;
- VOID *Ip;
+ IP_IO_IP_PROTOCOL Ip;
IP_IO_IP_COMPLETION_TOKEN DummyRcvToken;
INTN RefCnt;
UINT8 IpVersion;
|