APPP(4) BSD Programmer's Manual APPP(4)NAMEappp - 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-de-
vice 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)).
The number of asynchronous PPP interfaces may be increased after kernel
is built by modifying the nappif variable in the system with bpatch(1)
before booting, or by modifying the net.link_layer.generic.ppp.numif
variable with sysctl(1).
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.
SEE ALSOioctl(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/OS March 1, 1993 1