blob: 98f593f820a3c278d484612ebaf0fb684240f658 [file] [log] [blame]
Philipp Moll55e2dd92020-02-20 09:59:27 +01001# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2#
3# Copyright (C) 2015-2020, 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
24from mininet.log import setLogLevel, info
25
26from minindn.minindn import Minindn
27from minindn.apps.app_manager import AppManager
28from minindn.util import MiniNDNCLI
29from minindn.apps.nfd import Nfd
30from minindn.apps.nlsr import Nlsr
31from minindn.apps.tshark import Tshark
32
33if __name__ == '__main__':
34 setLogLevel('info')
35
36 Minindn.cleanUp()
37 Minindn.verifyDependencies()
38
39 ndn = Minindn()
40
41 ndn.start()
42
43 info('Starting tshark logging on nodes\n')
44 tshark = AppManager(ndn, ndn.net.hosts, Tshark, logFolder="./log/", singleLogFile=False)
45
46 info('Starting NFD on nodes\n')
47 nfds = AppManager(ndn, ndn.net.hosts, Nfd)
48 info('Starting NLSR on nodes\n')
49 nlsrs = AppManager(ndn, ndn.net.hosts, Nlsr)
50
51 MiniNDNCLI(ndn.net)
52
53 ndn.stop()