NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ethernet-factory.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
27
#define NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
28
29
#include "
protocol-factory.hpp
"
30
#include "
core/network-interface.hpp
"
31
32
namespace
nfd
{
33
34
class
EthernetFactory
:
public
ProtocolFactory
35
{
36
public
:
40
class
Error
:
public
ProtocolFactory::Error
41
{
42
public
:
43
explicit
44
Error
(
const
std::string& what)
45
:
ProtocolFactory
::
Error
(what)
46
{
47
}
48
};
49
50
typedef
std::map<std::pair<std::string, ethernet::Address>,
51
shared_ptr<Face>>
MulticastFaceMap
;
52
68
shared_ptr<Face>
69
createMulticastFace
(
const
NetworkInterfaceInfo
& interface,
70
const
ethernet::Address
& address);
71
75
const
MulticastFaceMap&
76
getMulticastFaces
()
const
;
77
78
public
:
// from ProtocolFactory
79
virtual
void
80
createFace
(
const
FaceUri
& uri,
81
ndn::nfd::FacePersistency
persistency,
82
bool
wantLocalFieldsEnabled,
83
const
FaceCreatedCallback
& onCreated,
84
const
FaceCreationFailedCallback
& onFailure)
override
;
85
86
virtual
std::vector<shared_ptr<const Channel>>
87
getChannels
()
const override
;
88
89
private
:
96
shared_ptr<Face>
97
findMulticastFace(
const
std::string& interfaceName,
98
const
ethernet::Address
& address)
const
;
99
100
private
:
101
MulticastFaceMap m_multicastFaces;
102
};
103
104
inline
const
EthernetFactory::MulticastFaceMap
&
105
EthernetFactory::getMulticastFaces
()
const
106
{
107
return
m_multicastFaces;
108
}
109
110
}
// namespace nfd
111
112
#endif // NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
network-interface.hpp
nfd::ProtocolFactory::Error
Base class for all exceptions thrown by protocol factories.
Definition:
protocol-factory.hpp:43
ndn::util::ethernet::Address
represents an Ethernet hardware address
Definition:
ethernet.hpp:53
ndn::util::FaceUri
represents the underlying protocol and address used by a Face
Definition:
face-uri.hpp:44
protocol-factory.hpp
nfd::NetworkInterfaceInfo
contains information about a network interface
Definition:
network-interface.hpp:41
nfd::EthernetFactory::getChannels
virtual std::vector< shared_ptr< const Channel > > getChannels() const override
Definition:
ethernet-factory.cpp:69
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:49
nfd::EthernetFactory::getMulticastFaces
const MulticastFaceMap & getMulticastFaces() const
Get map of configured multicast faces.
Definition:
ethernet-factory.hpp:105
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::ProtocolFactory
Abstract base class for all protocol factories.
Definition:
protocol-factory.hpp:37
nfd::EthernetFactory::createFace
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.
Definition:
ethernet-factory.cpp:59
nfd::EthernetFactory
Definition:
ethernet-factory.hpp:34
nfd::EthernetFactory::createMulticastFace
shared_ptr< Face > createMulticastFace(const NetworkInterfaceInfo &interface, const ethernet::Address &address)
Create an EthernetFace to communicate with the given multicast group.
Definition:
ethernet-factory.cpp:33
nfd::FaceCreationFailedCallback
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when the face fails to be created.
Definition:
channel.hpp:44
nfd::EthernetFactory::Error
Exception of EthernetFactory.
Definition:
ethernet-factory.hpp:40
nfd::FaceCreatedCallback
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when the face is created (as a response to incoming connec...
Definition:
channel.hpp:38
nfd::EthernetFactory::MulticastFaceMap
std::map< std::pair< std::string, ethernet::Address >, shared_ptr< Face > > MulticastFaceMap
Definition:
ethernet-factory.hpp:51
nfd::EthernetFactory::Error::Error
Error(const std::string &what)
Definition:
ethernet-factory.hpp:44
ndnSIM
NFD
daemon
face
ethernet-factory.hpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13