Ashlesh Gawande | 6c86e30 | 2019-09-17 22:27:05 -0500 | [diff] [blame] | 1 | # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | # |
| 3 | # Copyright (C) 2015-2019, The University of Memphis, |
| 4 | # Arizona Board of Regents, |
| 5 | # Regents of the University of California. |
| 6 | # |
| 7 | # This file is part of Mini-NDN. |
| 8 | # See AUTHORS.md for a complete list of Mini-NDN authors and contributors. |
| 9 | # |
| 10 | # Mini-NDN is free software: you can redistribute it and/or modify |
| 11 | # it under the terms of the GNU General Public License as published by |
| 12 | # the Free Software Foundation, either version 3 of the License, or |
| 13 | # (at your option) any later version. |
| 14 | # |
| 15 | # Mini-NDN is distributed in the hope that it will be useful, |
| 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | # GNU General Public License for more details. |
| 19 | # |
| 20 | # You should have received a copy of the GNU General Public License |
| 21 | # along with Mini-NDN, e.g., in COPYING.md file. |
| 22 | # If not, see <http://www.gnu.org/licenses/>. |
| 23 | |
| 24 | import argparse |
| 25 | |
| 26 | def getParser(): |
| 27 | parser = argparse.ArgumentParser() |
| 28 | parser.add_argument('--ctime', type=int, default=60, |
| 29 | help='Specify convergence time for the topology (Default: 60 seconds)') |
| 30 | |
| 31 | parser.add_argument('--faces', type=int, default=3, |
| 32 | help='Specify number of max faces per prefix for NLSR 0-60') |
| 33 | |
| 34 | parser.add_argument('--routing', dest='routingType', default='link-state', |
| 35 | choices=['link-state', 'hr', 'dry'], |
| 36 | help='''Choose routing type, dry = link-state is used |
| 37 | but hr is calculated for comparision.''') |
| 38 | |
| 39 | parser.add_argument('--sync', dest='sync', default='psync', |
| 40 | choices=['chronosync', 'psync'], |
| 41 | help='choose the sync protocol to be used by NLSR.') |
| 42 | |
| 43 | parser.add_argument('--security', action='store_true', dest='security', |
| 44 | help='Enables NLSR security') |
| 45 | |
| 46 | parser.add_argument('--face-type', dest='faceType', default='udp', choices=['udp', 'tcp']) |
| 47 | |
| 48 | parser.add_argument('--no-cli', action='store_false', dest='isCliEnabled', |
| 49 | help='Run experiments and exit without showing the command line interface') |
| 50 | |
| 51 | parser.add_argument('--pct-traffic', dest='pctTraffic', type=float, default=1.0, |
| 52 | help='Specify the percentage of nodes each node should ping') |
| 53 | |
| 54 | parser.add_argument('--nPings', type=int, default=300, |
| 55 | help='Number of pings to perform between each node in the experiment') |
| 56 | |
| 57 | return parser |