NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: 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
const
FaceCreatedCallback
& onCreated,
83
const
FaceCreationFailedCallback
& onConnectFailed)
DECL_OVERRIDE
;
84
85
virtual
std::vector<shared_ptr<const Channel>>
86
getChannels
() const DECL_OVERRIDE;
87
88
private:
95
shared_ptr<Face>
96
findMulticastFace(const
std
::
string
& interfaceName,
97
const
ethernet
::Address& address) const;
98
99
private:
100
MulticastFaceMap m_multicastFaces;
101
};
102
103
inline const
EthernetFactory
::MulticastFaceMap&
104
EthernetFactory
::
getMulticastFaces
()
const
105
{
106
return
m_multicastFaces;
107
}
108
109
}
// namespace nfd
110
111
#endif // NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
network-interface.hpp
nfd::FaceCreationFailedCallback
function< void(const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when the face fails to be created.
Definition:
channel.hpp:44
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::createFace
virtual void createFace(const FaceUri &uri, ndn::nfd::FacePersistency persistency, const FaceCreatedCallback &onCreated, const FaceCreationFailedCallback &onConnectFailed) 1
Try to create Face using the supplied FaceUri.
Definition:
ethernet-factory.cpp:59
nfd::EthernetFactory::getChannels
virtual std::vector< shared_ptr< const Channel > > getChannels() const 1
Definition:
ethernet-factory.cpp:68
std
STL namespace.
DECL_OVERRIDE
#define DECL_OVERRIDE
expands to 'override' if compiler supports 'override' specifier, otherwise expands to nothing ...
Definition:
common.hpp:50
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:104
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
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::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
ndn::util::ethernet
Definition:
ethernet.cpp:31
nfd::EthernetFactory::Error::Error
Error(const std::string &what)
Definition:
ethernet-factory.hpp:44
ndnSIM
NFD
daemon
face
ethernet-factory.hpp
Generated on Sat Nov 12 2016 16:02:53 for ndnSIM by
1.8.12