VxWorks Reference Manual : Libraries

pppHookLib

NAME

pppHookLib - PPP hook library

ROUTINES

pppHookAdd( ) - add a hook routine on a unit basis
pppHookDelete( ) - delete a hook routine on a unit basis

DESCRIPTION

This library provides routines to add and delete connect and disconnect routines. The connect routine, added on a unit basis, is called before the initial phase of link option negotiation. The disconnect routine, added on a unit basis is called before the PPP connection is closed. These connect and disconnect routines can be used to hook up additional software. If either connect or disconnect hook returns ERROR, the connection is terminated immediately.

This library is automatically linked into the VxWorks system image when the configuration macro INCLUDE_PPP is defined.

INCLUDE FILES

pppLib.h

SEE ALSO

pppHookLib, pppLib, VxWorks Programmer's Guide: Network


Libraries : Routines

pppHookAdd( )

NAME

pppHookAdd( ) - add a hook routine on a unit basis

SYNOPSIS

STATUS pppHookAdd
    (
    int     unit,    /* unit number */
    FUNCPTR hookRtn, /* hook routine */
    int     hookType /* hook type connect/disconnect */
    )

DESCRIPTION

This routine adds a hook to the Point-to-Point Protocol (PPP) channel. The parameters to this routine specify the unit number (unit) of the PPP interface, the hook routine (hookRtn), and the type of hook specifying either a connect hook or a disconnect hook (hookType). The following hook types can be specified for the hookType parameter:

PPP_HOOK_CONNECT
Specify a connect hook.

PPP_HOOK_DISCONNECT
Specify a disconnect hook.

RETURNS

 OK, or ERROR if the hook cannot be added to the unit.

SEE ALSO

pppHookLib, pppHookDelete( )


Libraries : Routines

pppHookDelete( )

NAME

pppHookDelete( ) - delete a hook routine on a unit basis

SYNOPSIS

STATUS pppHookDelete
    (
    int unit,    /* unit number */
    int hookType /* hook type connect/disconnect */
    )

DESCRIPTION

This routine deletes a hook added previously to the Point-to-Point Protocol (PPP) channel. The parameters to this routine specify the unit number (unit) of the PPP interface and the type of hook specifying either a connect hook or a disconnect hook (hookType). The following hook types can be specified for the hookType parameter:

PPP_HOOK_CONNECT
Specify a connect hook.

PPP_HOOK_DISCONNECT
Specify a disconnect hook.

RETURNS

 OK, or ERROR if the hook cannot be deleted for the unit.

SEE ALSO

pppHookLib, pppHookAdd( )