/** @file\r
The main process for IpSecConfig application.\r
\r
- Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, 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
// --ipsec-proto\r
//\r
{ L"--spi", TypeValue },\r
- { L"--dest", TypeValue },\r
+ { L"--tunnel-dest", TypeValue },\r
+ { L"--tunnel-source", TypeValue },\r
{ L"--lookup-spi", TypeValue },\r
{ L"--lookup-ipsec-proto", TypeValue },\r
{ L"--lookup-dest", TypeValue },\r
EFI_IPSEC2_PROTOCOL *mIpSec;\r
EFI_IPSEC_CONFIG_PROTOCOL *mIpSecConfig;\r
EFI_HII_HANDLE mHiiHandle;\r
-EFI_GUID mEfiIpSecConfigGuid = EFI_IPSEC_CONFIG_GUID;\r
CHAR16 mAppName[] = L"IpSecConfig";\r
\r
//\r
// --ipsec-proto\r
//\r
{ L"--spi", 0, 0, BIT(1), 0 },\r
- { L"--dest", 0, 0, BIT(1), 0 },\r
+ { L"--tunnel-dest", 0, 0, BIT(1), 0 },\r
+ { L"--tunnel-source", 0, 0, BIT(1), 0 },\r
{ L"--lookup-spi", 0, 0, BIT(1), 0 },\r
{ L"--lookup-ipsec-proto", 0, 0, BIT(1), 0 },\r
{ L"--lookup-dest", 0, 0, BIT(1), 0 },\r
for (Node = GetFirstNode (ParamPackage); !IsNull (ParamPackage, Node); Node = GetNextNode (ParamPackage, Node)) {\r
if (((SHELL_PARAM_PACKAGE *) Node)->Name != NULL) {\r
//\r
- // Enumerate the check list that defines the conflicted attributes of each flag.\r
+ // Enumerate the check list that defines the conflicted attributes of each flag.\r
//\r
for (; Item->VarName != NULL; Item++) {\r
if (StrCmp (((SHELL_PARAM_PACKAGE *) Node)->Name, Item->VarName) == 0) {\r
goto Done;\r
}\r
\r
- Status = LocateProtocol (&gEfiIpSecProtocolGuid, (VOID **) &mIpSec);\r
+ Status = LocateProtocol (&gEfiIpSec2ProtocolGuid, (VOID **) &mIpSec);\r
if (EFI_ERROR (Status) || mIpSec == NULL) {\r
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_PROTOCOL_INEXISTENT), mHiiHandle, mAppName);\r
goto Done;\r
//\r
// Try to get policy database type.\r
//\r
- DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) -1;\r
+ DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) - 1;\r
ValueStr = ShellCommandLineGetValue (ParamPackage, L"-p");\r
if (ValueStr != NULL) {\r
DataType = (EFI_IPSEC_CONFIG_DATA_TYPE) MapStringToInteger (ValueStr, mMapPolicy);\r
}\r
\r
if (ShellCommandLineGetFlag (ParamPackage, L"-?")) {\r
- switch (DataType) {\r
- case (EFI_IPSEC_CONFIG_DATA_TYPE) -1:\r
- ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_HELP), mHiiHandle);\r
- break;\r
+ if (DataType == -1) {\r
+ ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_HELP), mHiiHandle);\r
+ goto Done;\r
+ }\r
\r
+ switch (DataType) {\r
case IPsecConfigDataTypeSpd:\r
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_SPD_HELP), mHiiHandle);\r
break;\r