Skip to content

CCNxPortal

Marc Mosko edited this page Mar 2, 2016 · 3 revisions

CCNx Portal

The CCNx Portal is our equivalent of the good old socket, but re-designed for name-based applications. The ccns3Sim CCNxPortal follows the general design of the Portal in the C developer API, but is not exactly the same at this time.

The ccns3Sim portal is based on a polymorphic factory pattern, like the ns3 Socket class. This means that each flavor of a Portal inherits from CCNxPortal and each flavor has its own factory that inherits from CCNxPortalFactory. For example, the CCNxMessagePortal is a 1-for-1 layer 4 that does no additional processing of messages between the application and layer 3. It is implemented in CCNxMessagePortal and created from CCNxMessagePortalFactory.

Ptr<CCNxPortal> portal = CCnxPortal::CreatePortal(node, TypeId::LookupByName ("ns3::ccnx::CCNxMessagePortalFactory"));

Adding your own flavor of a portal

The CCNxStackHelper will create and aggregate all the standard portal factories to each node in CCNxStackHelper::Install. If you have a new portal, for example AcmePortal, you need to create a factory and bind it to each node:

node->AggregateObject( CreateObject<AcmePortalFactory>() );

You do not need to modify CCNxStackHelper.

  • Home
  • [Getting Started](Getting Started)
  • Developer
    • [Node Architecture](Node Architecture)
    • [Header doc format](Header doc format)
    • [Unit Tests](Unit Tests)
    • [Overriding Implementations](Overriding Implementations)
    • [Code Coverage](Code Coverage)

Clone this wiki locally