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:
Zhang, Lubo
2016-02-29 14:25:50 +08:00
committed by Jiaxin Wu
parent fa848a4048
commit be6cd654eb
15 changed files with 325 additions and 214 deletions

View File

@@ -1,7 +1,7 @@
/** @file
String definitions for the Shell Ping6 application.
Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 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
@@ -32,17 +32,22 @@
#string STR_PING6_STAT #language en-US "\n%d packets transmitted, %d received, %d%% packet loss, time %dms\n"
#string STR_PING6_RTT #language en-US "\nRtt(round trip time) min=%dms max=%dms avg=%dms\n"
#string STR_PING6_LINE_HELP #language en-US "Ping a target machine with UEFI IPv6 network stack"
#string STR_PING6_HELP #language en-US "Ping a target machine with UEFI IPv6 network stack.\n\n"
"Usage: Ping6 [-l size] [-n count] [-s SourceIp] TargetIp\n"
" Use ESC and Ctrl+C to interrupt Ping6 process.\n"
"\n"
"Options:\n"
" -l size Send buffer size, in bytes(default=16, min=16, max=32768).\n"
" -n count Send request count, (default=10, min=1, max=10000).\n"
" -s SourceIp Source IPv6 address.\n"
" TargetIp Target IPv6 address.\n"
" -? Help document.\n"
"\n"
"Examples:\n"
" Ping6 -s 2002::1 2002::2 -l 1000 -n 5\n"
" Ping6 2002::2 -l 1000\n"
#string STR_PING6_HELP #language en-US ""
".TH Ping6 0 "Ping a target machine with UEFI IPv6 network stack."\r\n"
".SH NAME\r\n"
"Ping a target machine with UEFI IPv6 network stack.\r\n"
".SH SYNOPSIS\r\n"
" \r\n"
"Ping6 [-l size] [-n count] [-s SourceIp] TargetIp\r\n"
".SH OPTIONS\r\n"
" \r\n"
" -l size Send buffer size, in bytes(default=16, min=16, max=32768).\r\n"
" -n count Send request count, (default=10, min=1, max=10000).\r\n"
" -s SourceIp Source IPv6 address.\r\n"
" TargetIp Target IPv6 address.\r\n"
".SH EXAMPLES\r\n"
" \r\n"
"Examples:\r\n"
" Ping6 -s 2002::1 2002::2 -l 1000 -n 5\r\n"
" Ping6 2002::2 -l 1000\r\n"