IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page

typedef int(* PktRecvCbPtr)(void *buffer, int length)

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(), which in turn must have been called by the respective device driver's receive function. 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. The system makes no direct use of this return value other than to pass it along up to the caller of the pktIncomingPacket() API. (The internal Ethernet driver ignores this returned value.)

SC2x3 V1.00 - CLIB V1.00
See also:
pktSetAccessType( )

Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Thu Nov 1 13:20:15 2018 by Doxygen 1.6.1