ChorusOS 4.0 Network Administration Guide

Device Creation

PPP interfaces rely on tty devices to communicate directly with the serial hardware. You must therefore create at least one tty device for each PPP line you intend to open. If the ChorusOS system is configured to "dial on demand", you must also create a pseudo-tty master (ptyp) and a pseudo-tty slave (ttyp) device for each PPP line.

It is also possible that your applications require a BPF device for raw access to network packets.


Example 4-2 PPP Device Creation

The following example sysadm.ini fragment creates a PPP interface and the loopback interface needed for IP communication. It then creates the tty devices needed to open a PPP line that may be configured for "dial on demand". Finally, it creates a BPF device for any applications that require one.

#
# Set the file creation mask to 0 during system configuration
#
umask 0

#
# Create a PPP interface
#
mkdev ppp 0

#
# Create a loopback interface
#
mkdev lo 0

#
# Create a tty device for the second serial port
#
# The first serial port is reserved for system debug and console access
# through the tip(1) utility on the host workstation
#
# If you do not know the device tree pathname to the second serial port,
# note that device tree is visible in the output of dtree(1M).
#
# Note that major number 0 is conventionally reserved for ttys
#
mkdev tty 0  # takes first available device
# Other possibilities include:
#mkdev tty 0 /pci/pci-isa/ns16650-2
#mkdev tty 0 /raven/w83c553/ns16650-2
#mkdev tty 0 /sabre/simba-b/ebus/ns16650-2
mknod /dev/tty01 c 0 0

#
# Create pseudo-tty devices for on-demand dialing
#
mknod /dev/ptyp0 c 5 0 # Master
mknod /dev/ttyp0 c 6 0 # Slave

#
# Create a Berkeley Packet Filter device and special file
#
mkdev bpf 0
mknod /dev/bpf c 23 0

See the appropriate document in the ChorusOS 4.0 Target Family Documentation Collection for serial device IDs for other serial line hardware.