User`s guide
230
K
A
DAK
KwikNet PPP Option
6.3 Using a PPP Network Interface
The PPP Client and Server
The easiest way to add a PPP network interface to your KwikNet application is to use the
KwikNet Configuration Manager to specify the network in your Network Parameter File.
Each network interface defined in this manner is automatically prebuilt for you whenever
KwikNet starts. However, your application can dynamically add a PPP network interface
at runtime by calling
KwikNet procedure kn_ifadd().
No matter how the network interface is added, it does not become operational until it is
opened.
KwikNet automatically opens each network interface which it prebuilds if, and
only if, the network definition indicates that the network must auto-start. Network
interfaces that are dynamically added cannot be auto-started.
A PPP network interface operates in a client-server relationship with its peer. The
network interface which initiates a PPP connection is considered to be the client. The
peer which accepts the client's request is considered to be the server.
The PPP client-server relationship is quite obvious when a dialing modem is used with
the serial device driver attached to the network interface.
The network interface is a PPP client if it has to dial out to get the attention of its peer.
The network interface is a PPP server if it has to auto answer a call from its peer.
Separate network interfaces are required for each PPP client and server. Therefore, if you
must initiate a PPP connection you will require a network interface configured as a PPP
client. If you must also accept a request for a PPP connection, you will require a separate
network interface configured as a PPP server. Fortunately, most applications require only
a PPP client or a PPP server, not both on a single serial line.
Warning
If two PPP network interfaces share a common serial
interface, only one of the network interfaces must be open
at any instant. Managing the opening and closing of the
network interfaces to switch between the PPP client and
server is the responsibility of your application.
Note
SLIP network interfaces are used in a manner similar to
that described for PPP network interfaces. However, a
single SLIP network interface can be used as either a SLIP
client or as a SLIP server. SLIP networks do not support
any form of peer authentication.