-
Notifications
You must be signed in to change notification settings - Fork 6
Home
This project is an NS3 module for simulating the CCNx 1.0 protocols. You can find more information about the CCNx 1.0 Protocols and about NS3 simulator.
The purpose of this project is to provide an open-source implementation of the CCNx protocols written specifically for NS3 in C++. We follow the NS3 coding conventions. Due to our BSD-like license, we cannot contribute the code directly to the NS3 project, but we have made it easy to integrate.
Currently, the project is pre-alpha. The code is not usable for any realistic simulation yet. We're diligently pounding our keyboards and should have the first release soon. The first release will have this functionality:
- Implement the CCNx layer 3 protocol.
- Implement the IRTF ICNRG standard forwarded, as described in irtf-icnrg-ccnx-semantics and irtf-icnrg-ccnx-messages, but without caching (the content store).
- Implement a basic distance vector routing protocol that supports multiple anchors for the same prefix and equal cost multipath.
- An example consumer/producer application.
- A layer 4 "portal" implementation, similar to the Portal API used in the Linux code distribution. The CCNxPortal follows similar model to the NS3 Socket APIs with a portal factory aggregated to the NS3 node, so one can use the run time type identification system to instantiate portals.
- A CCNx stack helper and routing helpers to make instantiating networks in C++ scripts easy.
- Several simple examples to show how to use specific features.
- One large network example.
- Lots of unit tests and code coverage.
- Extensive use of the NS3 memory model (
ns3::Ptr
smart pointer) and run time type identification (ns3::Object
).
There are lots of additional features planned for subsequent releases. The initial release has a low feature count so we can get it out as soon as possible, but it still be useful and functional.
The NS3 node has the following classes aggregated to it:
- CCNxL3Protocol (the main layer 3 interface)
- A forwarder (derived from CCNxForwarder)
- A routing protocol (derived from CCNxRoutingProtocol)
- CCNxMessagePortalFactory (implementation class of CCNxPortalFactory)
The CCNxL3Protocol
is the core of the system. It expects to have a CCNxForwarder
and CCNxRoutingProtocol
added to it. This differs from the NS3 Internet model, where the routing protocol serves as both forwarder
and routing protocol. In our model, the CCNxForwarder handles the RouteIn()
and RouteOut()
calls, as
well as table management via AddRoute()
, RemoveRoute()
, PrintRoutes()
. The routing protocol has no
special interface to the forwarder, it sits on top of a standard CCNxPortal for I/O. It uses the CCNxForwarder
API to manage the forwarder's tables.
The CCNxPortal
abstraction is the layer 4 protocol from the applications's point of view. It has functions to Send()
, SendTo()
, Recv()
, and RecvFrom()
using a CCNxMessage
. We provide one implementation class, CCNxMessagePortal
, which is a simple 1-for-1 protocol without any transport features (like a UDP). The CCNxMessage class is the base for CCNxInterest
and CCNxContentObject
. The class CCNxL4Protocol
is the layer 4 abstraction form the layer 3 point of view. An implementation class like CCNxMessagePortal
inherits from both CCNxPortal
and CCNxL4Protocol
.
One can run CCNxL3Protocol over Point-to-point and CSMA NetDevices. We have also used it over VirtualNetDevice in our unit tests, so one could use CCNx over IP tunnels (e.g. UDP tunnels), though we have not provided a template or example for such a VirtualNetDevice yet.
+-----------------------+ +-----------------------+ +---------------------------+
| CCNxStandardForwarder | -| NfpRoutingProtocol | | CCNxMessagePortal |
+-----------------------+ / +-----------------------+ +---------------------------+
| CCNxForwarder |- | CCNxRoutingProtocol | | CCNxPortal (abstract) |
| (abstract) | | (abstract) | | CCNxL4Protocol (abstract) |
+-----------------------+ +-----------------------+ +---------------------------+
RouteInput()/RouteOutput() | CCNxPortal | Receive() / SendCallback()
+---------------------------+-----------------------+-------------------------------+
| CCNxL3Protocol |
+-----------------------------------------------------------------------------------+
Receive() / Send()
+---------------+
| NetDevice |
+---------------+
[1] Included: CCNxStaticRouting, NfpRoutingProtocol
Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center (PARC). All rights reserved.