NC router on IBR-DTN
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
Hi Carson,
this week Johannes in on holiday. I do not know enough about the IBR-DTN C++ side to really answer your question comprehensively , so maybe better wait for his return. But if you want to start poking around, I guess the following snippets might be a good starting point:
b being a Bundle object, accessing the a payload block should work like this
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();
The AgeBlock.cpp itself should give some insight into how to create your own blocks. I am not sure if this is all the ingredients you need, but good luck! :)
MfG
Sebastian
Am 09.03.2012 um 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
!! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to ibr-dtn-request@ibr.cs.tu-bs.de !! or look at https://www.ibr.cs.tu-bs.de/mailman/listinfo/ibr-dtn.
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
participants (3)
-
Carson Dunbar
-
Johannes Morgenroth
-
Sebastian Schildt