blob: 70bedeeb03be3ba5a614dfc58158a9341b639416 [file] [log] [blame]
Andrea Tosatto672b9a72016-01-05 16:18:20 +01001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Davide Pesavento44b3b232017-12-23 16:58:25 -05002/*
schneiderklaus8ff3abd2019-03-12 22:15:12 -07003 * Copyright (c) 2016-2019, Regents of the University of California,
Davide Pesavento44b3b232017-12-23 16:58:25 -05004 * Colorado State University,
5 * University Pierre & Marie Curie, Sorbonne University.
Andrea Tosatto672b9a72016-01-05 16:18:20 +01006 *
7 * This file is part of ndn-tools (Named Data Networking Essential Tools).
8 * See AUTHORS.md for complete list of ndn-tools authors and contributors.
9 *
10 * ndn-tools is free software: you can redistribute it and/or modify it under the terms
11 * of the GNU General Public License as published by the Free Software Foundation,
12 * either version 3 of the License, or (at your option) any later version.
13 *
14 * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 * PURPOSE. See the GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
22 *
23 * @author Andrea Tosatto
24 * @author Davide Pesavento
25 */
26
27#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_OPTIONS_HPP
28#define NDN_TOOLS_CHUNKS_CATCHUNKS_OPTIONS_HPP
29
Davide Pesavento97a33b22019-10-17 22:10:47 -040030#include "core/common.hpp"
Andrea Tosatto672b9a72016-01-05 16:18:20 +010031
32namespace ndn {
33namespace chunks {
34
Davide Pesavento97a33b22019-10-17 22:10:47 -040035struct Options : noncopyable
Andrea Tosatto672b9a72016-01-05 16:18:20 +010036{
Davide Pesavento97a33b22019-10-17 22:10:47 -040037 // Common options
Davide Pesavento0da1f442019-07-26 17:38:13 -040038 time::milliseconds interestLifetime = DEFAULT_INTEREST_LIFETIME;
schneiderklaus8ff3abd2019-03-12 22:15:12 -070039 int maxRetriesOnTimeoutOrNack = 15;
Davide Pesavento44b3b232017-12-23 16:58:25 -050040 bool mustBeFresh = false;
Davide Pesaventof6991e12018-01-08 20:58:50 -050041 bool isQuiet = false;
Davide Pesavento44b3b232017-12-23 16:58:25 -050042 bool isVerbose = false;
Davide Pesavento97a33b22019-10-17 22:10:47 -040043
44 // Fixed pipeline options
45 size_t maxPipelineSize = 1;
46
47 // Adaptive pipeline common options
48 double initCwnd = 1.0; ///< initial congestion window size
49 double initSsthresh = std::numeric_limits<double>::max(); ///< initial slow start threshold
50 time::milliseconds rtoCheckInterval{10}; ///< interval for checking retransmission timer
51 bool ignoreCongMarks = false; ///< disable window decrease after receiving congestion mark
52 bool disableCwa = false; ///< disable conservative window adaptation
53
54 // AIMD pipeline options
55 double aiStep = 1.0; ///< AIMD additive increase step (in segments)
56 double mdCoef = 0.5; ///< AIMD multiplicative decrease factor
57 bool resetCwndToInit = false; ///< reduce cwnd to initCwnd when loss event occurs
58
59 // Cubic pipeline options
60 double cubicBeta = 0.7; ///< cubic multiplicative decrease factor
61 bool enableFastConv = false; ///< use cubic fast convergence
Andrea Tosatto672b9a72016-01-05 16:18:20 +010062};
63
64} // namespace chunks
65} // namespace ndn
66
67#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_OPTIONS_HPP