VxWorks Reference Manual : Libraries
if_ulip - network interface driver for User Level IP (VxSim)
ulipInit( ) - initialize the ULIP interface (VxSim)
ulattach( ) - attach a ULIP interface to a list of network interfaces (VxSim)
ulipDelete( ) - delete a ULIP interface (VxSim)
ulStartOutput( ) - push packets onto "interface"
ulipDebugSet( ) - Set debug flag in UNIX's ULIP driver
This module implements the VxWorks User Level IP (ULIP) network driver. The ULIP driver allows VxWorks under UNIX to talk to other machines by handing off IP packets to the UNIX host for processing.
The ULIP driver is automatically included and initialized by the VxSim BSPs; normally there is no need for applications to use these routines directly.
When initializing the device, it is necessary to specify the Internet address for both sides of the ULIP point-to-point link (local side and the remote side of the connection) using ulipInit( ).
STATUS ulipInit ( int unit, /* ULIP unit number (0 - NULIP-1) */ char *myAddr, /* IP address of the interface */ char *peerAddr, /* IP address of the remote peer interface */ int procnum /* processor number to map to ULIP interface */ )For example, the following initializes a ULIP device whose Internet address is 127.0.1.1:ulipInit (0, "127.0.1.1", "147.11.1.132", 1);The standard network interface call is:STATUS ulattach ( int unit /* unit number */ )However, it should not be called. The following call will delete the first ULIP interface from the list of network interfaces:ulipDelete (0); /* unit number */Up to NULIP(2) units may be created.
if_ulip, VxWorks Programmer's Guide: VxSim
ulipInit( ) - initialize the ULIP interface (VxSim)
STATUS ulipInit ( int unit, /* ULIP unit number (0 - NULIP-1) */ char * myAddr, /* IP address of the interface */ char * peerAddr, /* IP address of the remote peer interface */ int procnum /* processor number to map to ULIP interface */ )
This routine initializes the ULIP interface and sets the Internet address as a function of the processor number.
OK, or ERROR if the device cannot be opened or there is insufficient memory.
S_if_ul_INVALID_UNIT_NUMBER
if_ulip, VxSim User's Guide
ulattach( ) - attach a ULIP interface to a list of network interfaces (VxSim)
STATUS ulattach ( int unit /* ULIP unit number */ )
This routine is called by ulipInit( ). It inserts a pointer to the ULIP interface data structure into a linked list of available network interfaces.
OK or ERROR.
S_if_ul_UNIT_ALREADY_INITIALIZED
if_ulip, VxSim User's Guide
ulipDelete( ) - delete a ULIP interface (VxSim)
STATUS ulipDelete ( int unit /* ULIP unit number */ )
This routine detaches the ULIP unit and frees up system resources taken up by this ULIP interface.
OK, or ERROR if the unit number is invalid or the interface is uninitialized.
S_if_ul_INVALID_UNIT_NUMBER, S_if_ul_UNIT_UNINITIALIZED
if_ulip, VxSim User's Guide
ulStartOutput( ) - push packets onto "interface"
#ifdef BSD43_DRIVER LOCAL STATUS ulStartOutput ( int unit )
ulipDebugSet( ) - Set debug flag in UNIX's ULIP driver
STATUS ulipDebugSet ( int debugFlag )
This function uses an ioctl call to UNIX's (Solaris's) ULIP driver to set that driver's debugging flag to the value in debugFlag. Because there is no simple way for the caller to assertain the unit number of the interface in use, all unit numbers are looped over and each receives the ioctl. Possible values for the debug flag are discussed above in this file, although all the levels have not been implemented.
This is not the right place to put this function (user callable routines would be more appropriately placed in simLib.h). Because of the requirement to use both Sun structures (to bundle ioctl data) and VxWorks structures (ul_softc), and given the same requirements when calling the FIOSETUSED ioctl, this seems the best place to put it.
OK or ERROR if the ioctl fails