00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _CIPHERSUITE_BA1_H_
00018 #define _CIPHERSUITE_BA1_H_
00019
00020 #ifdef BSP_ENABLED
00021
00022 #include "bundling/BlockProcessor.h"
00023 #include "BA_BlockProcessor.h"
00024
00025 namespace dtn {
00026
00030 class Ciphersuite_BA1 : public Ciphersuite {
00031 public:
00033 Ciphersuite_BA1();
00034
00035 virtual u_int16_t cs_num();
00036
00037 virtual size_t result_len() { return res_len; }
00038
00040
00056 virtual int consume(Bundle* bundle, BlockInfo* block,
00057 u_char* buf, size_t len);
00058
00065 virtual bool validate(const Bundle* bundle,
00066 BlockInfoVec* block_list,
00067 BlockInfo* block,
00068 status_report_reason_t* reception_reason,
00069 status_report_reason_t* deletion_reason);
00070
00079 virtual int prepare(const Bundle* bundle,
00080 BlockInfoVec* xmit_blocks,
00081 const BlockInfo* source,
00082 const LinkRef& link,
00083 BlockInfo::list_owner_t list);
00084
00093 virtual int generate(const Bundle* bundle,
00094 BlockInfoVec* xmit_blocks,
00095 BlockInfo* block,
00096 const LinkRef& link,
00097 bool last);
00098
00106 virtual int finalize(const Bundle* bundle,
00107 BlockInfoVec* xmit_blocks,
00108 BlockInfo* block,
00109 const LinkRef& link);
00110
00111 static void digest(const Bundle* bundle,
00112 const BlockInfo* caller_block,
00113 const BlockInfo* target_block,
00114 const void* buf,
00115 size_t len,
00116 OpaqueContext* r);
00117
00122 enum { res_len = 20, CSNUM_BA1 = 1 };
00124 };
00125
00126 }
00127
00128 #endif
00129
00130 #endif