46 #define TIME_STAMP_SEQ_NR 12
48 #define DIRECTORY_LEN 14
49 #define FRAG_OFFSET 15
50 #define APP_DATA_LEN 16
53 #define BUNDLE_BLOCK_TYPE_PAYLOAD 0x01
56 #define REASON_NO_INFORMATION 0x00
57 #define REASON_LIFETIME_EXPIRED 0x01
58 #define REASON_UNIDIRECTIONAL_LINK 0x02
59 #define REASON_TRANSMISSION_CANCELED 0x03
60 #define REASON_DEPLETED_STORAGE 0x04
61 #define REASON_DEST_EID_UNINTELLIGBLE 0x05
62 #define REASON_NO_ROUTE 0x06
63 #define REASON_NO_TIMELY_CONTACT 0x07
64 #define REASON_BLOCK_UNINTELLIGBLE 0x08
65 #define REASON_DELIVERED 0xFF
68 #define BUNDLE_FLAG_FRAGMENT 0x0001
69 #define BUNDLE_FLAG_ADM_REC 0x0002
70 #define BUNDLE_FLAG_DONT_FRAG 0x0004
71 #define BUNDLE_FLAG_CUST_REQ 0x0008
72 #define BUNDLE_FLAG_SINGLETON 0x0010
73 #define BUNDLE_FLAG_ACK_REQ 0x0020
75 #define BUNDLE_FLAG_PRIOL 0x0080
76 #define BUNDLE_FLAG_PRIOH 0x0100
78 #define BUNDLE_FLAG_REP_RECV 0x4000
79 #define BUNDLE_FLAG_REP_CUST 0x8000
80 #define BUNDLE_FLAG_REP_FWD 0x10000
81 #define BUNDLE_FLAG_REP_DELIV 0x20000
82 #define BUNDLE_FLAG_REP_DELETE 0x40000
85 #define BUNDLE_FLAG_REPORT (BUNDLE_FLAG_REP_RECV | BUNDLE_FLAG_REP_CUST | BUNDLE_FLAG_REP_FWD | BUNDLE_FLAG_REP_DELIV | BUNDLE_FLAG_REP_DELETE)
88 #define BUNDLE_PRIORITY_BULK 0x0000
89 #define BUNDLE_PRIORITY_NORMAL 0x0080
90 #define BUNDLE_PRIORITY_EXPEDITED 0x0100
91 #define BUNDLE_PRIORITY_RESERVED 0x0180
93 #define BUNDLE_PRIORITY_MASK 0x0180
96 #define BUNDLE_BLOCK_FLAG_NULL 0x00
97 #define BUNDLE_BLOCK_FLAG_REPL 0x01
98 #define BUNDLE_BLOCK_FLAG_STAT 0x02
99 #define BUNDLE_BLOCK_FLAG_DEL 0x04
100 #define BUNDLE_BLOCK_FLAG_LAST 0x08
101 #define BUNDLE_BLOCK_FLAG_DISC 0x10
102 #define BUNDLE_BLOCK_FLAG_NOTPR 0x20
103 #define BUNDLE_BLOCK_FLAG_EID 0x40
111 struct bundle_block_t {
152 packetbuf_attr_t rssi;
153 struct process * source_process;
160 uint8_t block_data[];
187 uint8_t
bundle_set_attr(
struct mmem *bundlemem, uint8_t attr, uint32_t *val);
196 uint8_t
bundle_get_attr(
struct mmem *bundlemem, uint8_t attr, uint32_t *val);
222 int bundle_add_block(
struct mmem * bundlemem, uint8_t type, uint8_t
flags, uint8_t * data, uint8_t d_len);
230 struct bundle_block_t *
bundle_get_block(
struct mmem * bundlemem, uint8_t i);