Interface: tos.interfaces.Intercept
interface Intercept
- Author:
-
Philip Levis
Events
event result_t intercept(TOS_MsgPtr msg, void *payload, uint16_t payloadLen)
Events - Details
intercept
event result_t intercept(TOS_MsgPtr msg, void *payload, uint16_t payloadLen)
- Parameters:
-
msg
- The complete buffer received.
-
payload
- The payload portion of the packet for this
protocol layer. If this layer has layers above it, it should signal
receive() with payload incremented by the size of its header. Payload
is a pointer into the msg structure.
-
payloadLen
- The length of the payload buffer. If this layer
has layers above it, it should signal receive() with payloadLen
decreased by the size of its headers and footers.
- Returns:
-
SUCCESS indicates the packet should be forwarded, FAIL
indicates that it should not be forwarded.