]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Updated the IpIoLiband and the change includes:
authorqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 17 Nov 2009 07:57:02 +0000 (07:57 +0000)
committerqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 17 Nov 2009 07:57:02 +0000 (07:57 +0000)
1) Add one structure member – IpHdrLen in the EFI_NET_SESSION_DATA data structure.
2) Pass IP header length to upper-layer through this new member. The length of IP header will be used for ICMP6 packet generation in upper-layer.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9437 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Include/Library/IpIoLib.h
MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c

index e079fe1f795aef4e1c323c96dba2fd786b0db94b..000e8158098133ed1192a2f4adcc6df15ea60672 100644 (file)
@@ -160,6 +160,11 @@ typedef struct _EFI_NET_SESSION_DATA {
   EFI_IP_ADDRESS        Source;     ///< Source IP of the received packet\r
   EFI_IP_ADDRESS        Dest;       ///< Destination IP of the received packet\r
   IP_IO_IP_HEADER       IpHdr;      ///< IP header of the received packet\r
+  UINT32                IpHdrLen;   ///< IP header length of the received packet. \r
+                                    ///< For IPv6, it includes the IP6 header \r
+                                    ///< length and extension header length. For\r
+                                    ///< IPv4, it includes the IP4 header length\r
+                                    ///< and options length.\r
   UINT8                 IpVersion;  ///< The IP version of the received packet\r
 } EFI_NET_SESSION_DATA;\r
 \r
index c94a79c4dc7f62df11a155d7cf7ca1442af27c22..4df49a5e7bbbdb4310f238516dbcb5576be063fc 100644 (file)
@@ -1057,6 +1057,7 @@ IpIoListenHandlerDpc (
   Session.Source.Addr[0] = EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress);\r
   Session.Dest.Addr[0]   = EFI_IP4 (RxData->Ip4RxData.Header->DestinationAddress);\r
   Session.IpHdr.Ip4Hdr   = RxData->Ip4RxData.Header;\r
+  Session.IpHdrLen       = RxData->Ip4RxData.HeaderLength;\r
   Session.IpVersion      = IP_VERSION_4;\r
   } else {\r
 \r
@@ -1093,6 +1094,7 @@ IpIoListenHandlerDpc (
       sizeof(EFI_IPv6_ADDRESS)\r
       );\r
     Session.IpHdr.Ip6Hdr = RxData->Ip6RxData.Header;\r
+    Session.IpHdrLen     = RxData->Ip6RxData.HeaderLength;\r
     Session.IpVersion    = IP_VERSION_6;\r
   } \r
 \r