23 #ifndef NDN_LPPACKETLITE_HPP
24 #define NDN_LPPACKETLITE_HPP
26 #include "../util/blob-lite.hpp"
27 #include "incoming-face-id-lite.hpp"
28 #include "../network-nack-lite.hpp"
29 #include "congestion-mark-lite.hpp"
30 #include "../../c/lp/lp-packet-types.h"
40 ndn_LpPacketHeaderFieldType
59 const NetworkNackLite&
70 const CongestionMarkLite&
82 static LpPacketHeaderFieldLite&
164 friend class Tlv0_2WireFormatLite;
165 friend class IncomingFaceIdLite;
166 friend class NetworkNackLite;
167 friend class CongestionMarkLite;
size_t maxHeaderFields
the number of elements in the allocated headerFields array.
Definition: lp-packet-types.h:64
size_t countHeaderFields() const
Get the number of header fields.
Definition: lp-packet-lite.hpp:120
static LpPacketLite & downCast(ndn_LpPacket &lpPacket)
Downcast the reference to the ndn_LpPacket struct to an LpPacketLite.
Definition: lp-packet-lite.hpp:157
An ndn_LpPacket holds a list of LP packet header fields and an optional fragment wire encoding...
Definition: lp-packet-types.h:60
Definition: lp-packet-lite.hpp:95
NetworkNackLite represents a network Nack packet and includes a Nack reason.
Definition: network-nack-lite.hpp:35
static BlobLite & downCast(ndn_Blob &blob)
Downcast the reference to the ndn_Blob struct to a BlobLite.
Definition: blob-lite.hpp:86
static CongestionMarkLite & downCast(ndn_CongestionMark &congestionMark)
Downcast the reference to the ndn_CongestionMark struct to an CongestionMarkLite. ...
Definition: congestion-mark-lite.hpp:73
IncomingFaceIdLite represents the incoming face ID header field in an NDNLPv2 packet.
Definition: incoming-face-id-lite.hpp:37
CongestionMarkLite represents the congestion mark header field in an NDNLPv2 packet.
Definition: congestion-mark-lite.hpp:36
struct ndn_LpPacketHeaderField * headerFields
pointer to the array of ndn_LpPacketHeaderField.
Definition: lp-packet-types.h:63
static NetworkNackLite & downCast(ndn_NetworkNack &networkNack)
Downcast the reference to the ndn_NetworkNack struct to an NetworkNackLite.
Definition: network-nack-lite.hpp:97
size_t nHeaderFields
the number of header fields in the packet.
Definition: lp-packet-types.h:65
static IncomingFaceIdLite & downCast(ndn_IncomingFaceId &incomingFaceId)
Downcast the reference to the ndn_IncomingFaceId struct to an IncomingFaceIdLite. ...
Definition: incoming-face-id-lite.hpp:74
LpPacketLite(struct ndn_LpPacketHeaderField *headerFields, size_t maxHeaderFields)
Create an LpPacket to use the headerFieldsArray.
Definition: lp-packet-lite.cpp:28
A BlobLite holds a pointer to an immutable pre-allocated buffer and its length This is like a JavaScr...
Definition: blob-lite.hpp:37
void setFragmentWireEncoding(const BlobLite &fragmentWireEncoding)
Set the fragment wire encoding.
Definition: lp-packet-lite.hpp:146
struct ndn_Blob fragmentWireEncoding
A Blob whose value is a pointer to a pre-allocated buffer for the fragment wire encoding.
Definition: lp-packet-types.h:61
const LpPacketHeaderFieldLite & getHeaderField(int index) const
Get the header field at the given index.
Definition: lp-packet-lite.hpp:129
const BlobLite & getFragmentWireEncoding() const
Get the fragment wire encoding.
Definition: lp-packet-lite.hpp:113