summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-03-21 17:15:56 +0000
committerGerrit Code Review <gerrit@fd.io>2019-03-21 17:15:56 +0000
commitf88831fb8df34730141c728138c66698fc1d0ca7 (patch)
tree58cfb070c3257f09ae47df48cd391b3f3a983a91 /apps
parent972ccbeb3d6765c2add13b7b4da10c9fb6fb2c9c (diff)
parentd0111c2f8b5b73739f7193a79415e1d0bc8ee8c8 (diff)
Merge "[HICN-128] README utils and renaming of executables"
Diffstat (limited to 'apps')
-rw-r--r--apps/README.md23
-rw-r--r--apps/src/higet/higet.cc14
-rw-r--r--apps/src/http-server/http-server.cc18
3 files changed, 28 insertions, 27 deletions
diff --git a/apps/README.md b/apps/README.md
index 10a93f948..1311006f6 100644
--- a/apps/README.md
+++ b/apps/README.md
@@ -30,6 +30,7 @@ Basic dependencies:
- pthreads
- Libevent
- Libparc
+- Libcurl
## Executables ##
@@ -41,14 +42,10 @@ The command `higet` runs the higet application. higet can be executed
with the following options:
```
-higet [OPTION]... [URL]...
-
+higet [option]... [url]...
Options:
- -O filename write documents to FILE
- -S print server response
-Example:
- higet -O - http://origin/index.html
-
+-O <output_path> = write documents to <output_file>
+-S = print server response
```
### hicn-http-server ###
@@ -60,12 +57,12 @@ The command can be executed in the following way:
hicn-http-server [OPTIONS]
Options:
- -p path path to root foot folder
- -f confFile configuration file
- -o tcpPort tcp listener port
- -l webserverPrefix webserver prefix
- -x tcpProxyPrefix tcp proxy prefix
- -z hicnProxyPrefix hicn proxy prefix
+-p <root_folder_path> = path to root folder
+-f <coniguration_path> = configuration file path
+-o <tcp_port> = tcp listener port
+-l <webserver_prefix> = webserver prefix
+-x <tcp_proxy_prefix> = tcp proxy prefix
+-z <hicn_proxy_prefix> = hicn proxy prefix
```
## License ##
diff --git a/apps/src/higet/higet.cc b/apps/src/higet/higet.cc
index 58b582a9d..1d1379887 100644
--- a/apps/src/higet/higet.cc
+++ b/apps/src/higet/higet.cc
@@ -87,14 +87,12 @@ void processResponse(Configuration &conf,
}
void usage(char *program_name) {
- std::cerr << "USAGE:" << std::endl;
- std::cerr << "\t" << program_name << " [OPTION]... [URL]..." << std::endl;
- std::cerr << "OPTIONS:" << std::endl;
- std::cerr << "\t"
- << "-O filename write documents to FILE" << std::endl;
- std::cerr << "\t"
- << "-S print server response" << std::endl;
- std::cerr << "EXAMPLE:" << std::endl;
+ std::cerr << "usage:" << std::endl;
+ std::cerr << program_name << " [option]... [url]..." << std::endl;
+ std::cerr << program_name << "options:" << std::endl;
+ std::cerr << "-O <output_path> = write documents to <output_file>" << std::endl;
+ std::cerr << "-S = print server response" << std::endl;
+ std::cerr << "example:" << std::endl;
std::cerr << "\t" << program_name << " -O - http://origin/index.html"
<< std::endl;
exit(EXIT_FAILURE);
diff --git a/apps/src/http-server/http-server.cc b/apps/src/http-server/http-server.cc
index f65734bae..ec6aa19a1 100644
--- a/apps/src/http-server/http-server.cc
+++ b/apps/src/http-server/http-server.cc
@@ -166,13 +166,19 @@ void afterSignal(HttpServer *webServer, const std::error_code &errorCode) {
}
void usage(const char *programName) {
- cerr << programName
- << " [-p PATH_TO_ROOT_FOOT_FOLDER] [-f CONFIGURATION_FILE] [-o "
- "TCP_LISTEN_PORT] [-l WEBSERVER_PREFIX] [-x TCP_PROXY_ADDRESS] [-z "
- "ICN_PROXY_PREFIX]\n"
- << "Web server able to publish content and generate http responses over "
- "TCP/ICN\n"
+ cerr << "usage: " << programName << " [options]" << endl;
+ cerr << programName << " options:" << endl;
+ cerr << "-p <root_folder_path> = path to root folder" << endl;
+ cerr << "-f <coniguration_path> = configuration file path" << endl;
+ cerr << "-o <tcp_port> = tcp listener port" << endl;
+ cerr << "-l <webserver_prefix> = webserver prefix" << endl;
+ cerr << "-x <tcp_proxy_prefix> = tcp proxy prefix" << endl;
+ cerr << "-z <hicn_proxy_prefix> = hicn proxy prefix" << endl;
+ cerr << endl;
+ cerr << "Web server able to publish content and generate http responses over "
+ "TCP/ICN"
<< endl;
+ cerr << endl;
exit(1);
}