Hello Brenton,
take a look at the AgeBlock implementation. It does something similar to what you want.
https://github.com/ibrdtn/ibrdtn/blob/master/ibrdtn/ibrdtn/ibrdtn/data/AgeBl...
The clue is that you not really change the contents of your local block copy. Instead you just serialize it in a different way that it contains the content you want to attach to each sent bundle.
You may also consider the TrackingBlock, since it does something similar to what you want and is intended to track geo-positions too (if someone would add this feature).
https://github.com/ibrdtn/ibrdtn/blob/master/ibrdtn/ibrdtn/ibrdtn/data/Track...
Kind regards, Johannes
Am 24.04.2014 16:57, schrieb Brenton Walker:
Hi, I am trying to write an extension block processor. This block will log some information about where the node has been while the bundle was stored on the node. The problem I am running in to is that I want to update the contents of the block right before it is sent, but I'm not finding a good way to do that. Both getLength() and serialize() and the << operator are const.
I think DTN2 runs a "finalize" pass on all the blocks before they
are finally generated. I would think something like that would be needed for the BSP blocks too, but I can't figure it out. Is there a "right" way to do this in ibrdtn?
Thanks, Brenton