NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
EthernetFace
;
35
36
class
EthernetFactory
:
public
ProtocolFactory
37
{
38
public
:
42
class
Error
:
public
ProtocolFactory::Error
43
{
44
public
:
45
explicit
46
Error
(
const
std::string& what)
47
:
ProtocolFactory
::
Error
(what)
48
{
49
}
50
};
51
52
typedef
std::map<std::pair<std::string, ethernet::Address>,
53
shared_ptr<EthernetFace>>
MulticastFaceMap
;
54
55
// from ProtocolFactory
56
virtual
void
57
createFace
(
const
FaceUri
& uri,
58
ndn::nfd::FacePersistency
persistency,
59
const
FaceCreatedCallback
& onCreated,
60
const
FaceConnectFailedCallback
& onConnectFailed)
DECL_OVERRIDE
;
61
77
shared_ptr<EthernetFace>
78
createMulticastFace
(
const
NetworkInterfaceInfo
& interface,
79
const
ethernet::Address
& address);
80
84
const
MulticastFaceMap&
85
getMulticastFaces
()
const
;
86
87
virtual
std::list<shared_ptr<const Channel>>
88
getChannels
()
const
;
89
90
private
:
99
shared_ptr<EthernetFace>
100
findMulticastFace(
const
std::string& interfaceName,
101
const
ethernet::Address
& address)
const
;
102
103
private
:
104
MulticastFaceMap m_multicastFaces;
105
};
106
107
inline
const
EthernetFactory::MulticastFaceMap
&
108
EthernetFactory::getMulticastFaces
()
const
109
{
110
return
m_multicastFaces;
111
}
112
113
}
// namespace nfd
114
115
#endif // NFD_DAEMON_FACE_ETHERNET_FACTORY_HPP
network-interface.hpp
nfd::FaceConnectFailedCallback
function< void(const std::string &reason)> FaceConnectFailedCallback
Prototype for the callback that is called when face is failed to get created.
Definition:
protocol-factory.hpp:47
nfd::EthernetFace
EthernetFace
Definition:
ethernet-face.cpp:61
nfd::EthernetFactory::MulticastFaceMap
std::map< std::pair< std::string, ethernet::Address >, shared_ptr< EthernetFace > > MulticastFaceMap
Definition:
ethernet-factory.hpp:53
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 FaceConnectFailedCallback &onConnectFailed) 1
Try to create Face using the supplied FaceUri.
Definition:
ethernet-factory.cpp:69
DECL_OVERRIDE
#define DECL_OVERRIDE
expands to 'override' if compiler supports this feature, otherwise expands to nothing ...
Definition:
common.hpp:49
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
nfd::ProtocolFactory
Definition:
protocol-factory.hpp:50
nfd::ProtocolFactory::Error
Base class for all exceptions thrown by channel factories.
Definition:
protocol-factory.hpp:56
ndn::nfd::FacePersistency
FacePersistency
Definition:
nfd-constants.hpp:48
nfd::EthernetFactory::createMulticastFace
shared_ptr< EthernetFace > createMulticastFace(const NetworkInterfaceInfo &interface, const ethernet::Address &address)
Create an EthernetFace to communicate with the given multicast group.
Definition:
ethernet-factory.cpp:35
nfd::EthernetFactory
Definition:
ethernet-factory.hpp:36
nfd::EthernetFactory::getChannels
virtual std::list< shared_ptr< const Channel > > getChannels() const
Definition:
ethernet-factory.cpp:78
nfd::EthernetFactory::Error
Exception of EthernetFactory.
Definition:
ethernet-factory.hpp:42
nfd::FaceCreatedCallback
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback called when face is created (as a response to incoming connection or after...
Definition:
protocol-factory.hpp:34
nfd::EthernetFactory::getMulticastFaces
const MulticastFaceMap & getMulticastFaces() const
Get map of configured multicast faces.
Definition:
ethernet-factory.hpp:108
nfd::EthernetFactory::Error::Error
Error(const std::string &what)
Definition:
ethernet-factory.hpp:46
ndnSIM
NFD
daemon
face
ethernet-factory.hpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11