NetworkPkg: Support print help information using -? command.
v2: *Modify the logic of show SAD,SPD and PAD help info, include them in -? instead of follow -p command. Since Shell supports finding help information from resource section of application image. We modify the Shell application Under NetworkPkg to support print help information string using -? command. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
@@ -49,76 +49,6 @@
|
||||
|
||||
#string STR_IPSEC_CONFIG_INSERT_UNSUPPORT #language en-US "%s: Policy entry insertion not supported!\n"
|
||||
|
||||
#string STR_IPSEC_CONFIG_LINE_HELP #language en-US "Displays or modifies the IPsec configuration"
|
||||
|
||||
#string STR_IPSEC_CONFIG_HELP #language en-US "Displays or modifies the current IPsec configuration.\n"
|
||||
"%HUsage: IpSecConfig [-p {SPD|SAD|PAD}] [command] [options[parameters]]%N\n"
|
||||
"\n"
|
||||
"%H-p (SPD|SAD|PAD)%N required.point to certain policy database.\n"
|
||||
"%Hcommand%N:\n"
|
||||
" -a [options[parameters]] Add new policy entry.\n"
|
||||
" -i entryid [options[parameters]] Insert new policy entry before the one\n"
|
||||
" matched by the entryid.\n"
|
||||
" It's only supported on SPD policy database.\n"
|
||||
" -d entryid Delete the policy entry matched by the \n"
|
||||
" entryid.\n"
|
||||
" -e entryid [options[parameters]] Edit the policy entry matched by the\n"
|
||||
" entryid.\n"
|
||||
" -f Flush the entire policy database.\n"
|
||||
" -l List all entries for specified database.\n"
|
||||
" -enable Enable IPsec.\n"
|
||||
" -disable Disable IPsec.\n"
|
||||
" -status Show IPsec current status.\n"
|
||||
"%H[options[parametes]]%N depend on the type of policy database.Type\n "
|
||||
" 'IpSecConfig -p'followed by the database \n"
|
||||
" name, and then type ' -?'.\n"
|
||||
" e.g.: 'IpSecConfig -p SPD -?'\n"
|
||||
|
||||
#string STR_IPSEC_CONFIG_SPD_HELP #language en-US "Explain the %H[options[parametes]%N for %HSPD%N\n"
|
||||
"\n"
|
||||
"%H[options[parameters]]%N:\n"
|
||||
" --local localaddress optional local address\n"
|
||||
" --remote remoteaddress required remote address\n"
|
||||
" --proto (TCP|UDP|ICMP|...) required IP protocol\n"
|
||||
" --local-port port optional local port for tcp/udp protocol\n"
|
||||
" --remote-port port optional remote port for tcp/udp protocol\n"
|
||||
" --name name optional SPD name\n"
|
||||
" --action (Bypass|Discard|Protect) required \n"
|
||||
" required IPsec action\n"
|
||||
" --mode (Transport|Tunnel) optional IPsec mode, transport by default\n"
|
||||
" --ipsec-proto (AH|ESP) optional IPsec protocol, ESP by default\n"
|
||||
" --auth-algo (NONE|SHA1HMAC) optional authentication algorithm\n"
|
||||
" --encrypt-algo(NONE|DESCBC|3DESCBC)optional encryption algorithm\n"
|
||||
" --tunnel-local tunnellocaladdr optional tunnel local address(only for tunnel mode)\n"
|
||||
" --tunnel-remote tunnelremoteaddr optional tunnel remote address(only for tunnel mode)\n"
|
||||
"\n"
|
||||
|
||||
#string STR_IPSEC_CONFIG_SAD_HELP #language en-US "Explain the %H[options[parameters]]%N for %HSAD%N\n"
|
||||
"\n"
|
||||
"%H[options[parameters]]%N:\n"
|
||||
" --spi spi required SPI value\n"
|
||||
" --ipsec-proto (AH|ESP) required IPsec protocol\n"
|
||||
" --local localaddress optional local address\n"
|
||||
" --remote remoteaddress required destination address\n"
|
||||
" --auth-algo (NONE|SHA1HMAC) required for AH. authentication algorithm\n"
|
||||
" --auth-key key required for AH. key for authentication\n"
|
||||
" --encrypt-algo (NONE|DESCBC|3DESCBC) required for ESP. encryption algorithm\n"
|
||||
" --encrypt-key key required for ESP. key for encryption\n"
|
||||
" --mode (Transport|Tunnel) optional IPsec mode, transport by default\n"
|
||||
" --tunnel-dest tunneldestaddr optional tunnel destination address(only for tunnel mode)\n"
|
||||
" --tunnel-source tunnelsourceaddr optional tunnel source address(only for tunnel mode)\n"
|
||||
"\n"
|
||||
|
||||
#string STR_IPSEC_CONFIG_PAD_HELP #language en-US "Explain the %H[options[parameters]]%N for %HPAD%N\n"
|
||||
"\n"
|
||||
"%H[options[parameters]]%N:\n"
|
||||
" --peer-address address required peer address\n"
|
||||
" --auth-proto (IKEv1|IKEv2) optional IKE protocol, IKEv1 by\n"
|
||||
" default\n"
|
||||
" --auth-method (PreSharedSecret|Certificates) required authentication method\n"
|
||||
" --auth-data authdata required data for authentication\n"
|
||||
"\n"
|
||||
|
||||
#string STR_IPSEC_MISTAKEN_OPTIONS #language en-US "Mistaken Input. Please refer to %H"IpSecConfig -?"%N for more help information.\n"
|
||||
|
||||
#string STR_IPSEC_REDUNDANCY_MANY #language en-US "%s has one redundancy option: %H%s%N\n"
|
||||
@@ -139,3 +69,65 @@
|
||||
|
||||
#string STR_IPSEC_CONFIG_DISABLE_FAILED #language en-US "Error: Disable IPsec failed !\n"
|
||||
|
||||
#string STR_IPSEC_CONFIG_HELP #language en-US ""
|
||||
".TH IpSecConfig 0 "Displays or modifies the current IPsec configuration."\r\n"
|
||||
".SH NAME\r\n"
|
||||
"Displays or modifies the current IPsec configuration.\r\n"
|
||||
".SH SYNOPSIS\r\n"
|
||||
" \r\n"
|
||||
"%HIpSecConfig [-p {SPD|SAD|PAD}] [command] [options[parameters]]\r\n"
|
||||
".SH OPTIONS\r\n"
|
||||
" \r\n"
|
||||
"%H-p (SPD|SAD|PAD)%N required.point to certain policy database.\r\n"
|
||||
" \r\n"
|
||||
"%Hcommand%N:\r\n"
|
||||
" -a [options[parameters]] Add new policy entry.\r\n"
|
||||
" -i entryid [options[parameters]] Insert new policy entry before the one\r\n"
|
||||
" matched by the entryid.\r\n"
|
||||
" It's only supported on SPD policy database.\r\n"
|
||||
" -d entryid Delete the policy entry matched by the \r\n"
|
||||
" entryid.\r\n"
|
||||
" -e entryid [options[parameters]] Edit the policy entry matched by the\r\n"
|
||||
" entryid.\r\n"
|
||||
" -f Flush the entire policy database.\r\n"
|
||||
" -l List all entries for specified database.\r\n"
|
||||
" -enable Enable IPsec.\r\n"
|
||||
" -disable Disable IPsec.\r\n"
|
||||
" -status Show IPsec current status.\r\n"
|
||||
" \r\n"
|
||||
"%H[options[parameters]]%N for %HSPD%N:\r\n"
|
||||
" --local localaddress optional local address\r\n"
|
||||
" --remote remoteaddress required remote address\r\n"
|
||||
" --proto (TCP|UDP|ICMP|...) required IP protocol\r\n"
|
||||
" --local-port port optional local port for tcp/udp protocol\r\n"
|
||||
" --remote-port port optional remote port for tcp/udp protocol\r\n"
|
||||
" --name name optional SPD name\r\n"
|
||||
" --action (Bypass|Discard|Protect) required \r\n"
|
||||
" required IPsec action\r\n"
|
||||
" --mode (Transport|Tunnel) optional IPsec mode, transport by default\r\n"
|
||||
" --ipsec-proto (AH|ESP) optional IPsec protocol, ESP by default\r\n"
|
||||
" --auth-algo (NONE|SHA1HMAC) optional authentication algorithm\r\n"
|
||||
" --encrypt-algo(NONE|DESCBC|3DESCBC)optional encryption algorithm\r\n"
|
||||
" --tunnel-local tunnellocaladdr optional tunnel local address(only for tunnel mode)\r\n"
|
||||
" --tunnel-remote tunnelremoteaddr optional tunnel remote address(only for tunnel mode)\r\n"
|
||||
" \r\n"
|
||||
"%H[options[parameters]]%N for %HSAD%N:\r\n"
|
||||
" --spi spi required SPI value\r\n"
|
||||
" --ipsec-proto (AH|ESP) required IPsec protocol\r\n"
|
||||
" --local localaddress optional local address\r\n"
|
||||
" --remote remoteaddress required destination address\r\n"
|
||||
" --auth-algo (NONE|SHA1HMAC) required for AH. authentication algorithm\n"
|
||||
" --auth-key key required for AH. key for authentication\r\n"
|
||||
" --encrypt-algo (NONE|DESCBC|3DESCBC) required for ESP. encryption algorithm\r\n"
|
||||
" --encrypt-key key required for ESP. key for encryption\r\n"
|
||||
" --mode (Transport|Tunnel) optional IPsec mode, transport by default\r\n"
|
||||
" --tunnel-dest tunneldestaddr optional tunnel destination address(only for tunnel mode)\r\n"
|
||||
" --tunnel-source tunnelsourceaddr optional tunnel source address(only for tunnel mode)\r\n"
|
||||
" \r\n"
|
||||
"%H[options[parameters]]%N for %HPAD%N:\r\n"
|
||||
" --peer-address address required peer address\r\n"
|
||||
" --auth-proto (IKEv1|IKEv2) optional IKE protocol, IKEv1 by\r\n"
|
||||
" default\r\n"
|
||||
" --auth-method (PreSharedSecret|Certificates) required authentication method\r\n"
|
||||
" --auth-data authdata required data for authentication\r\n"
|
||||
" \r\n"
|
||||
|
Reference in New Issue
Block a user