Classes | |
class | Channel |
Represents a channel that listens on a local endpoint. More... | |
class | DatagramTransport |
Implements a Transport for datagram-based protocols. More... | |
class | EthernetChannel |
Class implementing an Ethernet-based channel to create faces. More... | |
class | EthernetFactory |
Protocol factory for Ethernet. More... | |
class | EthernetTransport |
Base class for Ethernet-based Transports. More... | |
class | Face |
Generalization of a network interface. More... | |
class | FaceCounters |
Gives access to the counters provided by Face. More... | |
class | FaceLogHelper |
For internal use by FaceLogging macros. More... | |
struct | FaceParams |
Parameters used to set Transport properties or LinkService options on a newly created face. More... | |
class | FaceSystem |
Entry point of NFD's face system. More... | |
class | GenericLinkService |
GenericLinkService is a LinkService that implements the NDNLPv2 protocol. More... | |
class | GenericLinkServiceCounters |
Counters provided by GenericLinkService. More... | |
struct | GenericLinkServiceOptions |
Options that control the behavior of GenericLinkService. More... | |
class | InternalClientTransport |
Implements a client-side transport that can be paired with an InternalForwarderTransport. More... | |
class | InternalForwarderTransport |
Implements a forwarder-side transport that can be paired with another transport. More... | |
class | InternalTransportBase |
Abstracts a transport that can be paired with another. More... | |
class | IpAddressPredicate |
Represents a predicate to accept or reject an IP address. More... | |
class | LinkService |
The upper half of a Face. More... | |
class | LinkServiceCounters |
Counters provided by LinkService. More... | |
class | LpFragmenter |
Fragments network-layer packets into NDNLPv2 link-layer packets. More... | |
class | LpReassembler |
Reassembles fragmented network-layer packets. More... | |
class | LpReliability |
Provides for reliable sending and receiving of link-layer packets. More... | |
struct | Multicast |
class | MulticastEthernetTransport |
A multicast Transport that uses raw Ethernet II frames. More... | |
class | MulticastUdpTransport |
A Transport that communicates on a UDP multicast group. More... | |
class | NetdevBound |
Manages netdev-bound faces. More... | |
class | NetworkInterfacePredicate |
Represents a predicate to accept or reject a ndn::net::NetworkInterface. More... | |
class | NetworkPredicateBase |
class | NullLinkService |
A LinkService that drops every packet. More... | |
class | NullTransport |
A Transport that drops every packet. More... | |
class | PcapHelper |
Helper class for dealing with libpcap handles. More... | |
class | ProtocolFactory |
Provides support for an underlying protocol. More... | |
struct | ProtocolFactoryCtorParams |
Parameters to ProtocolFactory constructor. More... | |
class | StreamTransport |
Implements a Transport for stream-based protocols. More... | |
class | TcpChannel |
Class implementing a TCP-based channel to create faces. More... | |
class | TcpFactory |
Protocol factory for TCP over IPv4 and IPv6. More... | |
class | TcpTransport |
A Transport that communicates on a connected TCP socket. More... | |
class | Transport |
The lower half of a Face. More... | |
class | TransportCounters |
Counters provided by a transport. More... | |
class | UdpChannel |
Class implementing a UDP-based channel to create faces. More... | |
class | UdpFactory |
Protocol factory for UDP over IPv4 and IPv6. More... | |
struct | Unicast |
class | UnicastEthernetTransport |
A unicast Transport that uses raw Ethernet II frames. More... | |
class | UnicastUdpTransport |
A Transport that communicates on a unicast UDP socket. More... | |
class | UnixStreamChannel |
Class implementing a local channel to create faces. More... | |
class | UnixStreamFactory |
Protocol factory for stream-oriented Unix sockets. More... | |
class | UnixStreamTransport |
A Transport that communicates on a stream-oriented Unix domain socket. More... | |
class | WebSocketChannel |
Class implementing a WebSocket-based channel to create faces. More... | |
class | WebSocketFactory |
Protocol factory for WebSocket. More... | |
class | WebSocketTransport |
A Transport that communicates on a WebSocket connection. More... | |
class | WebSocketTransportCounters |
Counters provided by WebSocketTransport. More... | |
Typedefs | |
using | DetermineFaceScopeFromAddress = std::function< ndn::nfd::FaceScope(const boost::asio::ip::address &local, const boost::asio::ip::address &remote)> |
using | EndpointId = std::variant< std::monostate, ethernet::Address, udp::Endpoint > |
Identifies a remote endpoint on the link. More... | |
using | FaceCreatedCallback = std::function< void(const shared_ptr< Face > &)> |
Prototype for the callback that is invoked when a face is created (in response to an incoming connection or after a connection is established). More... | |
using | FaceCreationFailedCallback = std::function< void(uint32_t status, const std::string &reason)> |
Prototype for the callback that is invoked when a face fails to be created. More... | |
using | FaceId = uint64_t |
Identifies a face. More... | |
using | FaceState = TransportState |
Indicates the state of a face. More... | |
Enumerations | |
enum class | TransportState { NONE , UP , DOWN , CLOSING , FAILED , CLOSED } |
Indicates the state of a transport. More... | |
Functions | |
static void | bindToDevice (int fd, const std::string &ifname) |
void | connectFaceClosedSignal (Face &face, std::function< void()> f) |
Invokes a callback when a face is closed. More... | |
static bool | doesAddressMatchRule (const boost::asio::ip::address &address, const std::string &rule) |
static bool | doesMatchPattern (const std::string &ifname, const std::string &pattern) |
static bool | doesNetifMatchRule (const ndn::net::NetworkInterface &netif, const std::string &rule) |
ssize_t | getTxQueueLength (int fd) |
Obtain send queue length from a specified system socket. More... | |
static bool | isLoopback (const boost::asio::ip::address &addr) |
std::tuple< shared_ptr< Face >, shared_ptr< ndn::Face > > | makeInternalFace (ndn::KeyChain &clientKeyChain) |
Make a pair of forwarder-side face and client-side face that are connected to each other. More... | |
shared_ptr< Face > | makeNullFace (const FaceUri &uri=FaceUri("null://")) |
Returns a Face that has no underlying transport and drops every packet. More... | |
std::ostream & | operator<< (std::ostream &os, const FaceLogHelper< Face > &flh) |
std::ostream & | operator<< (std::ostream &os, const FaceLogHelper< LinkService > &flh) |
std::ostream & | operator<< (std::ostream &os, const FaceLogHelper< LpFragmenter > &flh) |
std::ostream & | operator<< (std::ostream &os, const FaceLogHelper< LpReassembler > &flh) |
std::ostream & | operator<< (std::ostream &os, const FaceLogHelper< LpReliability > &flh) |
template<typename T > | |
std::enable_if_t< std::is_base_of_v< LinkService, T > &&!std::is_same_v< LinkService, T >, std::ostream & > | operator<< (std::ostream &os, const FaceLogHelper< T > &flh) |
template<typename T > | |
std::enable_if_t< std::is_base_of_v< Transport, T > &&!std::is_same_v< Transport, T >, std::ostream & > | operator<< (std::ostream &os, const FaceLogHelper< T > &flh) |
std::ostream & | operator<< (std::ostream &os, const FaceLogHelper< Transport > &flh) |
std::ostream & | operator<< (std::ostream &os, TransportState state) |
static std::optional< ip::address > | pickAddress (const net::NetworkInterface &netif, net::AddressFamily af) |
Variables | |
const std::string | CFGSEC_FACESYSTEM = "face_system" |
const std::string | CFGSEC_GENERAL = "general" |
const std::string | CFGSEC_GENERAL_FQ = CFGSEC_FACESYSTEM + ".general" |
const std::string | CFGSEC_NETDEVBOUND = "netdev_bound" |
constexpr size_t | CONGESTION_MARK_SIZE |
constexpr FaceId | FACEID_CONTENT_STORE = 254 |
Identifies a packet comes from the ContentStore. More... | |
constexpr FaceId | FACEID_INTERNAL_FACE = 1 |
Identifies the InternalFace used in management. More... | |
constexpr FaceId | FACEID_NULL = 255 |
Identifies the NullFace that drops every packet. More... | |
constexpr FaceId | FACEID_RESERVED_MAX = 255 |
Upper bound of reserved FaceIds. More... | |
static class nfd::face::NfdAutoEthernetFactoryProtocolFactoryRegistrationClass | g_nfdAutoEthernetFactoryProtocolFactoryRegistrationVariable |
static class nfd::face::NfdAutoTcpFactoryProtocolFactoryRegistrationClass | g_nfdAutoTcpFactoryProtocolFactoryRegistrationVariable |
static class nfd::face::NfdAutoUdpFactoryProtocolFactoryRegistrationClass | g_nfdAutoUdpFactoryProtocolFactoryRegistrationVariable |
static class nfd::face::NfdAutoUnixStreamFactoryProtocolFactoryRegistrationClass | g_nfdAutoUnixStreamFactoryProtocolFactoryRegistrationVariable |
static class nfd::face::NfdAutoWebSocketFactoryProtocolFactoryRegistrationClass | g_nfdAutoWebSocketFactoryProtocolFactoryRegistrationVariable |
constexpr FaceId | INVALID_FACEID = ndn::nfd::INVALID_FACE_ID |
Indicates an invalid FaceId. More... | |
constexpr size_t | MAX_FRAG_OVERHEAD |
Maximum overhead of adding fragmentation to payload, not counting other NDNLPv2 headers. More... | |
constexpr size_t | MAX_SINGLE_FRAG_OVERHEAD |
Maximum overhead on a single fragment, not counting other NDNLPv2 headers. More... | |
constexpr ssize_t | MIN_MTU = 64 |
Minimum MTU that may be set. More... | |
constexpr ssize_t | MTU_INVALID = -2 |
(for internal use) Indicates that the MTU field is unset. More... | |
constexpr ssize_t | MTU_UNLIMITED = -1 |
Indicates that the transport has no limit on payload size. More... | |
constexpr ssize_t | QUEUE_ERROR = -2 |
Indicates that the transport was unable to retrieve the queue capacity/length. More... | |
constexpr ssize_t | QUEUE_UNSUPPORTED = -1 |
Indicates that the transport does not support reading the queue capacity/length. More... | |
using nfd::face::DetermineFaceScopeFromAddress = typedef std::function<ndn::nfd::FaceScope(const boost::asio::ip::address& local, const boost::asio::ip::address& remote)> |
Definition at line 43 of file tcp-channel.hpp.
using nfd::face::EndpointId = typedef std::variant<std::monostate, ethernet::Address, udp::Endpoint> |
Identifies a remote endpoint on the link.
This ID is only meaningful in the context of the same Transport. Incoming packets from the same remote endpoint have the same EndpointId, and incoming packets from different remote endpoints have different EndpointIds.
Typically, a point-to-point Transport has only one meaningful EndpointId, represented by std::monostate
.
Definition at line 78 of file face-common.hpp.
using nfd::face::FaceCreatedCallback = typedef std::function<void(const shared_ptr<Face>&)> |
Prototype for the callback that is invoked when a face is created (in response to an incoming connection or after a connection is established).
Definition at line 90 of file channel.hpp.
using nfd::face::FaceCreationFailedCallback = typedef std::function<void(uint32_t status, const std::string& reason)> |
Prototype for the callback that is invoked when a face fails to be created.
Definition at line 94 of file channel.hpp.
using nfd::face::FaceId = typedef uint64_t |
Identifies a face.
Definition at line 48 of file face-common.hpp.
using nfd::face::FaceState = typedef TransportState |
|
strong |
Indicates the state of a transport.
Definition at line 37 of file transport.hpp.
|
static |
Definition at line 115 of file multicast-udp-transport.cpp.
void nfd::face::connectFaceClosedSignal | ( | Face & | face, |
std::function< void()> | f | ||
) |
Invokes a callback when a face is closed.
face | the face |
f | the callback to be invoked when the face enters CLOSED state |
This function connects a callback to the afterStateChange signal of face
, and invokes f
when the state becomes CLOSED.
Definition at line 46 of file channel.cpp.
|
static |
Definition at line 200 of file network-predicate.cpp.
|
static |
Definition at line 165 of file network-predicate.cpp.
|
static |
Definition at line 173 of file network-predicate.cpp.
ssize_t nfd::face::getTxQueueLength | ( | int | fd | ) |
Obtain send queue length from a specified system socket.
fd | file descriptor of the socket |
QUEUE_UNSUPPORTED | this operation is unsupported on the current platform |
QUEUE_ERROR | there was an error retrieving the send queue length |
On Linux, ioctl() is used to obtain the value of SIOCOUTQ from the socket. On macOS, getsockopt() is used to obtain the value of SO_NWRITE from the socket.
Definition at line 39 of file socket-utils.cpp.
|
static |
Definition at line 34 of file websocket-transport.cpp.
std::tuple< shared_ptr< Face >, shared_ptr< ndn::Face > > nfd::face::makeInternalFace | ( | ndn::KeyChain & | clientKeyChain | ) |
Make a pair of forwarder-side face and client-side face that are connected to each other.
Network-layer packets sent by one face will be received by the other face after io.poll()
.
clientKeyChain | A KeyChain used by client-side face to sign prefix registration commands. |
Definition at line 34 of file internal-face.cpp.
shared_ptr< Face > nfd::face::makeNullFace | ( | const FaceUri & | uri | ) |
Returns a Face that has no underlying transport and drops every packet.
Definition at line 33 of file null-face.cpp.
std::ostream & nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< Face > & | flh | ||
) |
std::ostream & nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< LinkService > & | flh | ||
) |
Definition at line 115 of file link-service.cpp.
std::ostream & nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< LpFragmenter > & | flh | ||
) |
Definition at line 131 of file lp-fragmenter.cpp.
std::ostream & nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< LpReassembler > & | flh | ||
) |
Definition at line 153 of file lp-reassembler.cpp.
std::ostream & nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< LpReliability > & | flh | ||
) |
Definition at line 399 of file lp-reliability.cpp.
std::enable_if_t<std::is_base_of_v<LinkService, T> && !std::is_same_v<LinkService, T>, std::ostream&> nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< T > & | flh | ||
) |
Definition at line 235 of file link-service.hpp.
std::enable_if_t<std::is_base_of_v<Transport, T> && !std::is_same_v<Transport, T>, std::ostream&> nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< T > & | flh | ||
) |
Definition at line 443 of file transport.hpp.
std::ostream & nfd::face::operator<< | ( | std::ostream & | os, |
const FaceLogHelper< Transport > & | flh | ||
) |
Definition at line 214 of file transport.cpp.
std::ostream & nfd::face::operator<< | ( | std::ostream & | os, |
TransportState | state | ||
) |
Definition at line 33 of file transport.cpp.
|
static |
Definition at line 389 of file udp-factory.cpp.
const std::string nfd::face::CFGSEC_FACESYSTEM = "face_system" |
Definition at line 35 of file face-system.cpp.
const std::string nfd::face::CFGSEC_GENERAL = "general" |
Definition at line 36 of file face-system.cpp.
const std::string nfd::face::CFGSEC_GENERAL_FQ = CFGSEC_FACESYSTEM + ".general" |
Definition at line 37 of file face-system.cpp.
const std::string nfd::face::CFGSEC_NETDEVBOUND = "netdev_bound" |
Definition at line 38 of file face-system.cpp.
|
constexpr |
Definition at line 38 of file generic-link-service.cpp.
|
inlineconstexpr |
Identifies a packet comes from the ContentStore.
Definition at line 55 of file face-common.hpp.
|
inlineconstexpr |
Identifies the InternalFace used in management.
Definition at line 53 of file face-common.hpp.
|
inlineconstexpr |
Identifies the NullFace that drops every packet.
Definition at line 57 of file face-common.hpp.
|
inlineconstexpr |
Upper bound of reserved FaceIds.
Definition at line 59 of file face-common.hpp.
|
static |
|
static |
|
static |
|
static |
|
static |
|
inlineconstexpr |
Indicates an invalid FaceId.
Definition at line 51 of file face-common.hpp.
|
constexpr |
Maximum overhead of adding fragmentation to payload, not counting other NDNLPv2 headers.
Definition at line 52 of file lp-fragmenter.cpp.
|
constexpr |
Maximum overhead on a single fragment, not counting other NDNLPv2 headers.
Definition at line 44 of file lp-fragmenter.cpp.
|
inlineconstexpr |
Minimum MTU that may be set.
This is done to ensure the NDNLPv2 fragmentation feature functions properly.
Definition at line 66 of file face-common.hpp.
|
inlineconstexpr |
(for internal use) Indicates that the MTU field is unset.
Definition at line 106 of file transport.hpp.
|
inlineconstexpr |
Indicates that the transport has no limit on payload size.
Definition at line 101 of file transport.hpp.
|
inlineconstexpr |
Indicates that the transport was unable to retrieve the queue capacity/length.
Definition at line 116 of file transport.hpp.
|
inlineconstexpr |
Indicates that the transport does not support reading the queue capacity/length.
Definition at line 111 of file transport.hpp.