User`s guide

KwikNet PPP Option
K
A
DAK
231
Opening a PPP Network Interface
The KwikNet PPP network driver supervises the orderly opening of the PPP network
interface. During the opening process, your application is given several opportunities to
adjust the manner in which the PPP connection is eventually established.
The network driver calls the network startup hook, if one has been configured for use
by the network interface. The startup hook is specified in the network definition for
prebuilt PPP networks. If the network interface is dynamically added at runtime, a
network startup hook can be registered by calling KwikNet procedure kn_ifnethook().
The network startup hook is described in Appendix A.1 of the KwikNet Device Driver
Technical Reference Manual. The parameters which it receives have been documented in
Chapter 4.5 of this manual.
In the absence of an application specific network hook, the network driver calls its own
default hook, kn_ppp_default_hook(). This KwikNet procedure registers the PPP
negotiation options which you have specified that the PPP stack must follow to establish
the PPP connection. This hook then returns to the network driver leaving the configured
network parameters and options unaltered.
Your network hook can alter the network parameters and options which it receives. It is
the responsibility of the hook to register the required PPP negotiation options with the
PPP protocol stack. You can do so by calling the default KwikNet hook procedure
kn_ppp_default_hook(), passing it the network parameters which your hook has
received, whether modified or not. Of course, your hook function can register the PPP
options itself with the appropriate calls to the Treck PPP service procedures described in
Chapter 7 of the Treck TCP/IP User Manual. You should review the source code of
function kn_ppp_default_hook() in KwikNet file PPP\KN_PPPAA.C for an excellent
example of the use of the Treck API.
Once the network parameters and PPP negotiation options have been established, the
network driver opens the attached serial device driver to prepare the underlying physical
device interface for use. The device driver will call your device startup hook, if one has
been provided, giving you an opportunity to modify the device driver's operating
characteristics. The device startup hook is described in Appendix A.2 of the
KwikNet
Device Driver Technical Reference Manual.
The network driver then opens the modem driver if it has been attached to the network
interface. The modem driver will call your modem startup hook, if one has been
provided, giving you an opportunity to modify the modem driver's dialing or auto
answering specifications. The modem driver will then dial out to connect to the peer or
enter the auto answer state to await a dial-in request from the peer. The modem startup
hook is described in Appendix A.3 of the
KwikNet Device Driver Technical Reference
Manual.
Once a communication connection with the peer is in place, the network driver allows the
PPP protocol stack to begin the negotiation of a PPP connection with the peer. As the
negotiation progresses, KwikNet may have to authenticate itself for its peer. KwikNet may
also be required to authenticate the peer. In either case,
KwikNet will call an
administrative procedure kn_ppp_admin() for assistance in the authentication process.
This procedure is described in Chapter 6.4.