PIF(4) BSD Programmer's Manual PIF(4)NAMEpif - Parallel InterFace (PIF)
SYNOPSIS
#include <sys/types.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <net/if_pif.h>
options PPP
pseudo-device pif count
DESCRIPTION
The Parallel Interface provides a method for linking several physical
networking interfaces into a single logical interface.
To support the PPP Multilink Protocol (MP), the kernel configuration op-
tion PPP must be included, and the number of parallel interfaces should
be provided using the pif pseudo-device specification.
The Parallel Interface names are composed from the prefix ``pif'' and a
decimal interface number; for example ``pif0''.
The number of parallel interfaces may be increased after kernel is built
by modifying the npifif variable in the system with bpatch(1) before
booting, or by modifying the net.link_layer.generic.pif.numif variable
with sysctl(1).
IOCTL OPERATIONS
The SIOCSIFMTU ioctl (see netintro(4)) is supported for pif interfaces,
and is referred to as the admin mtu. The kernel determines the mtu of a
pif by taking the minimum mtu of all the interfaces attached to the pif
and the admin mtu. If the admin mtu is set to zero (the default value),
it is ignored.
The layout of the struct pifreq is:
struct pifreq {
#define IFNAMSIZ 16
char pifr_name[IFNAMSIZ];
union {
char pifru_subname[IFNAMSIZ];
u_long pifru_flags;
} pifr_pifru;
#define pifr_subname pifr_pifru.pifru_subname
#define pifr_flags pifr_pifru.pifru_flags
};
/* Flags */
define PIF_MASK 0x01f /* reserve 5 bits */
#define PIF_RESCAN 0x01 /* not set means "round-robin" */
#define PIF_IGNORE_OACTIVE 0x02 /* not set means search for idle "if" */
#define PIF_RESERVED1 0x04
#define PIF_RESERVED2 0x08
#define PIF_RESERVED3 0x10
#define PIF_NEXT_IDLE 0 /* 0 */
#define PIF_FIRST_IDLE PIF_RESCAN /* 1 */
#define PIF_NEXT_UP PIF_IGNORE_OACTIVE /* 2 */
#define PIF_FIRST_UP (PIF_RESCAN | PIF_IGNORE_OACTIVE) /* 3 */
The following interface ioctl(2) requests are specific to PIFs:
PIFIOCADD Add the interface specified in "pifr_subname" to the PIF
specified in "pifr_name".
PIFIOCDEL Remove the interface specified in "pifr_subname" to the PIF
specified in "pifr_name".
PIFIOCGFLG Get the flags field. When a PIF has a packet to send, the
PIF_MASK bits of the flag word determine how the physical in-
terface is chosen. This is an enumerated value, where the
bits have individual significance for some of the values.
The default action is that when there is a packet to send, a
round-robin technique is used to find the next idle interface
that is up and running. If there are no up and running in-
terfaces, but there are interfaces marked as up, the first
interface marked as up will be used. If PIF_RESCAN is set,
the search is always initiated from the beginning of the
list. If PIF_IGNORE_OACTIVE is set, then the search will not
skip over interfaces that are currently doing output. It
should be noted that these bits only make sense if the re-
served bits are zero, and so the enumerated values
PIF_NEXT_IDLE, PIF_FIRST_IDLE, PIF_NEXT_UP and PIF_FIRST_UP
(the four combinations of PIF_RESCAN and PIF_IGNORE_OACTIVE)
should be used instead.
PIFIOCSFLG Set the flags field.
SEE ALSOioctl(2), socket(2), intro(4), appp(4), cisco_hdlc(4), ppp(4),
ifconfig(8), ppp(8)
G. McGregor, The PPP Internet Protocol Control Protocol (IPCP), RFC 1332,
May 1992.
K. Sklower, B. Lloyd, G. McGregor, D. Carr, T. Coradetti, The PPP Multi-
link Protocol (MP), RFC 1990, August 1996.
BUGS
The Parallel Interface was needed to support PPP Multilink Protocol, and
though in theory the framework provided by PIFs could be used for any
networking interfaces, currently PIFs are supported only in the context
of point to point interfaces (using either PPP Multilink Protocol or Cis-
co HDLC). Future releases may be expanded to support PIFs for non-point
to point interfaces.
BSD/OS August 15, 1996 2