On Fri, Nov 20, 2009 at 6:57 AM, Anand Chandrashekar <[email protected]> wrote:
> Hello,
>           I require some urgent guidance in this regard. We were
> implementing a transport protocol and to achieve multi-hop routing we need
>  to use the route library. I have a doubt regarding this. The data at the
> final destination is received by the multihop component of the Route Library
> and we need to take that and pass it to the application layer. I was not
> able to figure out as to how we can take the received data from the multihop
> component module of the route library into our program and pass it on to the
> application layer. Should we use the Intercept Interface to get the data
> from the route library module? If so how can we do this? I really need some
> urgent help with respect to this. Please guide.

This is how the forwarder signals Intercept:
191     // Ordinary message requiring forwarding
  192     if (pMsg->addr == TOS_LOCAL_ADDRESS) { // Addressed to local node
  193       if ((signal
Intercept.intercept[id](pMsg,&pMHMsg->data[0],PayloadLen)) == SUCCESS)
{
  194         pMsg = mForward(pMsg,id);
  195       }
  196     }
  197     else {
  198       // Snoop the packet for permiscuous applications
  199       signal Snoop.intercept[id](pMsg,&pMHMsg->data[0],PayloadLen);
  200     }
  201

You need to write a handler for this event in your application after
wiring the Intercept interface to your application. It is similar to
capturing a Timer.fired() event.

- om_p

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

Reply via email to