Struct:ttDruBlock

Jump to: navigation, search
 
#define trsocket.h
 
#ifdef TM_USE_DRV_SCAT_RECV
/*
 * . Data type to convey information from the device driver scattered
 *   recv function to the tfRecvScatInterface() API.
 */
typedef struct tsDruBlock
{
#define druBufferPtr      druBufferUnion.druUnBufferPtr
#define druStackBufferPtr druBufferUnion.druUnStackBufferPtr
    union
    {
/*
 * Device Driver Scattered Recv API:
 * . using non pre-allocated device driver buffers, or
 * . using Turbo Treck pre-allocated device driver buffer (from
 *   tfGetDriverBuffer/tfGetEthernetBuffer) (pointer to buffer as gotten
 *   from the first parameter of tfGetDriverBuffer/tfGetEthernetBuffer).
 *
 * Pointer to buffer that will be passed to the device driver scattered
 * free routine (non pre-allocated device driver buffers, or to the
 * stack (pre-allocated device driver buffers)
 */
        char     TM_FAR * druUnBufferPtr;
        ttUserBuffer      druUnStackBufferPtr;
    } druBufferUnion;
/* Pointer to beginning of data */
    char TM_FAR * druDataPtr;
/* Data length */
    int           druDataLength;
#ifdef TM_USE_USER_PARAM
/* User-defined data */
    ttUserGenericUnion    druUserParam;
#endif /* TM_USE_USER_PARAM */
} ttDruBlock;
 
typedef ttDruBlock    TM_FAR * ttDruBlockPtr;
typedef ttDruBlockPtr TM_FAR * ttDruBlockPtrPtr;
#endif /* TM_USE_DRV_SCAT_RECV */