summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c6
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c12
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h14
3 files changed, 21 insertions, 11 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
index 89977e6690..cf7b7b566e 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
@@ -1,7 +1,7 @@
/** @file
Interface routines for PxeBc.
-Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1435,7 +1435,9 @@ EfiPxeBcUdpWrite (
&Private->StationIp.v4,
&Private->SubnetMask.v4,
&Private->GatewayIp.v4,
- &Private->CurrentUdpSrcPort
+ &Private->CurrentUdpSrcPort,
+ Private->Mode.TTL,
+ Private->Mode.ToS
);
if (EFI_ERROR (Status)) {
Private->CurrentUdpSrcPort = 0;
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
index 3016da7324..79c9a67f9e 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
@@ -1,7 +1,7 @@
/** @file
Support routines for PxeBc.
-Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -42,6 +42,8 @@ PxeBcCommonNotify (
@param SubnetMask Pointer to the subnetmask of the station ip address.
@param Gateway Pointer to the gateway ip address.
@param SrcPort Pointer to the srouce port of the station.
+ @param TTL The time to live field of the IP header.
+ @param ToS The type of service field of the IP header.
@retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
@@ -65,7 +67,9 @@ PxeBcConfigureUdpWriteInstance (
IN EFI_IPv4_ADDRESS *StationIp,
IN EFI_IPv4_ADDRESS *SubnetMask,
IN EFI_IPv4_ADDRESS *Gateway,
- IN OUT UINT16 *SrcPort
+ IN OUT UINT16 *SrcPort,
+ IN UINT8 TTL,
+ IN UINT8 ToS
)
{
EFI_UDP4_CONFIG_DATA Udp4CfgData;
@@ -74,8 +78,8 @@ PxeBcConfigureUdpWriteInstance (
ZeroMem (&Udp4CfgData, sizeof (Udp4CfgData));
Udp4CfgData.ReceiveTimeout = PXEBC_DEFAULT_LIFETIME;
- Udp4CfgData.TypeOfService = DEFAULT_ToS;
- Udp4CfgData.TimeToLive = DEFAULT_TTL;
+ Udp4CfgData.TypeOfService = ToS;
+ Udp4CfgData.TimeToLive = TTL;
Udp4CfgData.AllowDuplicatePort = TRUE;
CopyMem (&Udp4CfgData.StationAddress, StationIp, sizeof (*StationIp));
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
index 6f41aa671d..1082b3aa2e 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h
@@ -1,6 +1,6 @@
/** @file
Support routines for PxeBc.
-Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -32,13 +32,15 @@ PxeBcCommonNotify (
/**
This function initialize(or configure) the Udp4Write instance.
-
+
@param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.
@param StationIp Pointer to the station ip address.
@param SubnetMask Pointer to the subnetmask of the station ip address.
@param Gateway Pointer to the gateway ip address.
@param SrcPort Pointer to the srouce port of the station.
-
+ @param TTL The time to live field of the IP header.
+ @param ToS The type of service field of the IP header.
+
@retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@@ -53,7 +55,7 @@ PxeBcCommonNotify (
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance
was not opened.
@retval Others Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.
-
+
**/
EFI_STATUS
PxeBcConfigureUdpWriteInstance (
@@ -61,7 +63,9 @@ PxeBcConfigureUdpWriteInstance (
IN EFI_IPv4_ADDRESS *StationIp,
IN EFI_IPv4_ADDRESS *SubnetMask,
IN EFI_IPv4_ADDRESS *Gateway,
- IN OUT UINT16 *SrcPort
+ IN OUT UINT16 *SrcPort,
+ IN UINT8 TTL,
+ IN UINT8 ToS
);
/**
Convert number to ASCII value.