]>
Commit | Line | Data |
---|---|---|
d8ab884f VO |
1 | // /**\r |
2 | //\r | |
3 | // (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r | |
4 | // Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>\r | |
5 | // Copyright (c) 2020, Broadcom. All rights reserved.<BR>\r | |
6 | // SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | //\r | |
8 | // Module Name:\r | |
9 | //\r | |
10 | // Http.uni\r | |
11 | //\r | |
12 | // Abstract:\r | |
13 | //\r | |
14 | // String definitions for UEFI Shell HTTP command\r | |
15 | //\r | |
16 | //\r | |
17 | // **/\r | |
18 | \r | |
19 | /=#\r | |
20 | \r | |
21 | #langdef en-US "english"\r | |
22 | \r | |
23 | #string STR_GEN_TOO_MANY #language en-US "%H%s%N: Too many arguments. Try help http.\r\n"\r | |
24 | #string STR_GEN_TOO_FEW #language en-US "%H%s%N: Too few arguments. Try help http.\r\n"\r | |
25 | #string STR_GEN_PARAM_INV #language en-US "%H%s%N: Invalid argument - '%H%s%N'. Try help http.\r\n"\r | |
26 | #string STR_GEN_PROBLEM #language en-US "%H%s%N: Unknown flag - '%H%s%N'. Try help http.\r\n"\r | |
27 | #string STR_GEN_FILE_OPEN_FAIL #language en-US "%H%s%N: Cannot open file - '%H%s%N'\r\n"\r | |
28 | #string STR_GEN_CRLF #language en-US "\r\n"\r | |
29 | \r | |
30 | #string STR_HTTP_ERR_NO_NIC #language en-US "No network interface card found.\r\n"\r | |
31 | #string STR_HTTP_ERR_NIC_NAME #language en-US "Failed to get the name of the network interface card number %d - %r\r\n"\r | |
32 | #string STR_HTTP_ERR_OPEN_PROTOCOL #language en-US "Unable to open HTTP protocol on '%H%s%N' - %r\r\n"\r | |
33 | #string STR_HTTP_ERR_CONFIGURE #language en-US "Unable to configure HTTP protocol on '%H%s%N' - %r\r\n"\r | |
34 | #string STR_HTTP_ERR_DOWNLOAD #language en-US "Unable to download the file '%H%s%N' on '%H%s%N' - %r\r\n"\r | |
35 | #string STR_HTTP_ERR_WRITE #language en-US "Unable to write into file '%H%s%N' - %r\r\n"\r | |
36 | #string STR_HTTP_ERR_NIC_NOT_FOUND #language en-US "Network Interface Card '%H%s%N' not found.\r\n"\r | |
37 | #string STR_HTTP_ERR_STATUSCODE #language en-US "\r'%H%s%N' reports '%s' for '%H%s%N' \r\n"\r | |
38 | #string STR_HTTP_DOWNLOADING #language en-US "Downloading '%H%s%N'\r\n"\r | |
39 | \r | |
40 | #string STR_GET_HELP_HTTP #language en-US ""\r | |
41 | ".TH http 0 "Download a file from HTTP server."\r\n"\r | |
42 | ".SH NAME\r\n"\r | |
43 | "Download a file from HTTP server.\r\n"\r | |
44 | ".SH SYNOPSIS\r\n"\r | |
45 | " \r\n"\r | |
46 | "HTTP [-i interface] [-l port] [-t timeout] [-s size] [-m] [-k]\r\n"\r | |
47 | " <URL> [localfilepath]\r\n"\r | |
48 | ".SH OPTIONS\r\n"\r | |
49 | " \r\n"\r | |
50 | " -i interface - Specifies an adapter name, i.e., eth0.\r\n"\r | |
51 | " -k Keep the downloaded file even if there was an error.\r\n"\r | |
52 | " If this parameter is not used, the file will be deleted.\r\n"\r | |
53 | " -l port - Specifies the local port number. Default value is 0\r\n"\r | |
54 | " and the port number is automatically assigned.\r\n"\r | |
55 | " -m Measure and report download time (in seconds). \r\n"\r | |
56 | " -s size The size of the download buffer for a chunk, in bytes.\r\n"\r | |
57 | " Default is 32K. Note that larger buffer does not imply\r\n"\r | |
58 | " better speed.\r\n"\r | |
59 | " -t timeout - The number of seconds to wait for completion of\r\n"\r | |
60 | " requests and responses. Default is 0 which is 'automatic'.\r\n"\r | |
61 | " %HURL%N\r\n"\r | |
62 | " Two types of providing of URLs are supported:\r\n"\r | |
63 | " 1. tftp-like, where host and http_uri are separate parameters\r\n"\r | |
64 | " (example: host /host_uri), and\r\n\"\r | |
65 | " 2. wget-like, where host and host_uri is one parameter.\r\n"\r | |
66 | " (example: host/host_uri)\r\n"\r | |
67 | "\r\n"\r | |
68 | " host - Specifies HTTP Server address.\r\n\r | |
69 | Can be either IPv4 address or 'http (or https)://addr'\r\n\r | |
70 | Can use addresses resolvable by DNS as well. \r\n\r | |
71 | Port can be specified after ':' if needed. \r\n\r | |
72 | By default port 80 is used.\r\n"\r | |
73 | " http_uri - HTTP server URI to download the file.\r\n"\r | |
74 | "\r\n"\r | |
75 | " localfilepath - Local destination file path.\r\n"\r | |
76 | ".SH DESCRIPTION\r\n"\r | |
77 | " \r\n"\r | |
78 | "NOTES:\r\n"\r | |
79 | " 1. The HTTP command allows geting of the file specified by its 'http_uri'\r\n"\r | |
80 | " path from the HTTP server specified by its 'host' IPv4 address. If the\r\n"\r | |
81 | " optional 'localfilepath' parameter is provided, the downloaded file is\r\n"\r | |
82 | " stored locally using the provided file path. If the local file path is\r\n"\r | |
83 | " not specified, the file is stored in the current directory using the file\r\n"\r | |
84 | " server's name.\r\n"\r | |
85 | " 2. Before using the HTTP command, the network interface intended to be\r\n"\r | |
86 | " used to retrieve the file must be configured. This configuration may be\r\n"\r | |
87 | " done by means of the 'ifconfig' command.\r\n"\r | |
88 | " 3. If a network interface is defined with the '-i' option then only this\r\n"\r | |
89 | " interface will be used to retrieve the remote file. Otherwise, all network\r\n"\r | |
90 | " interfaces are tried in the order they have been discovered during the\r\n"\r | |
91 | " DXE phase.\r\n"\r | |
92 | ".SH EXAMPLES\r\n"\r | |
93 | " \r\n"\r | |
94 | "EXAMPLES:\r\n"\r | |
95 | " * To get the file "dir1/file1.dat" from the HTTP server 192.168.1.1, port 8080, and\r\n"\r | |
96 | " store it as file2.dat in the current directory (use tftp-like URL format) :\r\n"\r | |
97 | " fs0:\> http 192.168.1.1:8080 dir1/file1.dat file2.dat\r\n"\r | |
98 | " * To get the file /image.bin via HTTPS from server 192.168.1.1 at port 443 \r\n"\r | |
99 | " (default HTTPS port), and store it in the current directory: \r\n"\r | |
100 | " fs0:\> http https://192.168.1.1 image.bin\r\n"\r | |
101 | " To get an index file from http://google.com and place it into the \r\n"\r | |
102 | " current directory:\r\n"\r | |
103 | " fs0:\> http google.com index.html\r\n"\r | |
104 | ".SH RETURNVALUES\r\n"\r | |
105 | " \r\n"\r | |
106 | "RETURN VALUES:\r\n"\r | |
107 | " SHELL_SUCCESS The action was completed as requested.\r\n"\r | |
108 | " SHELL_INVALID_PARAMETER One of the passed-in parameters was incorrectly\r\n"\r | |
109 | " formatted or its value was out of bounds.\r\n"\r | |
110 | " HTTP_ERROR No EFI errors, but the server reported a status code\r\n"\r | |
111 | " which should be treated as an error. If an error body sent\r\n"\r | |
112 | " by the server, and -k parameter is on command line,\r | |
113 | " the file wil be saved either as localfilepath filename,\r\n"\r | |
114 | " or as an URI name in the current directory.\r\n"\r | |
115 | " If '/' is at the end of the URL, and no locafilepath filename\r\n"\r | |
116 | " is given on the command line, the file will be retrieved as\r\n"\r | |
117 | " index.html.\r\n"\r |