NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ndn-ip-faces-helper.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2 /*
3  * Copyright (c) 2013 University of California, Los Angeles
4  * Alexander Afanasyev
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
20  */
21 
22 #ifndef NDN_IP_FACES_HELPER_H
23 #define NDN_IP_FACES_HELPER_H
24 
25 #include "ns3/ptr.h"
26 #include "ns3/nstime.h"
27 #include "ns3/ipv4-address.h"
28 
29 namespace ns3 {
30 
31 class Node;
32 class NodeContainer;
33 class Channel;
34 
35 namespace ndn {
36 
42 {
43 public:
48  static void
49  Install (Ptr<Node> node);
50 
55  static void
56  Install (const NodeContainer &nodes);
57 
61  static void
62  InstallAll ();
63 
78  static void
79  CreateTcpFace (const Time &when, Ptr<Node> node, Ipv4Address address, const std::string &prefix, int16_t metric = 1);
80 
84  static void
85  CreateUdpFace (const Time &when, Ptr<Node> node, Ipv4Address address, const std::string &prefix, int16_t metric = 1);
86 };
87 
88 } // namespace ndn
89 } // namespace ns3
90 
91 #endif // NDN_IP_FACES_HELPER_H
Helper for NDN IP-based face creation.
static void CreateUdpFace(const Time &when, Ptr< Node > node, Ipv4Address address, const std::string &prefix, int16_t metric=1)
Create TCP face.
static void CreateTcpFace(const Time &when, Ptr< Node > node, Ipv4Address address, const std::string &prefix, int16_t metric=1)
Create TCP face.
static void Install(Ptr< Node > node)
Install IpFaceStack interface on a node.
static void InstallAll()
Install IpFaceStack interface on all nodes.