diff options
author | tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-11 07:06:27 +0000 |
---|---|---|
committer | tye <tye@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-11 07:06:27 +0000 |
commit | a1503a32a887c0b9a735613a7caf5d1493affd01 (patch) | |
tree | 4506a92ed3b6912deb774e90d825e346b5e0ef8a /MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | |
parent | 0424593539571162530df9f3179f5c6851a01577 (diff) | |
download | edk2-platforms-a1503a32a887c0b9a735613a7caf5d1493affd01.tar.xz |
1. Add Link MTU support to IP4 and TCP4 driver.
2. Integrate IPsec functionality to IP4 driver.
3. Move IP_VERSION_4/IP_VERSION_6 definition from IpIoLib to NetLib.
4. Move the Ip6/Udp6 protocol declaration from driver INF to Library INF (DxeIpIoLib and DxeUdpIoLib) for better readability.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9413 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 4788d403fe..bb5b0ef110 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -13,6 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "Ip4Impl.h"
+EFI_IPSEC_PROTOCOL *mIpSec = NULL;
+
/**
Gets the current operational settings for this instance of the EFI IPv4 Protocol driver.
@@ -404,6 +406,8 @@ EfiIp4GetModeData ( Ip4ModeData->RouteTable = NULL;
Ip4ModeData->RouteCount = 0;
+ Ip4ModeData->MaxPacketSize = IpSb->MaxPacketSize;
+
//
// return the current station address for this IP child. So,
// the user can get the default address through this. Some
@@ -1765,6 +1769,13 @@ Ip4FreeTxToken ( Wrap = (IP4_TXTOKEN_WRAP *) Context;
//
+ // Signal IpSecRecycleEvent to inform IPsec free the memory
+ //
+ if (Wrap->IpSecRecycleSignal != NULL) {
+ gBS->SignalEvent (Wrap->IpSecRecycleSignal);
+ }
+
+ //
// Find the token in the instance's map. EfiIp4Transmit put the
// token to the map. If that failed, NetMapFindKey will return NULL.
//
@@ -1947,12 +1958,12 @@ EfiIp4Transmit ( }
Head.Fragment = IP4_HEAD_FRAGMENT_FIELD (DontFragment, FALSE, 0);
- HeadLen = sizeof (IP4_HEAD) + ((TxData->OptionsLength + 3) &~0x03);
+ HeadLen = (TxData->OptionsLength + 3) & (~0x03);
//
// If don't fragment and fragment needed, return error
//
- if (DontFragment && (TxData->TotalDataLength + HeadLen > IpSb->SnpMode.MaxPacketSize)) {
+ if (DontFragment && (TxData->TotalDataLength + HeadLen > IpSb->MaxPacketSize)) {
Status = EFI_BAD_BUFFER_SIZE;
goto ON_EXIT;
}
|