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
This commit is contained in:
tye
2009-11-11 07:06:27 +00:00
parent 0424593539
commit a1503a32a8
17 changed files with 400 additions and 25 deletions

View File

@@ -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
@@ -1764,6 +1768,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;
}