All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
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 "congestion-mark-types.h"
28 #include "../network-nack-types.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
37 typedef enum {
38  ndn_LpPacketHeaderFieldType_INCOMING_FACE_ID = 1,
39  ndn_LpPacketHeaderFieldType_NETWORK_NACK = 2,
40  ndn_LpPacketHeaderFieldType_CONGESTION_MARK = 3
41 } ndn_LpPacketHeaderFieldType;
42 
48  ndn_LpPacketHeaderFieldType type;
49  union {
50  struct ndn_IncomingFaceId incomingFaceId;
51  struct ndn_NetworkNack networkNack;
52  struct ndn_CongestionMark congestionMark;
53  };
54 };
55 
60 struct ndn_LpPacket {
64  size_t maxHeaderFields;
65  size_t nHeaderFields;
66 };
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif
size_t maxHeaderFields
the number of elements in the allocated headerFields array.
Definition: lp-packet-types.h:64
An ndn_LpPacketHeaderField holds a type and a union with values for the different types of LP packet ...
Definition: lp-packet-types.h:47
An ndn_LpPacket holds a list of LP packet header fields and an optional fragment wire encoding...
Definition: lp-packet-types.h:60
Copyright (C) 2018 Regents of the University of California.
Definition: congestion-mark-types.h:33
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:63
size_t nHeaderFields
the number of header fields in the packet.
Definition: lp-packet-types.h:65
Copyright (C) 2015-2018 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:61
Copyright (C) 2016-2018 Regents of the University of California.
Definition: incoming-face-id-types.h:36