blob: 22497e02453abdafeb81158e09625eb8e12a314e [file] [log] [blame]
Spyridon Mastorakis95be5092015-08-26 15:07:37 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2011-2015 Regents of the University of California.
4 *
5 * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and
6 * contributors.
7 *
8 * ndnSIM is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
11 *
12 * ndnSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * ndnSIM, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 **/
19
20#include "ndn-cxx-simple/real-app.hpp"
21#include "ndn-cxx-simple/real-app-starter.hpp"
22
23#include "ns3/core-module.h"
24#include "ns3/network-module.h"
25#include "ns3/ndnSIM-module.h"
26
27namespace ns3 {
28
29NS_OBJECT_ENSURE_REGISTERED(RealAppStarter);
30
31int
32main(int argc, char* argv[])
33{
34 CommandLine cmd;
35 cmd.Parse(argc, argv);
36
37 Ptr<Node> node = CreateObject<Node>();
38
39 ndn::StackHelper ndnHelper;
40 ndnHelper.Install(node);
41
42 ndn::AppHelper appHelper("RealAppStarter");
43 appHelper.Install(node)
44 .Start(Seconds(6.5));
45
46 Simulator::Stop(Seconds(20.0));
47
48 Simulator::Run();
49 Simulator::Destroy();
50
51 return 0;
52}
53
54} // namespace ns3
55
56int
57main(int argc, char* argv[])
58{
59 return ns3::main(argc, argv);
60}