NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-net-device-link-service.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef NDN_NET_DEVICE_LINK_SERVICE_HPP
21
#define NDN_NET_DEVICE_LINK_SERVICE_HPP
22
23
#include "ns3/ndnSIM/model/ndn-common.hpp"
24
#include "ns3/ndnSIM/NFD/daemon/face/link-service.hpp"
25
26
#include "ns3/net-device.h"
27
28
namespace
ns3
{
29
namespace
ndn
{
30
41
class
NetDeviceLinkService
:
public
nfd::face::LinkService
42
{
43
44
public
:
51
NetDeviceLinkService
(Ptr<Node> node,
const
Ptr<NetDevice>& netDevice);
52
53
virtual
54
~NetDeviceLinkService
();
55
56
public
:
60
Ptr<Node>
61
GetNode
()
const
;
62
66
Ptr<NetDevice>
67
GetNetDevice
()
const
;
68
69
private
:
70
virtual
void
71
doSendInterest(
const ::ndn::Interest
& interest)
override
;
72
73
virtual
void
74
doSendData(
const ::ndn::Data
& data)
override
;
75
76
virtual
void
77
doSendNack(
const ::ndn::lp::Nack
& nack)
override
;
78
79
virtual
void
80
doReceivePacket(
nfd::face::Transport::Packet
&& packet)
override
81
{
82
// not used now
83
BOOST_ASSERT(
false
);
84
}
85
86
private
:
87
void
88
send(Ptr<Packet> packet);
89
91
void
92
receiveFromNetDevice(Ptr<NetDevice> device, Ptr<const Packet> p, uint16_t protocol,
93
const
Address& from,
const
Address& to, NetDevice::PacketType packetType);
94
95
private
:
96
Ptr<Node> m_node;
97
Ptr<NetDevice> m_netDevice;
98
};
99
100
}
// namespace ndn
101
}
// namespace ns3
102
103
#endif // NDN_NET_DEVICE_LINK_SERVICE_HPP
ns3::ndn::NetDeviceLinkService
Implementation of layer-2 (Ethernet) LinkService (current hack, to be changed eventually) ...
Definition:
ndn-net-device-link-service.hpp:41
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
nfd::face::LinkService
the upper part of a Face
Definition:
link-service.hpp:73
ndn::tlv::Interest
Definition:
tlv.hpp:61
nfd::face::Transport::Packet
stores a packet along with the remote endpoint
Definition:
transport.hpp:113
ns3::ndn::NetDeviceLinkService::GetNetDevice
Ptr< NetDevice > GetNetDevice() const
Get NetDevice associated with the LinkService.
Definition:
ndn-net-device-link-service.cpp:67
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::ndn::NetDeviceLinkService::~NetDeviceLinkService
virtual ~NetDeviceLinkService()
Definition:
ndn-net-device-link-service.cpp:55
ndn::tlv::Data
Definition:
tlv.hpp:62
ndn::lp::tlv::Nack
Definition:
tlv.hpp:38
ns3::ndn::NetDeviceLinkService::GetNode
Ptr< Node > GetNode() const
Get Node associated with the LinkService.
Definition:
ndn-net-device-link-service.cpp:61
ns3::ndn::NetDeviceLinkService::NetDeviceLinkService
NetDeviceLinkService(Ptr< Node > node, const Ptr< NetDevice > &netDevice)
Constructor.
Definition:
ndn-net-device-link-service.cpp:42
ndnSIM
model
ndn-net-device-link-service.hpp
Generated on Sat Nov 12 2016 16:02:52 for ndnSIM by
1.8.12