NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndnlp-slicer.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FACE_NDNLP_SLICER_HPP
27
#define NFD_DAEMON_FACE_NDNLP_SLICER_HPP
28
29
#include "
ndnlp-tlv.hpp
"
30
#include "
ndnlp-sequence-generator.hpp
"
31
32
namespace
nfd
{
33
namespace
ndnlp {
34
35
typedef
shared_ptr<std::vector<Block>>
PacketArray
;
36
39
class
Slicer
: noncopyable
40
{
41
public
:
46
explicit
47
Slicer
(
size_t
mtu);
48
49
virtual
50
~Slicer
();
51
52
PacketArray
53
slice
(
const
Block
& block);
54
55
private
:
56
template
<
bool
T>
57
size_t
58
encodeFragment(
ndn::EncodingImpl<T>
& blk,
59
uint64_t seq, uint16_t fragIndex, uint16_t fragCount,
60
const
uint8_t* payload,
size_t
payloadSize);
61
63
void
64
estimateOverhead();
65
66
private
:
67
SequenceGenerator
m_seqgen;
68
70
size_t
m_mtu;
71
73
size_t
m_maxPayload;
74
};
75
76
}
// namespace ndnlp
77
}
// namespace nfd
78
79
#endif // NFD_DAEMON_FACE_NDNLP_SLICER_HPP
nfd::ndnlp::Slicer::slice
PacketArray slice(const Block &block)
Definition:
ndnlp-slicer.cpp:103
ndnlp-sequence-generator.hpp
nfd::ndnlp::Slicer
provides fragmentation feature at sender
Definition:
ndnlp-slicer.hpp:39
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
nfd::ndnlp::SequenceGenerator
generates sequence numbers
Definition:
ndnlp-sequence-generator.hpp:70
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::ndnlp::PacketArray
shared_ptr< std::vector< Block > > PacketArray
Definition:
ndnlp-slicer.hpp:35
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndnlp-tlv.hpp
nfd::ndnlp::Slicer::Slicer
Slicer(size_t mtu)
Definition:
ndnlp-slicer.cpp:33
nfd::ndnlp::Slicer::~Slicer
virtual ~Slicer()
Definition:
ndnlp-slicer.cpp:39
ndnSIM
NFD
daemon
face
ndnlp-slicer.hpp
Generated on Fri Feb 23 2018 12:30:55 for ndnSIM by
1.8.14