/** @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
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
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