strcf(SFF) 19 June 1992 strcf(SFF) Name strcf - STREAMS Configuration File for STREAMS TCP/IP Description /etc/strcf contains the script that is executed by slink(ADMN) 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 con- figuration 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 sets 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 configure different types of Ethernet interfaces: Function uenet configures 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 DLATTACH 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 configures 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 configures 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. # # 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 configures the loopback interface. # # loopback - configure loopback device # usage: loopback ip-fd # loopback { dev = open /dev/llcloop linkint $1 dev lo0 } Function slip configures 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 Intro(ADMP), slink(ADMN)