Most likely you have a nested message structure something like this:
cc2420_header_t
6lowpan_header (or whatever the actual name is)
message data
where the 6lowpan_header is at the beginning of the "regular"
cc2420 message payload data. Looking at some of the code should
(in)validate this, assuming that there is no actual documentation.
So probably all you need to do is get the packet payload pointer
and cast it to your 6lowpan_header type.
MS
Aaron Rosen wrote:
> Hello,
>
> I'm trying to detect in loadTXFIFO() at
> /opt/tinyos-2.1.1/tos/chips/cc2420/transmit/CC2420TransmitP.nc if a
> packet is a fragmented ipv6 lowpan packet.
>
> There it calls:
>
> cc2420_header_t* header = call CC2420PacketBody.getHeader( m_msg );
>
> and I know that header->type (value 248) are 6lowpan packets. I'm
> guessing that the whole packet is contained in *(header) to *(header
> +header->length) (meaning the payload is there as well).
>
> I was wondering if there was an easy way to cast the rest of that to
> something where I could get to the 6lowpan header?
>
> Thanks!
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help