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 "../../c/lp/lp-packet-types.h"
39 ndn_LpPacketHeaderFieldType
58 const NetworkNackLite&
70 static LpPacketHeaderFieldLite&
152 friend class Tlv0_1_1WireFormatLite;
153 friend class IncomingFaceIdLite;
154 friend class NetworkNackLite;
size_t maxHeaderFields
the number of elements in the allocated headerFields array.
Definition: lp-packet-types.h:61
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
size_t countHeaderFields() const
Get the number of header fields.
Definition: lp-packet-lite.hpp:108
static LpPacketLite & downCast(ndn_LpPacket &lpPacket)
Downcast the reference to the ndn_LpPacket struct to an LpPacketLite.
Definition: lp-packet-lite.hpp:145
An ndn_LpPacket holds a list of LP packet header fields and an optional fragment wire encoding...
Definition: lp-packet-types.h:57
Definition: lp-packet-lite.hpp:83
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:76
IncomingFaceIdLite represents the incoming face ID header field in an NDNLPv2 packet.
Definition: incoming-face-id-lite.hpp:37
struct ndn_LpPacketHeaderField * headerFields
pointer to the array of ndn_LpPacketHeaderField.
Definition: lp-packet-types.h:60
static NetworkNackLite & downCast(ndn_NetworkNack &networkNack)
Downcast the reference to the ndn_NetworkNack struct to an NetworkNackLite.
Definition: network-nack-lite.hpp:96
size_t nHeaderFields
the number of header fields in the packet.
Definition: lp-packet-types.h:62
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:134
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:58
const LpPacketHeaderFieldLite & getHeaderField(int index) const
Get the header field at the given index.
Definition: lp-packet-lite.hpp:117
const BlobLite & getFragmentWireEncoding() const
Get the fragment wire encoding.
Definition: lp-packet-lite.hpp:101