VxWorks Reference Manual : Libraries
pppHookLib - PPP hook library
pppHookAdd( ) - add a hook routine on a unit basis
pppHookDelete( ) - delete a hook routine on a unit basis
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.
pppLib.h
pppHookLib, pppLib, VxWorks Programmer's Guide: Network
pppHookAdd( ) - add a hook routine on a unit basis
STATUS pppHookAdd ( int unit, /* unit number */ FUNCPTR hookRtn, /* hook routine */ int hookType /* hook type connect/disconnect */ )
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.
OK, or ERROR if the hook cannot be added to the unit.
pppHookDelete( ) - delete a hook routine on a unit basis
STATUS pppHookDelete ( int unit, /* unit number */ int hookType /* hook type connect/disconnect */ )
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.
OK, or ERROR if the hook cannot be deleted for the unit.
pppHookLib, pppHookAdd( )