ChorusOS 4.0 Network Administration Guide

Device Creation

SLIP interfaces rely on tty devices to communicate directly with the serial hardware. You must therefore create at least one tty device for each SLIP line you intend to open.

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


Example 5-2 SLIP Device Creation

The following example sysadm.ini fragment creates a SLIP interface and the loopback interface needed for IP communication. Next, 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 SLIP interface
#
mkdev sl 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 the device tree path 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 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.