When control messages are passed via
send{Up,Down}stream{Packet,Control}, the emulator takes ownership of the
control message. Control messages are destroyed after the processing
thread associated with the receiving NEM layer completes its respective
callback: process{Up,Down}stream{Packet,Control}.

If you would like to retain a control message you will need to clone it.
Once cloned, it is your responsibility to delete it unless you transfer
ownership to the emulator in a future call.


On 04/09/2018 07:24 PM, b...@robocomai.com wrote:
> This question will reveal that I am uncertain about the allocations and
> deallocation of both packets and control messaging within the EMANE
> stack, in terms of allocation and deallocation endpoints and conventions.
>  
> For the EMANE TimingAnalysis shim layer, when handling upstream and
> downstream packets with control and upstream and downstream control only
> messages, these messages are cloned before passing between upstream and
> downstream layers.
>  
> Why is this necessary for controls messages, and perhaps not for data
> packets themselves.
>  
> I suppose the answer comes from knowing the allocation and deallocation
> conventions used.
>  
> I want to create a shim that can fit between MAC and EMANE internal PHY
> layers, and could equally move to above the MAC and perhaps below the
> EMANE PHY.
> 
> 
> _______________________________________________
> emane-users mailing list
> emane-users@nrl.navy.mil
> https://publists.nrl.navy.mil/mailman/listinfo/emane-users
> 
_______________________________________________
emane-users mailing list
emane-users@nrl.navy.mil
https://publists.nrl.navy.mil/mailman/listinfo/emane-users

Reply via email to