VxWorks Reference Manual : Libraries

if_ulip

NAME

if_ulip - network interface driver for User Level IP (VxSim)

ROUTINES

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

DESCRIPTION

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.

USER CALLABLE ROUTINES

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.

SEE ALSO

if_ulip, VxWorks Programmer's Guide: VxSim


Libraries : Routines

ulipInit( )

NAME

ulipInit( ) - initialize the ULIP interface (VxSim)

SYNOPSIS

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 */
    )

DESCRIPTION

This routine initializes the ULIP interface and sets the Internet address as a function of the processor number.

RETURNS

OK, or ERROR if the device cannot be opened or there is insufficient memory.

ERRNO

S_if_ul_INVALID_UNIT_NUMBER

SEE ALSO

if_ulip, VxSim User's Guide


Libraries : Routines

ulattach( )

NAME

ulattach( ) - attach a ULIP interface to a list of network interfaces (VxSim)

SYNOPSIS

STATUS ulattach
    (
    int unit /* ULIP unit number */
    )

DESCRIPTION

This routine is called by ulipInit( ). It inserts a pointer to the ULIP interface data structure into a linked list of available network interfaces.

RETURNS

OK or ERROR.

ERRNO

S_if_ul_UNIT_ALREADY_INITIALIZED

SEE ALSO

if_ulip, VxSim User's Guide


Libraries : Routines

ulipDelete( )

NAME

ulipDelete( ) - delete a ULIP interface (VxSim)

SYNOPSIS

STATUS ulipDelete
    (
    int unit /* ULIP unit number */
    )

DESCRIPTION

This routine detaches the ULIP unit and frees up system resources taken up by this ULIP interface.

RETURNS

OK, or ERROR if the unit number is invalid or the interface is uninitialized.

ERRNO

S_if_ul_INVALID_UNIT_NUMBER, S_if_ul_UNIT_UNINITIALIZED

SEE ALSO

if_ulip, VxSim User's Guide


Libraries : Routines

ulStartOutput( )

NAME

ulStartOutput( ) - push packets onto "interface"

SYNOPSIS

#ifdef BSD43_DRIVER LOCAL STATUS ulStartOutput
    (
    int unit
    )

DESCRIPTION

SEE ALSO

if_ulip


Libraries : Routines

ulipDebugSet( )

NAME

ulipDebugSet( ) - Set debug flag in UNIX's ULIP driver

SYNOPSIS

STATUS ulipDebugSet
    (
    int debugFlag
    )

DESCRIPTION

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.

RETURNS

OK or ERROR if the ioctl fails

SEE ALSO

if_ulip