Jump to: navigation, search

Table of Contents >> Programmer's Reference

#include <trsocket.h>

int tfRecvScatInterface (ttUserInterface interfaceHandle);

Function Description

This function is used to start processing of an incoming packet from the device driver, and can handle scattered data within a single frame ("Gather Read"). When the user has been notified that an incoming packet has arrived (via either tfCheckReceiveInterface(), or tfWaitReceiveInterface()), it then calls tfRecvScatInterface() so that the stack can call the driver scattered receive function, and retrieve the data. tfRecvScatInterface() first calls the driver's scattered recv routine (as specified in the tfUseInterfaceScatRecv() API), and then begins processing of the packet. The packet is processed in the context of the caller of this function.

Note Note: The user should use tfRecvScatInterface() instead of tfRecvInterface() when the user wishes to support scattered data within a received frame ("Gather Read") in the device driver recv processing. The user needs to define TM_USE_DRV_SCAT_RECV, and needs to have called tfUseInterfaceScatRecv() successfully on that interface. If the user has not called tfUseInterfaceScatRecv() on that interface, then tfRecvInterface() should be called instead.


  • interfaceHandle
    The interface handle of the device to receive the scattered data from as returned by tfAddInterface().


    Insufficient memory to complete the operation.
    One of the parameters returned by the scattered device driver recv function is invalid.

Table of Contents >> Programmer's Reference