This is the packet receiver callback function type that applies to the cbRecvfunc member of the PktHandle structure.
This callback function is executed by pktIncomingPacket(). The call occurs when a packet is received whose type matches one of the installed packet traps.
- The function must copy the received data into a buffer provided by the users application, if this data is required after the return from this callback. The provided buffer content will no longer be valid after return from this callback function.
Although it is not explicitly declared so by this callback prototype, the
buffer pointer should be considered "const" type and the referenced data treated as "read-only".
The return value from this callback should be zero on success and -1 on failure.
- See also
- pktSetAccessType( )