aboutsummaryrefslogtreecommitdiffstats
path: root/apps/http-proxy/main.cc
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2019-05-15 14:31:17 +0200
committerMauro Sardara <msardara@cisco.com>2019-05-15 15:26:20 +0200
commit31f349f4c4457344efcff20ccadfed53042891b1 (patch)
tree3158a7216fc3ede9beb603ef6267255238014de9 /apps/http-proxy/main.cc
parent8a4273ffe83b46bc018da58135427d40012282b8 (diff)
[HICN-196] Add mtu to command line parameters.
Change-Id: Ib6932c23408630be1ca98146d22ac494ad5e5077 Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'apps/http-proxy/main.cc')
-rw-r--r--apps/http-proxy/main.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/apps/http-proxy/main.cc b/apps/http-proxy/main.cc
index 0dedbd8a7..fe1bda5de 100644
--- a/apps/http-proxy/main.cc
+++ b/apps/http-proxy/main.cc
@@ -19,9 +19,9 @@ using namespace transport;
int usage(char* program) {
std::cerr << "ICN Plugin not loaded!" << std::endl;
- std::cerr << "USAGE: " << program
+ std::cerr << "USAGE: " << program << "\n"
<< "[HTTP_PREFIX] -a [SERVER_IP_ADDRESS] "
- "-p [SERVER_PORT] -c [CACHE_SIZE]"
+ "-p [SERVER_PORT] -c [CACHE_SIZE] -m [MTU]"
<< std::endl;
return -1;
}
@@ -31,9 +31,10 @@ int main(int argc, char** argv) {
std::string ip_address("127.0.0.1");
std::string port("80");
std::string cache_size("50000");
+ std::string mtu("1500");
int opt;
- while ((opt = getopt(argc, argv, "a:p:c:")) != -1) {
+ while ((opt = getopt(argc, argv, "a:p:c:m:")) != -1) {
switch (opt) {
case 'a':
prefix = optarg;
@@ -44,6 +45,9 @@ int main(int argc, char** argv) {
case 'c':
cache_size = optarg;
break;
+ case 'm':
+ mtu = optarg;
+ break;
case 'h':
default:
return usage(argv[0]);
@@ -58,9 +62,10 @@ int main(int argc, char** argv) {
}
std::cout << "Connecting to " << ip_address << " port " << port
- << " Cache size " << cache_size << " Prefix " << prefix
- << std::endl;
- transport::AsyncConsumerProducer proxy(prefix, ip_address, port, cache_size);
+ << " Cache size " << cache_size << " Prefix " << prefix << " MTU "
+ << mtu << std::endl;
+ transport::AsyncConsumerProducer proxy(prefix, ip_address, port, cache_size,
+ mtu);
proxy.run();