lp-packet-types.h
1 
22 #ifndef NDN_LP_PACKET_TYPES_H
23 #define NDN_LP_PACKET_TYPES_H
24 
25 #include "../util/blob-types.h"
26 #include "incoming-face-id-types.h"
27 #include "../network-nack-types.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
36 typedef enum {
37  ndn_LpPacketHeaderFieldType_INCOMING_FACE_ID = 1,
38  ndn_LpPacketHeaderFieldType_NETWORK_NACK = 2
39 } ndn_LpPacketHeaderFieldType;
40 
46  ndn_LpPacketHeaderFieldType type;
47  union {
48  struct ndn_IncomingFaceId incomingFaceId;
49  struct ndn_NetworkNack networkNack;
50  };
51 };
52 
57 struct ndn_LpPacket {
61  size_t maxHeaderFields;
62  size_t nHeaderFields;
63 };
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif
size_t maxHeaderFields
the number of elements in the allocated headerFields array.
Definition: lp-packet-types.h:61
An ndn_LpPacketHeaderField holds a type and a union with values for the different types of LP packet ...
Definition: lp-packet-types.h:45
An ndn_LpPacket holds a list of LP packet header fields and an optional fragment wire encoding...
Definition: lp-packet-types.h:57
An ndn_NetworkNack represents a network Nack packet and includes a Nack reason.
Definition: network-nack-types.h:48
struct ndn_LpPacketHeaderField * headerFields
pointer to the array of ndn_LpPacketHeaderField.
Definition: lp-packet-types.h:60
size_t nHeaderFields
the number of header fields in the packet.
Definition: lp-packet-types.h:62
Copyright (C) 2015-2016 Regents of the University of California.
Definition: blob-types.h:33
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
Copyright (C) 2016 Regents of the University of California.
Definition: incoming-face-id-types.h:36