ShellPkg/DP: Add more check for input parameters
[mirror_edk2.git] / ShellPkg / DynamicCommand / TftpDynamicCommand / Tftp.uni
CommitLineData
e329f98b
JJ
1// /**\r
2//\r
75351daf 3// (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
b6009460 4// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>\r
e329f98b
JJ
5// This program and the accompanying materials\r
6// are licensed and made available under the terms and conditions of the BSD License\r
7// which accompanies this distribution. The full text of the license may be found at\r
8// http://opensource.org/licenses/bsd-license.php\r
9//\r
10// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12//\r
13// Module Name:\r
14//\r
b6009460 15// Tftp.uni\r
e329f98b
JJ
16//\r
17// Abstract:\r
18//\r
19// String definitions for UEFI Shell TFTP command\r
20//\r
21//\r
22// **/\r
23\r
24/=#\r
25\r
26#langdef en-US "english"\r
27\r
28#string STR_GEN_TOO_MANY #language en-US "%H%s%N: Too many arguments\r\n"\r
29#string STR_GEN_TOO_FEW #language en-US "%H%s%N: Too few arguments\r\n"\r
30#string STR_GEN_PARAM_INV #language en-US "%H%s%N: Invalid argument - '%H%s%N'\r\n"\r
31#string STR_GEN_PROBLEM #language en-US "%H%s%N: Unknown flag - '%H%s%N'\r\n"\r
32#string STR_GEN_FILE_OPEN_FAIL #language en-US "%H%s%N: Cannot open file - '%H%s%N'\r\n"\r
33#string STR_GEN_CRLF #language en-US "\r\n"\r
34\r
35#string STR_TFTP_ERR_NO_NIC #language en-US "No network interface card found.\r\n"\r
36#string STR_TFTP_ERR_NIC_NAME #language en-US "Failed to get the name of the network interface card number %d - %r\r\n"\r
37#string STR_TFTP_ERR_OPEN_PROTOCOL #language en-US "Unable to open MTFTP4 protocol on '%H%s%N' - %r\r\n"\r
38#string STR_TFTP_ERR_CONFIGURE #language en-US "Unable to configure MTFTP4 protocol on '%H%s%N' - %r\r\n"\r
39#string STR_TFTP_ERR_FILE_SIZE #language en-US "Unable to get the size of the file '%H%s%N' on '%H%s%N' - %r\r\n"\r
40#string STR_TFTP_ERR_DOWNLOAD #language en-US "Unable to download the file '%H%s%N' on '%H%s%N' - %r\r\n"\r
41#string STR_TFTP_ERR_WRITE #language en-US "Unable to write into file '%H%s%N' - %r\r\n"\r
42#string STR_TFTP_ERR_NIC_NOT_FOUND #language en-US "Network Interface Card '%H%s%N' not found.\r\n"\r
43#string STR_TFTP_DOWNLOADING #language en-US "Downloading the file '%H%s%N'\r\n"\r
44#string STR_TFTP_STRING #language en-US "%s"\r
45\r
46#string STR_GET_HELP_TFTP #language en-US ""\r
47".TH tftp 0 "Download a file from TFTP server."\r\n"\r
48".SH NAME\r\n"\r
49"Download a file from TFTP server.\r\n"\r
50".SH SYNOPSIS\r\n"\r
51" \r\n"\r
52"TFTP [-i interface] [-l <port>] [-r <port>] [-c <retry count>] [-t <timeout>]\r\n"\r
2be45bfe 53" [-s <block size>] host remotefilepath [localfilepath]\r\n"\r
e329f98b
JJ
54".SH OPTIONS\r\n"\r
55" \r\n"\r
56" -i interface - Specifies an adapter name, i.e., eth0.\r\n"\r
57" -l port - Specifies the local port number. Default value is 0\r\n"\r
58" and the port number is automatically assigned.\r\n"\r
59" -r port - Specifies the remote port number. Default value is 69.\r\n"\r
60" -c <retry count> - The number of times to transmit request packets and\r\n"\r
61" wait for a response. The default value is 6.\r\n"\r
62" -t <timeout> - The number of seconds to wait for a response after\r\n"\r
63" sending a request packet. Default value is 4s.\r\n"\r
2be45bfe
FS
64" -s <block size> - Specifies the TFTP blksize option as defined in RFC 2348.\r\n"\r
65" Valid range is between 8 and 65464, default value is 512.\r\n"\r
e329f98b
JJ
66" host - Specify TFTP Server IPv4 address.\r\n"\r
67" remotefilepath - TFTP server file path to download the file.\r\n"\r
68" localfilepath - Local destination file path.\r\n"\r
69".SH DESCRIPTION\r\n"\r
70" \r\n"\r
71"NOTES:\r\n"\r
72" 1. The TFTP command allows to get the file specified by its 'remotefilepath'\r\n"\r
73" path from the TFTP server specified by its 'host' IPv4 address. If the\r\n"\r
74" optional 'localfilepath' parameter is provided, the downloaded file is\r\n"\r
75" stored locally using the provided file path. If the local file path is\r\n"\r
76" not specified, the file is stored in the current directory using the file\r\n"\r
77" server's name.\r\n"\r
75351daf
TP
78" 2. Before using the TFTP command, the network interface intended to be\r\n"\r
79" used to retrieve the file must be configured. This configuration may be\r\n"\r
e329f98b
JJ
80" done by means of the 'ifconfig' command.\r\n"\r
81" 3. If a network interface is defined with the '-i' option then only this\r\n"\r
75351daf 82" interface will be used to retrieve the remote file. Otherwise, all network\r\n"\r
e329f98b
JJ
83" interfaces are tried in the order they have been discovered during the\r\n"\r
84" DXE phase.\r\n"\r
85".SH EXAMPLES\r\n"\r
86" \r\n"\r
87"EXAMPLES:\r\n"\r
88" * To get the file "dir1/file1.dat" from the TFTP server 192.168.1.1 and\r\n"\r
89" store it as file2.dat in the current directory :\r\n"\r
90" fs0:\> tftp 192.168.1.1 dir1/file1.dat file2.dat\r\n"\r
91".SH RETURNVALUES\r\n"\r
92" \r\n"\r
93"RETURN VALUES:\r\n"\r
94" SHELL_SUCCESS The action was completed as requested.\r\n"\r
95" SHELL_INVALID_PARAMETER One of the passed-in parameters was incorrectly\r\n"\r
96" formatted or its value was out of bounds.\r\n"\r
97\r