Hi,
My Problem is: An intermediate relay node needs to modify some fields of a
packet when it receives it
from on its way to the Sink. Can do it in CTP, but failed to do in RPL
(udp).
A-----> B ----> BS
Here A is the sender, when B receives a packet from A, it should modify
some field of the packet(what it modifies is
not the main focus).
I did it when CTP was used at the Routing Layer.
1. Packet structure used :
typedef nx_struct my_msg {
nx_uint16_t origin; // sender's ID
nx_uint16_t pktcounter; // packet number
nx_uint16_t reading; // sensor data , i.e. temperature here
nx_uint16_t pathhash; // the value needs to be modifed
} my_msg_t;
2. Used interface is Intercept.
event bool Intercept.forward(message_t* msg, void* payload, uint8_t len){
my_msg_t *inp = payload;
inp->pathhash=getHash(); // getHash is function that returns some
integer value.
return TRUE;
}// end of forward
And it worked as expected. I received the modified packet at the Sink.
3. The same requirement is needed for RPL (instead of CTP). How I am trying
is following:
Used interface is IPForward.
event void IPForward.recv(struct ip6_hdr *iph, void *payload, struct
ip6_metadata *meta){
my_msg_t *inp=payload;
inp->pathhash=getHash();
// tested the LEDs to detect if this is the event:
call Leds.led2Toggle();
}
4. The Led Toggles an the intermediate node (here B) when it receives a
packet from its
source (A) , but data (pathhash field) is not modified in the packet.
I am getting the original (unaltered) values from the source.
Regards,
--
Abu Raihan M Kamal
Researcher
NIMBUS, Cork Institute of Technology (CIT)
Cork, Ireland
http://nimbus.cit.ie/
Cell: +353-860390728
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help