VxWorks Reference Manual : Libraries
ntEnd - END network interface driver to ULIP for vxSim for Windows NT
ntLoad( ) - initialize the driver and device
ntParse( ) - parse the init string
ntMemInit( ) - initialize memory for the chip
ntPollStart( ) - start polled mode operations
ntPollStop( ) - stop polled mode operations
ntInt( ) - handle controller interrupt
This driver provides a fake ethernet intface to the "ULIP" driver written by WRS. The driver essentially gets packets from vxWorks, and writes them directly to file, where the ULIP driver handles them.
The macro SYS_ENET_ADDR_GET is used to get the ethernet address (MAC) for the device. The single argument to this routine is the NTEND_DEVICE pointer. By default this routine copies the ethernet address stored in the global variable ntEnetAddr into the NTEND_DEVICE structure.
end.h endLib.h etherMultiLib.h
ntEnd, muxLib, endLib Writing and Enhanced Network Driver
ntLoad( ) - initialize the driver and device
END_OBJ * ntLoad ( char * initString, /* String to be parse by the driver. */ void * nothing )
This routine initializes the driver and the device to the operational state. All of the device specific parameters are passed in the initString.
The string contains the target specific parameters like this:
"unit:register addr:int vector:int level:shmem addr:shmem size:shmem width"
An END object pointer or NULL on error.
ntParse( ) - parse the init string
STATUS ntParse ( NTEND_DEVICE * pDrvCtrl, char * initString )
Parse the input string. Fill in values in the driver control structure.
The initialization string format is:
"unit:csrAdr:rapAdr:vecnum:intLvl:memAdrs:memSize:memWidth"
- unit
- Device unit number, a small integer.
- vecNum
- Interrupt vector number (used with sysIntConnect)
- intLvl
- Interrupt level (isn't really used)
OK or ERROR for invalid arguments.
ntMemInit( ) - initialize memory for the chip
STATUS ntMemInit ( NTEND_DEVICE * pDrvCtrl /* device to be initialized */ )
This routine is highly specific to the device.
OK or ERROR.
ntPollStart( ) - start polled mode operations
STATUS ntPollStart ( NTEND_DEVICE* pDrvCtrl )
OK or ERROR.
ntPollStop( ) - stop polled mode operations
STATUS ntPollStop ( NTEND_DEVICE* pDrvCtrl )
This function terminates polled mode operation. The device returns to interrupt mode.
The device interrupts are enabled, the current mode flag is switched to indicate interrupt mode and the device is then reconfigured for interrupt operation.
OK or ERROR.
ntInt( ) - handle controller interrupt
void ntInt ( NTEND_DEVICE * pDrvCtrl, void * pRcvBuffer, int rcvLen )
This routine is called at interrupt level in response to an interrupt from the controller.
N/A.