VxWorks API Reference : Driver Libraries

wdbEndPktDrv

NAME

wdbEndPktDrv - END based packet driver for lightweight UDP/IP

ROUTINES

wdbEndPktDevInit( ) - initialize an END packet device

DESCRIPTION

This is an END based driver for the WDB system. It uses the MUX and END based drivers to allow for interaction between the target and target server.

USAGE

The driver is typically only called only from the configlette wdbEnd.c. The only directly callable routine in this module is wdbEndPktDevInit( ). To use this driver, just select the component INCLUDE_WDB_COMM_END in the folder SELECT_WDB_COMM_TYPE. This is the default selection. To modify the MTU, change the value of parameter WDB_END_MTU in component INCLUDE_WDB_COMM_END.

DATA BUFFERING

The drivers only need to handle one input packet at a time because the WDB protocol only supports one outstanding host-request at a time. If multiple input packets arrive, the driver can simply drop them. The driver then loans the input buffer to the WDB agent, and the agent invokes a driver callback when it is done with the buffer.

For output, the agent will pass the driver a chain of mbufs, which the driver must send as a packet. When it is done with the mbufs, it calls wdbMbufChainFree( ) to free them. The header file wdbMbufLib.h provides the calls for allocating, freeing, and initializing mbufs for use with the lightweight UDP/IP interpreter. It ultimately makes calls to the routines wdbMbufAlloc and wdbMbufFree, which are provided in source code in the configlette usrWdbCore.c.

INCLUDE FILES

drv/wdb/wdbEndPktDrv.h


Driver Libraries : Routines

wdbEndPktDevInit( )

NAME

wdbEndPktDevInit( ) - initialize an END packet device

SYNOPSIS

STATUS wdbEndPktDevInit
    (
    WDB_END_PKT_DEV * pPktDev, /* device structure to init */
    void (* stackRcv) (),      /* receive packet callback (udpRcv) */
    char *            pDevice, /* Device (ln, ie, etc.) that we wish to */
                               /* bind to. */ 
    int               unit     /* unit number (0, 1, etc.) */
    )

DESCRIPTION

This routine initializes an END packet device. It is typically called from configlette wdbEnd.c when the WDB agent's lightweight END communication path (INCLUDE_WDB_COMM_END) is selected.

RETURNS

OK or ERROR

SEE ALSO

wdbEndPktDrv