NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::EthernetFactory Class Reference

#include <ethernet-factory.hpp>

Inheritance diagram for nfd::EthernetFactory:
Collaboration diagram for nfd::EthernetFactory:

Classes

class  Error
 Exception of EthernetFactory. More...
 

Public Types

typedef std::map< std::pair< std::string, ethernet::Address >, shared_ptr< Face > > MulticastFaceMap
 

Public Member Functions

shared_ptr< FacecreateMulticastFace (const NetworkInterfaceInfo &interface, const ethernet::Address &address)
 Create an EthernetFace to communicate with the given multicast group. More...
 
const MulticastFaceMapgetMulticastFaces () const
 Get map of configured multicast faces. More...
 
virtual void createFace (const FaceUri &uri, ndn::nfd::FacePersistency persistency, bool wantLocalFieldsEnabled, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onFailure) override
 Try to create Face using the supplied FaceUri. More...
 
virtual std::vector< shared_ptr< const Channel > > getChannels () const override
 

Detailed Description

Definition at line 34 of file ethernet-factory.hpp.

Member Typedef Documentation

◆ MulticastFaceMap

typedef std::map<std::pair<std::string, ethernet::Address>, shared_ptr<Face> > nfd::EthernetFactory::MulticastFaceMap

Definition at line 51 of file ethernet-factory.hpp.

Member Function Documentation

◆ createMulticastFace()

shared_ptr< Face > nfd::EthernetFactory::createMulticastFace ( const NetworkInterfaceInfo interface,
const ethernet::Address address 
)

Create an EthernetFace to communicate with the given multicast group.

If this method is called twice with the same interface and group, only one face will be created. Instead, the second call will just retrieve the existing face.

Parameters
interfaceLocal network interface
addressEthernet broadcast/multicast destination address
Returns
always a valid shared pointer to an EthernetFace object, an exception will be thrown if the creation fails
Exceptions
EthernetFactory::Erroror EthernetTransport::Error

Definition at line 33 of file ethernet-factory.cpp.

References nfd::face::GenericLinkService::Options::allowFragmentation, nfd::face::GenericLinkService::Options::allowReassembly, nfd::connectFaceClosedSignal(), ndn::util::ethernet::Address::isMulticast(), nfd::NetworkInterfaceInfo::name, and ndn::util::ethernet::Address::toString().

◆ getMulticastFaces()

const EthernetFactory::MulticastFaceMap & nfd::EthernetFactory::getMulticastFaces ( ) const
inline

Get map of configured multicast faces.

Definition at line 105 of file ethernet-factory.hpp.

◆ createFace()

void nfd::EthernetFactory::createFace ( const FaceUri uri,
ndn::nfd::FacePersistency  persistency,
bool  wantLocalFieldsEnabled,
const FaceCreatedCallback onCreated,
const FaceCreationFailedCallback onFailure 
)
overridevirtual

Try to create Face using the supplied FaceUri.

This method should automatically choose channel, based on supplied FaceUri and create face.

Parameters
uriremote URI of the new face
persistencypersistency of the new face
wantLocalFieldsEnabledwhether local fields should be enabled on the face
onCreatedcallback if face creation succeeds If a face with the same remote URI already exists, its persistency and LocalFieldsEnabled setting will not be modified.
onFailurecallback if face creation fails

Implements nfd::ProtocolFactory.

Definition at line 59 of file ethernet-factory.cpp.

◆ getChannels()

std::vector< shared_ptr< const Channel > > nfd::EthernetFactory::getChannels ( ) const
overridevirtual

Implements nfd::ProtocolFactory.

Definition at line 69 of file ethernet-factory.cpp.


The documentation for this class was generated from the following files: