Function Prototypes:ttDevRecvFunc

Jump to: navigation, search

Table of Contents >> Programmer's Reference >> tfAddInterface


int ttDevRecvFunc (
ttUserInterface interfaceHandle,
char TM_FAR * TM_FAR * dataPtr,
int TM_FAR dataLength,
ttUserBufferPtr bufHandlePtr,
ttDevRecvOffloadPtr devRecvOffloadPtr
);
Conditional parameter. See details in Parameters below.


Function Description

This device driver function is defined by the user and called by Treck to receive data into the protocol stack. The stack will call this routine to retrieve a frame from the device driver. For more details on the device driver receive routine, please click here.


Parameters

  • interfaceHandle
    The interface on which to send the data.
  • dataPtr
    A pointer to the data to be received.
  • dataLength
    The length of the data to be received.
  • bufHandlePtr
    The user buffer in which to store the received frame. If the driver's receive buffer is to be used directly this may be NULL.
  • devRecvOffloadPtr
    A pointer to the ttDevRecvOffloadStruct structure containing information on the offloaded checksum and TCP segmentation calculations. This parameter is only present when TM_DEV_RECV_OFFLOAD is defined at compile time.


Returns

  • int
    One of the two following values:
    TM_DEV_OKAY: Success
    TM_DEV_ERROR: Error.


Table of Contents >> Programmer's Reference >> tfAddInterface