tfUseInterfaceOneScatSend
Table of Contents >> Programmer's Reference
| #include <trsocket.h> |
| int tfUseInterfaceOneScatSend | ( |
| ttUserInterface interfaceHandle, | |
| ttDevOneScatSendFuncPtr drvOneScatSendFuncPtr | |
| ); |
Contents
Function Description
Specify a driver scattered send function that is called once per frame even when the data is scattered on a given interface. tfUseInterfaceOneScatSend() must be called prior to calling tfConfigInterface(), and after having called tfAddInterface(), to replace the device driver send function specified in tfAddInterface(). Once tfUseInterfaceOneScatSend() has been called, the device send logic in the Treck stack will call the specified single call device driver scattered send function, instead of the one provided in tfAddInterface().
| TM_USE_DRV_ONE_SCAT_SEND must be defined in <trsystem.h> |
Parameters
- interfaceHandle
- The interface handle of the device we wish to send data through.
- drvOneScatSendFuncPtr
- A function pointer to the device driver's send function that handles scattered data within a frame in a single call.
Returns
- TM_ENOERROR
- Success.
- TM_EINVAL
- One of the parameters is invalid.
- TM_EPERM
- The interface has already been opened or the interface is a Point-to-Point interface (SLIP or PPP) or a transmit queue has been configured on the interface.
devOneScatSendFunc
int devOneScatSendFunc(ttUserInterface interfaceHandle,
ttUserPacketPtr packetUPtr);
devOneScatSendFunc Parameters
- interfaceHandle
- The interface handle of the device we wish to send data through.
- packetUPtr
- A pointer to a structure (ttUserPacket) that contains all of the interface on the frame to be sent.
ttUserPacket Fields
- pktuLinkNextPtr
- Points to the next ttUserPacket structure.
- pktuLinkDataPtr
- Points to the data in the current link.
- pktuLinkDataLength
- Contains the length of the data in the current link.
- pktuLinkChainDataLength
- Contains the total length of the scattered data. Its values is only valid in the first link.
- pktuLinkExtraCount
- Contains the number of extra links besides the first one. Its value is only valid in the first link.
The single-call-per-frame user device driver send function will loop through all the links of the scattered frame in order to send a complete frame.