![]() |
Home |
|
Function cb_packetoutThis callback is called by RTIP-32 before an outgoing data packet is sent: int cb_packetout(int interface, byte * data, int length, int buffer_size); ParametersinterfaceInterface number (as returned by xn_interface_open or xn_interface_open_config) on which the packet will be sent. dataPointer to the packet's data. lengthNumber of bytes pointed to by parameter data. buffer_sizeNumber of bytes the buffer pointed to by data can hold. buffer_size will always be >= length. return valueNumber of bytes RTIP-32 should send at *data. If 0 is returned, RTIP-32 will discard this packet without sending it. This callback can be used to intercept outgoing packets. The callback function may modify the data pointed to by parameter data, if designed. It must return the number of bytes RTIP-32 should send. If the packet data is not modified and RTIP-32 should continue normal processing, return parameter length. To discard the data, return 0.
|