STRCF(SFF) UNIX System V
Name
/etc/strcf - STREAMS Configuration File for STREAMS TCP/IP
Description
/etc/strcf contains the script that is executed by
slink(SFF) to perform the STREAMS configuration operations
required for STREAMS TCP/IP.
The standard /etc/strcf file contains several functions that
perform various configuration operations, along with a
sample boot function. Normally, only the boot function must
be modified to customize the configuration for a given
installation. In some cases, however, it may be necessary
to change existing functions or add new functions.
The following functions perform basic linking operations:
Function tp is used to set up the link between a transport
provider, such as TCP, and IP.
#
# tp - configure transport provider (i.e. tcp, udp, icmp)
# usage: tp devname
#
tp {
p = open $1
ip = open /dev/inet/ip
link p ip
}
Function linkint links the specified streams and does a
sifname operation with the given name.
#
# linkint - link interface to ip or arp
# usage: linkint top bottom ifname
#
linkint {
x = link $1 $2
sifname $1 x $3
}
Function aplinkint performs the same function as linkint for
an interface that uses the arpproc module.
#
# aplinkint - like linkint, but arpproc is pushed on dev
# usage: aplinkint top bottom ifname
#
aplinkint {
push $2 arpproc
linkint $1 $2 $3
}
The following functions are used to configure different
types of Ethernet interfaces:
Function uenet is used to configure an Ethernet interface
for a cloning device driver that uses the unit select ioctl
to select the desired interface. The interface name is
constructed by concatenating the supplied prefix and the
unit number.
#
# uenet - configure ethernet-type interface for cloning driver
# using unit select
# usage: uenet ip-fd devname ifprefix unit
#
uenet {
ifname = strcat $3 $4
dev = open $2
unitsel dev $4
aplinkint $1 dev ifname
dev = open $2
unitsel dev $4
arp = open /dev/inet/arp
linkint arp dev ifname
}
Function denet performs the same function as uenet, except
that DL_ATTACH is used instead of unit select.
#
# denet - configure ethernet-type interface for cloning driver
# using DL_ATTACH
# usage: denet ip-fd devname ifprefix unit
#
denet {
ifname = strcat $3 $4
dev = open $2
dlattach dev $4
aplinkint $1 dev ifname
dev = open devname
dlattach dev $4
arp = open /dev/inet/arp
linkint arp dev ifname
}
Function cenet is used to configure an Ethernet interface
for a cloning device driver that uses a different major
number for each interface. The device name is formed by
concatenating the supplied device name prefix and the unit
number. The interface name is formed in a similar manner
using the interface name prefix.
#
# cenet - configure ethernet-type interface for cloning driver
# with one major per interface
# usage: cenet ip-fd devprefix ifprefix unit
#
cenet {
devname = strcat $2 $4
ifname = strcat $3 $4
dev = open devname
aplinkint $1 dev ifname
dev = open devname
arp = open /dev/inet/arp
linkint arp dev ifname
}
Function senet is used to configure an Ethernet interface for
a non-cloning device driver. Two different device nodes must be
specified for IP and ARP.
#
# senet - configure ethernet-type interface for non-cloning
# driver
# usage: senet ip-fd ipdevname arpdevname ifname
#
senet {
dev = open $2
aplinkint $1 dev $4
dev = open $3
arp = open /dev/inet/arp
linkint arp dev $4
}
Function senetc is like senet, except that it allows the
specification of a convergence module to be used with the
ethernet driver (e.g. for the 3B2 emd driver).
#
# senetc - configure ethernet-type interface for non-cloning driver
# using convergence module
# usage: senetc ip-fd convergence ipdevname arpdevname ifname
#
senetc {
dev = open $3
push dev $2
aplinkint $1 dev $5
dev = open $4
push dev $2
arp = open /dev/inet/arp
linkint arp dev $5
}
Function loopback is used to configure the loopback
interface.
#
# loopback - configure loopback device
# usage: loopback ip-fd
#
loopback {
dev = open /dev/llcloop
linkint $1 dev lo0
}
Function slip is used to configure a SLIP interface. This
function is not normally executed at boot time. Rather, the
slattach(ADMN) command runs slink specifying slip on the
command line.
#
# slip - configure slip interface
# usage: slip unit
#
slip {
ip = open /dev/inet/ip
s = open /dev/slip
ifname = strcat sl $1
unitsel s $1
linkint ip s ifname
}
Function boot is called by default when slink is executed.
Normally, only the interfaces section and possibly the queue
params section will have to be customized for a given
installation. Examples are provided for the various
Ethernet driver types.
#
# boot - boot time configuration
#
boot {
#
# queue params
#
initqp /dev/inet/udp rq 8192 40960
initqp /dev/inet/ip muxrq 8192 40960 rq 8192 40960
#
# transport
#
tp /dev/inet/tcp
tp /dev/inet/udp
tp /dev/inet/icmp
#
# interfaces
#
ip = open /dev/inet/ip
senetc ip eli /dev/emd0 /dev/emd1 en0
# uenet ip /dev/abc en 0
# denet ip /dev/def en 0
# cenet ip /dev/ghi en 0
# senet ip /dev/jkl0 /dev/jkl1 en0
loopback ip
}
Files
/etc/strcf
See Also
slink(ADMN), intro(ADMP).
(printed 8/17/89) STRCF(SFF)