On 19/09/2013, jpam <[email protected]> wrote: > Because I'm building a NIDS and I need the some node (/watchdogs/) to act > "promiscuously" and analyze the packets exchanged in their neighborhood. > For > that, I need to access the packet as soon as the radio downloads it and > before it discards if it's not destined to the mote. To the best of my > knowledge, I should do that in file CC2420XDriverLayerP (as modified in the > application PPPSniffer). The packets aren't sent up the stack if the node > isn't the final destination, are they?
>From memory, and this is hazy since it's been something like two years since I worked with this stuff, there are two places in the stack where the address filtering can happen: 1) Hardware filtering by the radio, if available & enabled. I was using the RF212 and this wasn't active then. 2) In the radio driver's receive function. If you disable these, I believe you should be able to use the IPRaw interface on the IPStackC to listen in on all of the IP messages, whether they're for your node or not (as long as they're on the same PAN; if they're not, there are additional checks in IPDispatchP and Ieee154PacketLayer that would need to be removed, iirc). You might need to do something to the IP forwarding engine to prevent it from acting as a router in the above scenario (but that's probably a good idea on an NIDS anyway). Hth, /Johny -- Johny Mattsson Senior Software Engineer DiUS Computing Pty. Ltd. *where ideas are engineered* _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
