41 struct bundle_block_t * payload_block =
NULL;
50 if( bundle ==
NULL ) {
58 if( payload_block ==
NULL ) {
68 ret = statusreport_decode(&report, payload_block->payload, payload_block->block_size);
76 if( !(report.status_flags & NODE_DELIVERED_BUNDLE) ) {
81 bundle_number =
HASH.hash_convenience(report.bundle_sequence_number, report.bundle_creation_timestamp, report.source_eid_node, report.fragment_offset, report.fragment_length);
83 LOG(LOGD_DTN, LOG_AGENT, LOGL_INF,
"Received delivery report for bundle %lu from ipn:%lu, deleting", bundle_number, bundle->src_node);
93 uint32_t * bundle_number_ptr;
96 uint8_t received_report = 0;
99 if( bundle->flags & BUNDLE_FLAG_ADM_REC ) {
104 if ((bundle->flags & BUNDLE_FLAG_ADM_REC) && (bundle->dst_node == dtn_node_id)) {
147 if (bundle->flags & BUNDLE_FLAG_CUST_REQ){
149 LOG(LOGD_DTN, LOG_AGENT, LOGL_DBG,
"Handing over to custody");
151 CUSTODY.decide(bundlemem, bundle_number_ptr);
156 bundle_number =
HASH.hash_convenience(bundle->tstamp_seq, bundle->tstamp, bundle->src_node, bundle->frag_offs, bundle->app_len);
168 if( bundle->flags & BUNDLE_FLAG_REP_RECV ) {
173 LOG(LOGD_DTN, LOG_AGENT, LOGL_DBG,
"Handing over to storage");
178 if( received_report ) {
182 if( bundlemem !=
NULL) {
183 LOG(LOGD_DTN, LOG_AGENT, LOGL_DBG,
"Sending out delivery report for bundle %lu", bundle_number);
198 process_post(&agent_process, dtn_bundle_in_storage_event, bundle_number_ptr);