Hello Omprakash  :

    I have a question about the code in the file CtpForwardingEngineP.nc

    In the implementation of Send.send , you use "hdr = getHeader(msg)" to
make hdr point to the payload field of the msg in order to inset the ctp
header before the "user's data"  , and then you give the values to the
fields of the  data structure of ctp_data_header_t . does these operations
will destroy the "user's data" ?
becase the CTP works well , so i think the "user's data" is not destroied ,
i don't know why .
because the function of getHeader is :
  ctp_data_header_t* getHeader(message_t* m) {
    return (ctp_data_header_t*)call SubPacket.getPayload(m,
sizeof(ctp_data_header_t));
  }
so the returned pointer points to the user's data , so when you evaluate to
the fields , it shoud destroy the original datas according to my
understanding to the pointer . why ? can you give me an explain ?

thank you !!


-- 
zhang jiwen
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to