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

Class implementing Ethernet-based channel to create faces. More...

#include <ethernet-channel.hpp>

Inheritance diagram for nfd::face::EthernetChannel:
Collaboration diagram for nfd::face::EthernetChannel:

Classes

class  Error
 EthernetChannel-related error. More...
 

Public Member Functions

 EthernetChannel (shared_ptr< const ndn::net::NetworkInterface > localEndpoint, time::nanoseconds idleTimeout)
 Create an Ethernet channel on the given localEndpoint (network interface) More...
 
bool isListening () const override
 Returns whether the channel is listening. More...
 
size_t size () const override
 Returns the number of faces in the channel. More...
 
void connect (const ethernet::Address &remoteEndpoint, ndn::nfd::FacePersistency persistency, bool wantLpReliability, const FaceCreatedCallback &onFaceCreated, const FaceCreationFailedCallback &onConnectFailed)
 Create a unicast Ethernet face toward remoteEndpoint. More...
 
void listen (const FaceCreatedCallback &onFaceCreated, const FaceCreationFailedCallback &onFaceCreationFailed)
 Start listening. More...
 
- Public Member Functions inherited from nfd::face::Channel
virtual ~Channel ()
 
const FaceUrigetUri () const
 

Additional Inherited Members

- Protected Member Functions inherited from nfd::face::Channel
void setUri (const FaceUri &uri)
 

Detailed Description

Class implementing Ethernet-based channel to create faces.

Definition at line 40 of file ethernet-channel.hpp.

Constructor & Destructor Documentation

nfd::face::EthernetChannel::EthernetChannel ( shared_ptr< const ndn::net::NetworkInterface localEndpoint,
time::nanoseconds  idleTimeout 
)

Create an Ethernet channel on the given localEndpoint (network interface)

To enable creation of faces upon incoming connections, one needs to explicitly call EthernetChannel::listen method.

Definition at line 40 of file ethernet-channel.cpp.

References ndn::FaceUri::fromDev(), NFD_LOG_CHAN_INFO, and nfd::face::Channel::setUri().

Referenced by nfd::face::EthernetChannel::Error::Error().

Member Function Documentation

bool nfd::face::EthernetChannel::isListening ( ) const
inlineoverridevirtual

Returns whether the channel is listening.

Implements nfd::face::Channel.

Definition at line 66 of file ethernet-channel.hpp.

Referenced by listen().

size_t nfd::face::EthernetChannel::size ( ) const
inlineoverridevirtual

Returns the number of faces in the channel.

Implements nfd::face::Channel.

Definition at line 72 of file ethernet-channel.hpp.

References connect(), and listen().

void nfd::face::EthernetChannel::connect ( const ethernet::Address remoteEndpoint,
ndn::nfd::FacePersistency  persistency,
bool  wantLpReliability,
const FaceCreatedCallback onFaceCreated,
const FaceCreationFailedCallback onConnectFailed 
)

Create a unicast Ethernet face toward remoteEndpoint.

Parameters
remoteEndpointThe remote Ethernet endpoint
persistencyPersistency of the newly created face
wantLpReliabilitywhether LpReliability should be enabled
onFaceCreatedCallback to notify successful creation of the face
onConnectFailedCallback to notify errors

Definition at line 56 of file ethernet-channel.cpp.

References NFD_LOG_CHAN_DEBUG.

Referenced by size().

void nfd::face::EthernetChannel::listen ( const FaceCreatedCallback onFaceCreated,
const FaceCreationFailedCallback onFaceCreationFailed 
)

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