VxWorks API Reference : OS Libraries

ifIndexLib

NAME

ifIndexLib - interface index library

ROUTINES

ifIndexLibInit( ) - initializes library variables
ifIndexLibShutdown( ) - frees library variables
ifIndexAlloc( ) - return a unique interface index
ifIndexTest( ) - returns true if an index has been allocated.


OS Libraries : Routines

ifIndexLibInit( )

NAME

ifIndexLibInit( ) - initializes library variables

SYNOPSIS

void ifIndexLibInit (void)

DESCRIPTION

ifIndexLibInit( ) resets library internal state. This function must be called before any other functions in this library.

RETURNS

N/A

SEE ALSO

ifIndexLib


OS Libraries : Routines

ifIndexLibShutdown( )

NAME

ifIndexLibShutdown( ) - frees library variables

SYNOPSIS

void ifIndexLibShutdown (void)

DESCRIPTION

ifIndexLibShutdown( ) frees library internal structures. ifIndexLibInit( ) must be called before the library can be used again.

RETURNS

N/A

SEE ALSO

ifIndexLib


OS Libraries : Routines

ifIndexAlloc( )

NAME

ifIndexAlloc( ) - return a unique interface index

SYNOPSIS

int ifIndexAlloc (void)

DESCRIPTION

ifIndexAlloc( ) returns a unique integer to be used as an interface index. The first index returned is 1. ERROR is returned if the library has not been initialized by a call to ifIndexLibInit( );

RETURNS

interface index or ERROR

SEE ALSO

ifIndexLib


OS Libraries : Routines

ifIndexTest( )

NAME

ifIndexTest( ) - returns true if an index has been allocated.

SYNOPSIS

BOOL ifIndexTest
    (
    int ifIndex               /* the index to test */
    )

DESCRIPTION

ifIndexTest( ) returns TRUE if index has already been allocated by ifIndexLibAlloc( ). Otherwise returns FALSE. If the library has not been initialized returns FALSE. This function does not check if the index actually belongs to a currently valid interface.

RETURNS

TRUE or FALSE

SEE ALSO

ifIndexLib