/** @file\r
Provide IPsec Key Exchange (IKE) service general interfaces.\r
\r
- Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
IN EFI_IP_ADDRESS *RemoteIp\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_IP4_CONFIG_PROTOCOL *Ip4Cfg;\r
- EFI_IP4_IPCONFIG_DATA *Ip4CfgData;\r
- UINTN BufSize;\r
- EFI_IP6_MODE_DATA Ip6ModeData;\r
- EFI_UDP6_PROTOCOL *Udp6;\r
+ EFI_STATUS Status;\r
+ EFI_IP4_CONFIG2_PROTOCOL *Ip4Cfg2;\r
+ EFI_IP4_CONFIG2_INTERFACE_INFO *IfInfo;\r
+ UINTN BufSize;\r
+ EFI_IP6_MODE_DATA Ip6ModeData;\r
+ EFI_UDP6_PROTOCOL *Udp6;\r
\r
Status = EFI_SUCCESS;\r
- Ip4CfgData = NULL;\r
+ IfInfo = NULL;\r
BufSize = 0;\r
\r
//\r
//\r
Status = gBS->HandleProtocol (\r
UdpService->NicHandle,\r
- &gEfiIp4ConfigProtocolGuid,\r
- (VOID **) &Ip4Cfg\r
+ &gEfiIp4Config2ProtocolGuid,\r
+ (VOID **) &Ip4Cfg2\r
);\r
\r
if (EFI_ERROR (Status)) {\r
goto ON_EXIT;\r
}\r
\r
- Status = Ip4Cfg->GetData (Ip4Cfg, &BufSize, NULL);\r
+ //\r
+ // Get the interface information size.\r
+ //\r
+ Status = Ip4Cfg2->GetData (\r
+ Ip4Cfg2,\r
+ Ip4Config2DataTypeInterfaceInfo,\r
+ &BufSize,\r
+ NULL\r
+ );\r
\r
if (EFI_ERROR (Status) && Status != EFI_BUFFER_TOO_SMALL) {\r
goto ON_EXIT;\r
}\r
\r
- Ip4CfgData = AllocateZeroPool (BufSize);\r
+ IfInfo = AllocateZeroPool (BufSize);\r
\r
- if (Ip4CfgData == NULL) {\r
+ if (IfInfo == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto ON_EXIT;\r
}\r
\r
- Status = Ip4Cfg->GetData (Ip4Cfg, &BufSize, Ip4CfgData);\r
+ //\r
+ // Get the interface info.\r
+ //\r
+ Status = Ip4Cfg2->GetData (\r
+ Ip4Cfg2,\r
+ Ip4Config2DataTypeInterfaceInfo,\r
+ &BufSize,\r
+ IfInfo\r
+ );\r
+ \r
if (EFI_ERROR (Status)) {\r
goto ON_EXIT;\r
}\r
\r
CopyMem (\r
&UdpService->DefaultAddress.v4,\r
- &Ip4CfgData->StationAddress,\r
+ &IfInfo->StationAddress,\r
sizeof (EFI_IPv4_ADDRESS)\r
);\r
\r
UdpService->IsConfigured = TRUE;\r
\r
ON_EXIT:\r
- if (Ip4CfgData != NULL) {\r
- FreePool (Ip4CfgData);\r
+ if (IfInfo != NULL) {\r
+ FreePool (IfInfo);\r
}\r
\r
return Status;\r
# packet-level security for IP datagram. It provides the IP packet protection via\r
# ESP and it supports IKEv2 for key negotiation.\r
#\r
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
PcdLib\r
\r
[Protocols]\r
- gEfiIp4ConfigProtocolGuid ## SOMETIMES_CONSUMES\r
+ gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES\r
gEfiUdp4ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES \r
gEfiUdp4ProtocolGuid ## SOMETIMES_CONSUMES\r
gEfiUdp6ServiceBindingProtocolGuid ## SOMETIMES_CONSUMES \r