Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ appp(4) — BSD/386 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

socket(2)

intro(4)

tty(4)

ppp(4)

ifconfig(8)

pppconfig(8)

pppattach(8)

ppp(8)

APPP(4)                     BSD Programmer's Manual                    APPP(4)

NAME
     appp - asynchronous HDLC encapsulation for the Point-to-Point Protocol

SYNOPSIS
     #include <sys/types.h>
     #include <sys/ioctl.h>
     #include <net/if.h>
     #include <net/pppioctl.h>
     #include <termios.h>

     options PPP
     pseudo-device appp count

DESCRIPTION
     The asynchronous HDLC encapsulation is used to transmit Point-to-Point
     Protocol (PPP) packets over asynchronous serial lines.

     The kernel configuration option PPP must be included, and the number of
     asynchronous PPP interfaces should be provided using the appp pseudo-
     device specification.

     The asynchronous PPP interface names are composed from the prefix ``ppp''
     and a decimal interface number; for example ``ppp4''.

     Any serial line can be attached to an asynchronous PPP interface; it is
     possible to use the line as usual tty line (e.g., for dialing phone num-
     ber) and then switch it to the packet mode by changing the line disci-
     pline to PPPDISC with ioctl(2)'s  TIOCSETD request (see also tty(4)).

ASYNCHRONOUS PPP LINE DISCIPLINE
     Switching to the asynchronous line discipline does not change the data
     transmission speed on the serial interface but always changes character
     format to 8 bits, no parity as required by PPP specifications.  The flow
     control modes remain the same (i.e. it is possible to use software flow
     control (XON/XOFF) in packet mode providing that the start and stop char-
     acters are declared unsafe in the async control character map (see
     ppp(4))).

     To attach the line to a specific interface, a program can use the
     PPPIOCSUNIT ioctl request on the line's file descriptor.  The argument to
     this ioctl request is a pointer to an integer variable which should be
     initialized with the number of the interface the line should be attached
     to.  As a special case the value may be set to -1 and the first interface
     with no attached lines will be selected (and its number will be written
     to the variable).

     To get the number of an attached interface, the PPPIOCGUNIT ioctl request
     can be used.  Its argument is a pointer to an integer variable to which
     the interface number will be written.

     Because the line file descriptor should be kept open during the session,
     the PPP line discipline provides a way to wait until termination of the
     session.  The ioctl request PPPIOCWEOS (with no arguments) will wait un-
     til the session was terminated administratively, by an idle timer, by a
     request from the remote side or by loss of carrier.  After the PPPIOCWEOS
     ioctl returns, the program may take any actions necessary to terminate
     the physical connection.  Usually this entails restoring the default tty
     line discipline and closing the file descriptor in order to turn the DTR
     signal off to force disconnection.

     An asynchronous PPP interface can be kept administratively up even if no
     line was attached.  The PPP link control protocol (LCP) will treat it as
     though there is no carrier on the line.  Symmetrically, the physical dis-
     connection or detaching of the line by changing the line discipline will
     be treated by LCP as lost carrier but will not configure the interface
     down.

     Configuring the interface down will start graceful termination of the
     link which will result in the interruption of the wait on PPPIOCWEOS af-
     ter both sides have agreed to drop the link.  However,

           ifconfig ppp0 down up

     will not terminate the link but will cause PPP options to be renegotiated
     instead.

SEE ALSO
     ioctl(2),  socket(2),  intro(4),  tty(4),  ppp(4),  ifconfig(8),
     pppconfig(8),  pppattach(8),  ppp(8)

     W. Simpson, The Point-to-Point Protocol (PPP) for the Transmission of
     Multi-protocol Datagrams over Point-to-Point Links, RFC 1331, May 1992.

BSDI BSD/386                    March 27, 1993                               2














































Typewritten Software • bear@typewritten.org • Edmonds, WA 98026