strcf(SFF)


strcf -- configuration files for STREAMS TCP/IP

Description

The /etc/strcf.d directory contains the configuration files that slink(ADMN) interprets to define the STREAMS TCP/IP interface.

The example /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 tp and linkint functions perform basic linking operations. The cenetb, c802b, and loopback functions configure different types of interfaces.

tp -- configure link to a transport provider

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
   	plink p ip
   	close p
   }

linkint -- configure the link interface

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 flags
   #
   linkint {
   	x = plink $1 $2
   	sifname $1 x $3 $4
   }

cenetb -- configure an Ethernet interface

Function cenetb is used to configure an Ethernet interface (using Ethernet framing; see RFC 894) for a cloning device driver that uses a different major number for each interface. No assumptions are made about forming the interface name which must be specified as an argument.
   #
   # cenetb - configure ethernet-type interface for cloning driver with
   #	one major per interface.  This version assumes less about
   #	node names.
   # usage: cenetb ip-fd dev if
   cenetb {
   	onerror cenetb_fail
   	dev = open $2
   	addr = dlbind dev 0x800		# For Ethernet encoding
   	linkint $1 dev $3 0x4042
   	dev2 = open $2
   	addr = dlbind dev2 0x806	# For Ethernet encoding
   	arp = open /dev/inet/arp
   	sifhrd	arp ether		# hardware interface is ethernet
   	linkint arp dev2 $3 0x4042
   	sifaddr arp $3 addr
   	close arp
   	label cenetb_fail
   }

c802b -- configure an IEEE 802.3 interface

TCP/IP supports IEEE 802.n networks. Here is a sample version of cenetb that sets up IEEE 802.3 framing (see RFC 1042).
   #
   # c802b - configure ethernet-type interface for cloning driver with
   #	one major per interface.  This version sets up 802.n framing.
   # usage: c802b ip-fd dev if
   c802b {
   	onerror c802b_fail
   	dev = open $2
   	addr = dlbind dev 0xaa		# For IEEE802 encoding
   	dlsubsbind dev 0x800
   	linkint $1 dev $3 0x4042
   	dev2 = open $2
   	addr = dlbind dev2 0xaa		# For IEEE802 encoding
   	dlsubsbind dev2 0x806
   	arp = open /dev/inet/arp
   	sifhrd	arp ieee		# hardware interface is ieee802 
   	linkint arp dev2 $3 0x4042
   	sifaddr arp $3 addr
   	close arp
   	label c802b_fail
   }

loopback -- configure a loopback interface

Function loopback configures the loopback interface.
   #
   # loopback - configure loopback device
   # usage: loopback ip-fd
   #
   loopback {
   	dev = open /dev/llcloop
   	addr = dlbind dev 0x800
   	linkint $1 dev lo0 0x4048
   }

boot -- configure network interface at boot time

Function boot is interpreted by slink unless an alternative function is specified. Normally, only the interfaces section and possibly the queue params section will have to be customized for a given installation.
   #
   # boot - boot time configuration
   #
   boot {
   	exit				# failure causes exit/panic
   	#
   	# queue params
   	#
   	initqp /dev/inet/udp rq 8192 49152
   	initqp /dev/inet/ip muxrq 8192 49152 muxwq 8192 49152
   	initqp /dev/inet/tcp muxrq 8192 49152 muxwq 8192 49152
   	#
   	# transport
   	#
   	tp /dev/inet/tcp
   	tp /dev/inet/udp
   	tp /dev/inet/icmp
   	tp /dev/inet/igmp
   	tp /dev/inet/rip
   	#
   	# interfaces
   	#
   	ip = open /dev/inet/ip
   	noexit				# we will accept failure now
   	boot_net1
   	loopback ip
   	close ip
   	call ip_set_if_address
   }
The function boot_net1 adds an Ethernet driver.
   boot_net1 {
   	ip = open /dev/inet/ip
   	cenetb ip /dev/net1 net1
   	close ip
   }

Interface naming

Some aspects of STREAMS TCP/IP work better if interface names can be easily mapped to device special files. For this reason, it is better to name interfaces something like ``wdn0'' than ``en0''.

Files


/etc/strcf
example configuration file

/etc/strcf.d
directory containing configuration files for different interfaces

See also

Intro(ADMP), slink(ADMN)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005