Hello Carson.
The generation and processing of extension blocks is different to the way how it is done in DTN2. There is no explicit block processor for implementing new types. Each block has to be implemented as a seperate class. The class AgeBlock is a good reference for a simple example.
Once the class is implemented, you can use the methods of the bundle class to generate / attach new blocks to a bundle. As Sebastian already told this works that way:
## Retrieve a block ## const dtn::data::PayloadBlock &p = b.getBlockdtn::data::PayloadBlock();
## Getting all AgeBlocks from a bundle ## const std::list<const dtn::data::AgeBlock*> ageblocks = b.getBlocksdtn::data::AgeBlock();
## Adding an AgeBlock ## b.push_frontdtn::data::AgeBlock();
Kind regards, Johannes
Am 09.03.2012 17:15, schrieb Carson Dunbar:
Hello Johannes, I'm currently trying to work on a new router for IBR-DTN based on the ebr and simpleNC router for DTN2. I am basically trying to transcribe the code for those routers into IBR-DTN. Right now I am trying to work on a block processor so that I can use extension blocks for carrying encoded bundles. Where in the IBR-DTN code can I look for a block processor or does IBR-DTN handle block processing in a significantly different manner than DTN2? If so could you explain how extensions blocks are created and handled? Thank you
Carson Dunbar