-
Notifications
You must be signed in to change notification settings - Fork 6
CCNxPortal
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"));
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.
Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center (PARC). All rights reserved.