Here are some scripts and man pages for configuring HARP ATM

interfaces.

Reviewed by:	phk
Submitted by:	Mike Spengler <mks@networkcs.com>
This commit is contained in:
Poul-Henning Kamp 1998-10-06 19:24:31 +00:00
parent 40fd46f77d
commit 7d5c779c86
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40006
17 changed files with 1286 additions and 12 deletions

View File

@ -1,5 +1,5 @@
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
# $Id: Makefile,v 1.176 1998/09/25 07:42:29 dima Exp $
# $Id: Makefile,v 1.177 1998/09/25 08:21:15 dima Exp $
SUBDIR= sendmail
@ -7,7 +7,7 @@ BIN1= aliases amd.map crontab csh.cshrc csh.login csh.logout dm.conf \
fbtab ftpusers gettytab group hosts host.conf hosts.equiv hosts.lpd \
inetd.conf login.conf login.access motd modems networks \
newsyslog.conf phones pccard.conf.sample printcap profile protocols \
rc rc.conf rc.devfs rc.firewall rc.local rc.network rc.pccard \
rc rc.atm rc.conf rc.devfs rc.firewall rc.local rc.network rc.pccard \
rc.serial rc.shutdown etc.${MACHINE_ARCH}/rc.${MACHINE_ARCH} \
remote security services shells syslog.conf \
etc.${MACHINE_ARCH}/ttys etc.${MACHINE_ARCH}/disktab rpc make.conf \

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.31 1998/09/15 10:49:02 jkoshy Exp $
# $Id: rc.network,v 1.32 1998/09/16 20:38:23 cracauer Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -25,6 +25,12 @@ network_pass1() {
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
@ -89,6 +95,11 @@ network_pass1() {
fi
fi
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
fi
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
@ -215,6 +226,11 @@ network_pass2() {
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
# Start ATM daemons
if [ -n "${atm_pass2_done}" ]; then
atm_pass3
fi
echo '.'
network_pass2_done=YES
}

175
etc/rc.atm Normal file
View File

@ -0,0 +1,175 @@
#!/bin/sh
#
# ATM networking startup script
#
# $Id$
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_pass1() {
# Locate all probed ATM adapters by scanning dmesg output
saveifs="${IFS}"
IFS=$IFS:
atmdev=`dmesg | while read dev junk; do
case ${dev} in
hea[0-9]|hea[0-9][0-9])
echo "${dev} "
;;
hfa[0-9]|hfa[0-9][0-9])
echo "${dev} "
;;
*)
continue
;;
esac
done`
IFS="${saveifs}"
if [ -z "${atmdev}" ]; then
echo "No ATM adapters found."
return 0
fi
# Load microcode into FORE adapters (if needed)
if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
fore_dnld -d /etc
fi
# Configure physical interfaces
ilmid=0
for phy in ${atmdev}; do
echo -n "Configuring ATM device ${phy}:"
# Define network interfaces
eval netif_args=\$atm_netif_${phy}
if [ -n "${netif_args}" ]; then
atm set netif ${phy} ${netif_args} || continue
else
echo "missing network interface definition"
continue
fi
# Override physical MAC address
eval macaddr_args=\$atm_macaddr_${phy}
if [ -n "${macaddr_args}" -a "${macaddr_args}" != "NO" ]; then
atm set mac ${phy} ${macaddr_args} || continue
fi
# Configure signalling manager
eval sigmgr_args=\$atm_sigmgr_${phy}
if [ -n "${sigmgr_args}" ]; then
atm attach ${phy} ${sigmgr_args} || continue
else
echo "missing signalling manager definition"
continue
fi
# Configure UNI NSAP prefix
eval prefix_args=\$atm_prefix_${phy}
if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
if [ -z "${prefix_args}" ]; then
echo "missing NSAP prefix for UNI interface"
continue
fi
if [ "${prefix_args}" = "ILMI" ]; then
ilmid=1
else
atm set prefix ${phy} ${prefix_args} || continue
fi
fi
atm_phy="${atm_phy} ${phy}"
echo "."
done
echo -n "Starting initial ATM daemons:"
# Start ILMI daemon (if needed)
if [ ${ilmid} -eq 1 ]; then
echo -n " ilmid"
ilmid
fi
echo "."
atm_pass1_done=YES
}
#
# Finish up configuration.
# N.B. /usr is not mounted.
#
atm_pass2() {
echo -n "Configuring ATM network interfaces:"
atm_scspd=0
atm_atmarpd=""
# Configure network interfaces
for phy in ${atm_phy}; do
eval netif_args=\$atm_netif_${phy}
set -- ${netif_args}
netname=$1
netcnt=$2
netindx=0
while [ ${netindx} -lt ${netcnt} ]; do
net="${netname}${netindx}"
netindx=`expr ${netindx} + 1`
echo -n " ${net}"
# Configure atmarp server
eval atmarp_args=\$atm_arpserver_${net}
if [ -n "${atmarp_args}" ]; then
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
fi
atm_atmarpd="${atm_atmarpd} ${net}"
atm_scspd=1
fi
done
done
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
done
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
done
fi
atm_pass2_done=YES
}
#
# Start any necessary daemons.
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
echo -n " scspd"
scspd
fi
# Start ATMARP daemon (if needed)
if [ -n "${atm_atmarpd}" ]; then
echo -n " atmarpd"
atmarpd ${atm_atmarpd}
fi
atm_pass3_done=YES
}

View File

@ -6,7 +6,7 @@
#
# All arguments must be in double or single quotes.
#
# $Id: rc.conf,v 1.58 1998/09/16 05:42:38 jdp Exp $
# $Id: rc.conf,v 1.59 1998/09/23 04:42:02 jkh Exp $
##############################################################
### Important initial Boot-time options #####################
@ -114,6 +114,17 @@ arpproxy_all="" # replaces obsolete kernel option ARP_PROXYALL.
forward_sourceroute="NO" # do source routing (only if gateway_enable is set to "YES")
accept_sourceroute="NO" # accept source routed packets to us
### ATM interface options: ###
atm_enable="NO" # Configure ATM interfaces (or NO).
#atm_netif_hea0="atm 1" # Network interfaces for physical interface.
#atm_sigmgr_hea0="uni31" # Signalling manager for physical interface.
#atm_prefix_hea0="ILMI" # NSAP prefix (UNI interfaces only) (or ILMI).
#atm_macaddr_hea0="NO" # Override physical MAC address (or NO).
#atm_arpserver_atm0="0x47.0005.80.999999.9999.9999.9999.999999999999.00" # ATMARP server address (or local).
#atm_scsparp_atm0="NO" # Run SCSP/ATMARP on network interface (or NO).
atm_pvcs="" # Set to PVC list (or leave empty).
atm_arps="" # Set to permanent ARP list (or leave empty).
### Miscellaneous network options: ###
icmp_bmcastecho="NO" # respond to broadcast ping packets

175
etc/rc.d/atm1 Normal file
View File

@ -0,0 +1,175 @@
#!/bin/sh
#
# ATM networking startup script
#
# $Id$
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_pass1() {
# Locate all probed ATM adapters by scanning dmesg output
saveifs="${IFS}"
IFS=$IFS:
atmdev=`dmesg | while read dev junk; do
case ${dev} in
hea[0-9]|hea[0-9][0-9])
echo "${dev} "
;;
hfa[0-9]|hfa[0-9][0-9])
echo "${dev} "
;;
*)
continue
;;
esac
done`
IFS="${saveifs}"
if [ -z "${atmdev}" ]; then
echo "No ATM adapters found."
return 0
fi
# Load microcode into FORE adapters (if needed)
if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
fore_dnld -d /etc
fi
# Configure physical interfaces
ilmid=0
for phy in ${atmdev}; do
echo -n "Configuring ATM device ${phy}:"
# Define network interfaces
eval netif_args=\$atm_netif_${phy}
if [ -n "${netif_args}" ]; then
atm set netif ${phy} ${netif_args} || continue
else
echo "missing network interface definition"
continue
fi
# Override physical MAC address
eval macaddr_args=\$atm_macaddr_${phy}
if [ -n "${macaddr_args}" -a "${macaddr_args}" != "NO" ]; then
atm set mac ${phy} ${macaddr_args} || continue
fi
# Configure signalling manager
eval sigmgr_args=\$atm_sigmgr_${phy}
if [ -n "${sigmgr_args}" ]; then
atm attach ${phy} ${sigmgr_args} || continue
else
echo "missing signalling manager definition"
continue
fi
# Configure UNI NSAP prefix
eval prefix_args=\$atm_prefix_${phy}
if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
if [ -z "${prefix_args}" ]; then
echo "missing NSAP prefix for UNI interface"
continue
fi
if [ "${prefix_args}" = "ILMI" ]; then
ilmid=1
else
atm set prefix ${phy} ${prefix_args} || continue
fi
fi
atm_phy="${atm_phy} ${phy}"
echo "."
done
echo -n "Starting initial ATM daemons:"
# Start ILMI daemon (if needed)
if [ ${ilmid} -eq 1 ]; then
echo -n " ilmid"
ilmid
fi
echo "."
atm_pass1_done=YES
}
#
# Finish up configuration.
# N.B. /usr is not mounted.
#
atm_pass2() {
echo -n "Configuring ATM network interfaces:"
atm_scspd=0
atm_atmarpd=""
# Configure network interfaces
for phy in ${atm_phy}; do
eval netif_args=\$atm_netif_${phy}
set -- ${netif_args}
netname=$1
netcnt=$2
netindx=0
while [ ${netindx} -lt ${netcnt} ]; do
net="${netname}${netindx}"
netindx=`expr ${netindx} + 1`
echo -n " ${net}"
# Configure atmarp server
eval atmarp_args=\$atm_arpserver_${net}
if [ -n "${atmarp_args}" ]; then
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
fi
atm_atmarpd="${atm_atmarpd} ${net}"
atm_scspd=1
fi
done
done
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
done
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
done
fi
atm_pass2_done=YES
}
#
# Start any necessary daemons.
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
echo -n " scspd"
scspd
fi
# Start ATMARP daemon (if needed)
if [ -n "${atm_atmarpd}" ]; then
echo -n " atmarpd"
atmarpd ${atm_atmarpd}
fi
atm_pass3_done=YES
}

175
etc/rc.d/atm2 Normal file
View File

@ -0,0 +1,175 @@
#!/bin/sh
#
# ATM networking startup script
#
# $Id$
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_pass1() {
# Locate all probed ATM adapters by scanning dmesg output
saveifs="${IFS}"
IFS=$IFS:
atmdev=`dmesg | while read dev junk; do
case ${dev} in
hea[0-9]|hea[0-9][0-9])
echo "${dev} "
;;
hfa[0-9]|hfa[0-9][0-9])
echo "${dev} "
;;
*)
continue
;;
esac
done`
IFS="${saveifs}"
if [ -z "${atmdev}" ]; then
echo "No ATM adapters found."
return 0
fi
# Load microcode into FORE adapters (if needed)
if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
fore_dnld -d /etc
fi
# Configure physical interfaces
ilmid=0
for phy in ${atmdev}; do
echo -n "Configuring ATM device ${phy}:"
# Define network interfaces
eval netif_args=\$atm_netif_${phy}
if [ -n "${netif_args}" ]; then
atm set netif ${phy} ${netif_args} || continue
else
echo "missing network interface definition"
continue
fi
# Override physical MAC address
eval macaddr_args=\$atm_macaddr_${phy}
if [ -n "${macaddr_args}" -a "${macaddr_args}" != "NO" ]; then
atm set mac ${phy} ${macaddr_args} || continue
fi
# Configure signalling manager
eval sigmgr_args=\$atm_sigmgr_${phy}
if [ -n "${sigmgr_args}" ]; then
atm attach ${phy} ${sigmgr_args} || continue
else
echo "missing signalling manager definition"
continue
fi
# Configure UNI NSAP prefix
eval prefix_args=\$atm_prefix_${phy}
if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
if [ -z "${prefix_args}" ]; then
echo "missing NSAP prefix for UNI interface"
continue
fi
if [ "${prefix_args}" = "ILMI" ]; then
ilmid=1
else
atm set prefix ${phy} ${prefix_args} || continue
fi
fi
atm_phy="${atm_phy} ${phy}"
echo "."
done
echo -n "Starting initial ATM daemons:"
# Start ILMI daemon (if needed)
if [ ${ilmid} -eq 1 ]; then
echo -n " ilmid"
ilmid
fi
echo "."
atm_pass1_done=YES
}
#
# Finish up configuration.
# N.B. /usr is not mounted.
#
atm_pass2() {
echo -n "Configuring ATM network interfaces:"
atm_scspd=0
atm_atmarpd=""
# Configure network interfaces
for phy in ${atm_phy}; do
eval netif_args=\$atm_netif_${phy}
set -- ${netif_args}
netname=$1
netcnt=$2
netindx=0
while [ ${netindx} -lt ${netcnt} ]; do
net="${netname}${netindx}"
netindx=`expr ${netindx} + 1`
echo -n " ${net}"
# Configure atmarp server
eval atmarp_args=\$atm_arpserver_${net}
if [ -n "${atmarp_args}" ]; then
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
fi
atm_atmarpd="${atm_atmarpd} ${net}"
atm_scspd=1
fi
done
done
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
done
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
done
fi
atm_pass2_done=YES
}
#
# Start any necessary daemons.
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
echo -n " scspd"
scspd
fi
# Start ATMARP daemon (if needed)
if [ -n "${atm_atmarpd}" ]; then
echo -n " atmarpd"
atmarpd ${atm_atmarpd}
fi
atm_pass3_done=YES
}

175
etc/rc.d/atm2.sh Normal file
View File

@ -0,0 +1,175 @@
#!/bin/sh
#
# ATM networking startup script
#
# $Id$
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_pass1() {
# Locate all probed ATM adapters by scanning dmesg output
saveifs="${IFS}"
IFS=$IFS:
atmdev=`dmesg | while read dev junk; do
case ${dev} in
hea[0-9]|hea[0-9][0-9])
echo "${dev} "
;;
hfa[0-9]|hfa[0-9][0-9])
echo "${dev} "
;;
*)
continue
;;
esac
done`
IFS="${saveifs}"
if [ -z "${atmdev}" ]; then
echo "No ATM adapters found."
return 0
fi
# Load microcode into FORE adapters (if needed)
if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
fore_dnld -d /etc
fi
# Configure physical interfaces
ilmid=0
for phy in ${atmdev}; do
echo -n "Configuring ATM device ${phy}:"
# Define network interfaces
eval netif_args=\$atm_netif_${phy}
if [ -n "${netif_args}" ]; then
atm set netif ${phy} ${netif_args} || continue
else
echo "missing network interface definition"
continue
fi
# Override physical MAC address
eval macaddr_args=\$atm_macaddr_${phy}
if [ -n "${macaddr_args}" -a "${macaddr_args}" != "NO" ]; then
atm set mac ${phy} ${macaddr_args} || continue
fi
# Configure signalling manager
eval sigmgr_args=\$atm_sigmgr_${phy}
if [ -n "${sigmgr_args}" ]; then
atm attach ${phy} ${sigmgr_args} || continue
else
echo "missing signalling manager definition"
continue
fi
# Configure UNI NSAP prefix
eval prefix_args=\$atm_prefix_${phy}
if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
if [ -z "${prefix_args}" ]; then
echo "missing NSAP prefix for UNI interface"
continue
fi
if [ "${prefix_args}" = "ILMI" ]; then
ilmid=1
else
atm set prefix ${phy} ${prefix_args} || continue
fi
fi
atm_phy="${atm_phy} ${phy}"
echo "."
done
echo -n "Starting initial ATM daemons:"
# Start ILMI daemon (if needed)
if [ ${ilmid} -eq 1 ]; then
echo -n " ilmid"
ilmid
fi
echo "."
atm_pass1_done=YES
}
#
# Finish up configuration.
# N.B. /usr is not mounted.
#
atm_pass2() {
echo -n "Configuring ATM network interfaces:"
atm_scspd=0
atm_atmarpd=""
# Configure network interfaces
for phy in ${atm_phy}; do
eval netif_args=\$atm_netif_${phy}
set -- ${netif_args}
netname=$1
netcnt=$2
netindx=0
while [ ${netindx} -lt ${netcnt} ]; do
net="${netname}${netindx}"
netindx=`expr ${netindx} + 1`
echo -n " ${net}"
# Configure atmarp server
eval atmarp_args=\$atm_arpserver_${net}
if [ -n "${atmarp_args}" ]; then
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
fi
atm_atmarpd="${atm_atmarpd} ${net}"
atm_scspd=1
fi
done
done
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
done
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
done
fi
atm_pass2_done=YES
}
#
# Start any necessary daemons.
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
echo -n " scspd"
scspd
fi
# Start ATMARP daemon (if needed)
if [ -n "${atm_atmarpd}" ]; then
echo -n " atmarpd"
atmarpd ${atm_atmarpd}
fi
atm_pass3_done=YES
}

175
etc/rc.d/atm3 Normal file
View File

@ -0,0 +1,175 @@
#!/bin/sh
#
# ATM networking startup script
#
# $Id$
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_pass1() {
# Locate all probed ATM adapters by scanning dmesg output
saveifs="${IFS}"
IFS=$IFS:
atmdev=`dmesg | while read dev junk; do
case ${dev} in
hea[0-9]|hea[0-9][0-9])
echo "${dev} "
;;
hfa[0-9]|hfa[0-9][0-9])
echo "${dev} "
;;
*)
continue
;;
esac
done`
IFS="${saveifs}"
if [ -z "${atmdev}" ]; then
echo "No ATM adapters found."
return 0
fi
# Load microcode into FORE adapters (if needed)
if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
fore_dnld -d /etc
fi
# Configure physical interfaces
ilmid=0
for phy in ${atmdev}; do
echo -n "Configuring ATM device ${phy}:"
# Define network interfaces
eval netif_args=\$atm_netif_${phy}
if [ -n "${netif_args}" ]; then
atm set netif ${phy} ${netif_args} || continue
else
echo "missing network interface definition"
continue
fi
# Override physical MAC address
eval macaddr_args=\$atm_macaddr_${phy}
if [ -n "${macaddr_args}" -a "${macaddr_args}" != "NO" ]; then
atm set mac ${phy} ${macaddr_args} || continue
fi
# Configure signalling manager
eval sigmgr_args=\$atm_sigmgr_${phy}
if [ -n "${sigmgr_args}" ]; then
atm attach ${phy} ${sigmgr_args} || continue
else
echo "missing signalling manager definition"
continue
fi
# Configure UNI NSAP prefix
eval prefix_args=\$atm_prefix_${phy}
if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
if [ -z "${prefix_args}" ]; then
echo "missing NSAP prefix for UNI interface"
continue
fi
if [ "${prefix_args}" = "ILMI" ]; then
ilmid=1
else
atm set prefix ${phy} ${prefix_args} || continue
fi
fi
atm_phy="${atm_phy} ${phy}"
echo "."
done
echo -n "Starting initial ATM daemons:"
# Start ILMI daemon (if needed)
if [ ${ilmid} -eq 1 ]; then
echo -n " ilmid"
ilmid
fi
echo "."
atm_pass1_done=YES
}
#
# Finish up configuration.
# N.B. /usr is not mounted.
#
atm_pass2() {
echo -n "Configuring ATM network interfaces:"
atm_scspd=0
atm_atmarpd=""
# Configure network interfaces
for phy in ${atm_phy}; do
eval netif_args=\$atm_netif_${phy}
set -- ${netif_args}
netname=$1
netcnt=$2
netindx=0
while [ ${netindx} -lt ${netcnt} ]; do
net="${netname}${netindx}"
netindx=`expr ${netindx} + 1`
echo -n " ${net}"
# Configure atmarp server
eval atmarp_args=\$atm_arpserver_${net}
if [ -n "${atmarp_args}" ]; then
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
fi
atm_atmarpd="${atm_atmarpd} ${net}"
atm_scspd=1
fi
done
done
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
done
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
done
fi
atm_pass2_done=YES
}
#
# Start any necessary daemons.
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
echo -n " scspd"
scspd
fi
# Start ATMARP daemon (if needed)
if [ -n "${atm_atmarpd}" ]; then
echo -n " atmarpd"
atmarpd ${atm_atmarpd}
fi
atm_pass3_done=YES
}

175
etc/rc.d/atm3.sh Normal file
View File

@ -0,0 +1,175 @@
#!/bin/sh
#
# ATM networking startup script
#
# $Id$
#
# Initial interface configuration.
# N.B. /usr is not mounted.
#
atm_pass1() {
# Locate all probed ATM adapters by scanning dmesg output
saveifs="${IFS}"
IFS=$IFS:
atmdev=`dmesg | while read dev junk; do
case ${dev} in
hea[0-9]|hea[0-9][0-9])
echo "${dev} "
;;
hfa[0-9]|hfa[0-9][0-9])
echo "${dev} "
;;
*)
continue
;;
esac
done`
IFS="${saveifs}"
if [ -z "${atmdev}" ]; then
echo "No ATM adapters found."
return 0
fi
# Load microcode into FORE adapters (if needed)
if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
fore_dnld -d /etc
fi
# Configure physical interfaces
ilmid=0
for phy in ${atmdev}; do
echo -n "Configuring ATM device ${phy}:"
# Define network interfaces
eval netif_args=\$atm_netif_${phy}
if [ -n "${netif_args}" ]; then
atm set netif ${phy} ${netif_args} || continue
else
echo "missing network interface definition"
continue
fi
# Override physical MAC address
eval macaddr_args=\$atm_macaddr_${phy}
if [ -n "${macaddr_args}" -a "${macaddr_args}" != "NO" ]; then
atm set mac ${phy} ${macaddr_args} || continue
fi
# Configure signalling manager
eval sigmgr_args=\$atm_sigmgr_${phy}
if [ -n "${sigmgr_args}" ]; then
atm attach ${phy} ${sigmgr_args} || continue
else
echo "missing signalling manager definition"
continue
fi
# Configure UNI NSAP prefix
eval prefix_args=\$atm_prefix_${phy}
if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
if [ -z "${prefix_args}" ]; then
echo "missing NSAP prefix for UNI interface"
continue
fi
if [ "${prefix_args}" = "ILMI" ]; then
ilmid=1
else
atm set prefix ${phy} ${prefix_args} || continue
fi
fi
atm_phy="${atm_phy} ${phy}"
echo "."
done
echo -n "Starting initial ATM daemons:"
# Start ILMI daemon (if needed)
if [ ${ilmid} -eq 1 ]; then
echo -n " ilmid"
ilmid
fi
echo "."
atm_pass1_done=YES
}
#
# Finish up configuration.
# N.B. /usr is not mounted.
#
atm_pass2() {
echo -n "Configuring ATM network interfaces:"
atm_scspd=0
atm_atmarpd=""
# Configure network interfaces
for phy in ${atm_phy}; do
eval netif_args=\$atm_netif_${phy}
set -- ${netif_args}
netname=$1
netcnt=$2
netindx=0
while [ ${netindx} -lt ${netcnt} ]; do
net="${netname}${netindx}"
netindx=`expr ${netindx} + 1`
echo -n " ${net}"
# Configure atmarp server
eval atmarp_args=\$atm_arpserver_${net}
if [ -n "${atmarp_args}" ]; then
atm set arpserver ${net} ${atmarp_args} || continue
fi
eval scsparp_args=\$atm_scsparp_${net}
if [ "X${scsparp_args}" = X"YES" ]; then
if [ "${atmarp_args}" != "local" ]; then
echo "local arpserver required for SCSP"
continue
fi
atm_atmarpd="${atm_atmarpd} ${net}"
atm_scspd=1
fi
done
done
echo "."
# Define any PVCs.
if [ "X${atm_pvcs}" != "X" ]; then
for i in ${atm_pvcs}; do
eval pvc_args=\$atm_pvc_${i}
atm add pvc ${pvc_args}
done
fi
# Define any permanent ARP entries.
if [ "X${atm_arps}" != "X" ]; then
for i in ${atm_arps}; do
eval arp_args=\$atm_arp_${i}
atm add arp ${arp_args}
done
fi
atm_pass2_done=YES
}
#
# Start any necessary daemons.
#
atm_pass3() {
# Start SCSP daemon (if needed)
if [ ${atm_scspd} -eq 1 ]; then
echo -n " scspd"
scspd
fi
# Start ATMARP daemon (if needed)
if [ -n "${atm_atmarpd}" ]; then
echo -n " atmarpd"
atmarpd ${atm_atmarpd}
fi
atm_pass3_done=YES
}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.31 1998/09/15 10:49:02 jkoshy Exp $
# $Id: rc.network,v 1.32 1998/09/16 20:38:23 cracauer Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -25,6 +25,12 @@ network_pass1() {
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
@ -89,6 +95,11 @@ network_pass1() {
fi
fi
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
fi
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
@ -215,6 +226,11 @@ network_pass2() {
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
# Start ATM daemons
if [ -n "${atm_pass2_done}" ]; then
atm_pass3
fi
echo '.'
network_pass2_done=YES
}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.31 1998/09/15 10:49:02 jkoshy Exp $
# $Id: rc.network,v 1.32 1998/09/16 20:38:23 cracauer Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -25,6 +25,12 @@ network_pass1() {
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
@ -89,6 +95,11 @@ network_pass1() {
fi
fi
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
fi
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
@ -215,6 +226,11 @@ network_pass2() {
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
# Start ATM daemons
if [ -n "${atm_pass2_done}" ]; then
atm_pass3
fi
echo '.'
network_pass2_done=YES
}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.31 1998/09/15 10:49:02 jkoshy Exp $
# $Id: rc.network,v 1.32 1998/09/16 20:38:23 cracauer Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -25,6 +25,12 @@ network_pass1() {
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
@ -89,6 +95,11 @@ network_pass1() {
fi
fi
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
fi
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
@ -215,6 +226,11 @@ network_pass2() {
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
# Start ATM daemons
if [ -n "${atm_pass2_done}" ]; then
atm_pass3
fi
echo '.'
network_pass2_done=YES
}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.31 1998/09/15 10:49:02 jkoshy Exp $
# $Id: rc.network,v 1.32 1998/09/16 20:38:23 cracauer Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -25,6 +25,12 @@ network_pass1() {
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
@ -89,6 +95,11 @@ network_pass1() {
fi
fi
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
fi
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
@ -215,6 +226,11 @@ network_pass2() {
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
# Start ATM daemons
if [ -n "${atm_pass2_done}" ]; then
atm_pass3
fi
echo '.'
network_pass2_done=YES
}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.31 1998/09/15 10:49:02 jkoshy Exp $
# $Id: rc.network,v 1.32 1998/09/16 20:38:23 cracauer Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -25,6 +25,12 @@ network_pass1() {
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
@ -89,6 +95,11 @@ network_pass1() {
fi
fi
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
fi
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
@ -215,6 +226,11 @@ network_pass2() {
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
# Start ATM daemons
if [ -n "${atm_pass2_done}" ]; then
atm_pass3
fi
echo '.'
network_pass2_done=YES
}

View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $Id: rc.network,v 1.31 1998/09/15 10:49:02 jkoshy Exp $
# $Id: rc.network,v 1.32 1998/09/16 20:38:23 cracauer Exp $
# From: @(#)netstart 5.9 (Berkeley) 3/30/91
# Note that almost all the user-configurable behavior is no longer in
@ -25,6 +25,12 @@ network_pass1() {
fi
echo '.'
# Initial ATM interface configuration
if [ "X${atm_enable}" = X"YES" -a -f /etc/rc.atm ]; then
. /etc/rc.atm
atm_pass1
fi
# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
if [ -e /etc/start_if.${ifn} ]; then
@ -89,6 +95,11 @@ network_pass1() {
fi
fi
# Additional ATM interface configuration
if [ -n "${atm_pass1_done}" ]; then
atm_pass2
fi
# Configure routing
if [ "x$defaultrouter" != "xNO" ] ; then
@ -215,6 +226,11 @@ network_pass2() {
echo -n ' rpc.ypupdated'; rpc.ypupdated
fi
# Start ATM daemons
if [ -n "${atm_pass2_done}" ]; then
atm_pass3
fi
echo '.'
network_pass2_done=YES
}

View File

@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $Id: rc.conf.5,v 1.21 1998/06/25 04:27:56 jkoshy Exp $
.\" $Id: rc.conf.5,v 1.22 1998/07/08 23:31:28 nectar Exp $
.\"
.Dd April 26, 1997
.Dt RC.CONF 5
@ -591,6 +591,97 @@ is set to
these are the flags to pass to the
.Xr rarpd 8
daemon.
.It Ar atm_enable
(bool) Set to
.Ar YES
to enable the configuration of ATM interfaces at system boot time.
For all of the ATM variables described below, please refer to the
.Xr atm 8
man page for further details on the available command parameters.
Also refer to the files in
.Pa /usr/share/examples/atm
for more detailed configuration information.
.It Ar atm_netif_<intf>
(str) For the ATM physical interface
.Va <intf> ,
this variable defines the name prefix and count for the ATM network interfaces to be created.
The value will be passed as the parameters of an
.Dq atm set netif Va <intf>
command.
.It Ar atm_sigmgr_<intf>
(str) For the ATM physical interface
.Va <intf> ,
this variable defines the ATM signalling manager to be used.
The value will be passed as the parameters of an
.Dq atm attach Va <intf>
command.
.It Ar atm_prefix_<intf>
(str) For the ATM physical interface
.Va <intf> ,
this variable defines the NSAP prefix for interfaces using a UNI signalling
manager. If set to
.Em ILMI ,
then the prefix will automatically be set via the
.Xr ilmid 8
daemon. Otherwise, the value will be passed as the parameters of an
.Dq atm set prefix Va <intf>
command.
.It Ar atm_macaddr_<intf>
(str) For the ATM physical interface
.Va <intf> ,
this variable defines the MAC address for interfaces using a UNI signalling
manager. If set to
.Em NO ,
then the hardware MAC address contained in the ATM interface card will be used.
Otherwise, the value will be passed as the parameters of an
.Dq atm set mac Va <intf>
command.
.It Ar atm_arpserver_<netif>
(str) For the ATM network interface
.Va <netif> ,
this variable defines the ATM address for a host which is to provide ATMARP
service. This variable is only applicable to interfaces using a UNI signalling
manager. If set to
.Em local ,
then this host will become an ATMARP server.
The value will be passed as the parameters of an
.Dq atm set arpserver Va <netif>
command.
.It Ar atm_scsparp_<netif>
(bool) If set to
.Em YES ,
then SCSP/ATMARP service for the network interface
.Va <netif>
will be initiated using the
.Xr scspd 8
and
.Xr atmarpd 8
daemons. This variable is only applicable if
.So
.No atm_arpserver_ Ns Va <netif>
.No Ns = Ns Qq local
.Sc
is defined.
.It Ar atm_pvcs
(str) Set to the list of ATM PVCs you would like to add at system
boot time. For each whitespace separated
.Em element
in the value, an
.No atm_pvc_ Ns Em element
variable is assumed to exist. The value of each of these variables
will be passed as the parameters of an
.Dq atm add pvc
command.
.It Ar atm_arps
(str) Set to the list of permanent ATM ARP entries you would like to add
at system boot time. For each whitespace separated
.Em element
in the value, an
.No atm_arp_ Ns Em element
variable is assumed to exist. The value of each of these variables
will be passed as the parameters of an
.Dq atm add arp
command.
.It Ar keymap
(str) If set to
.Ar NO
@ -832,6 +923,7 @@ on system operation.
.Xr accton 8 ,
.Xr amd 8 ,
.Xr apm 8 ,
.Xr atm 8 ,
.Xr cron 8 ,
.Xr gated 8 ,
.Xr ifconfig 8 ,

View File

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)rc.8 8.2 (Berkeley) 12/11/93
.\" $Id: rc.8,v 1.3 1997/03/07 03:28:21 jmg Exp $
.\" $Id: rc.8,v 1.4 1998/02/26 02:44:17 jkh Exp $
.\"
.Dd December 11, 1993
.Dt RC 8
@ -46,6 +46,7 @@
.Nm rc.pccard
.Nm rc.network
.Nm rc.firewall
.Nm rc.atm
.Nm rc.<arch>
.Nm rc.local
.Nm rc.shutdown
@ -127,6 +128,14 @@ disables the loading of firewall rules.
will load the rules in the given filename (full path required).
.El
.Pp
.Nm Rc.atm
is used to configure ATM network interfaces.
The interfaces are configured in three passes.
The first pass performs the initial interface configuration.
The second pass completes the interface configuration and defines PVCs and
permanent ATMARP entries.
The third pass starts any ATM daemons.
.Pp
.Nm Rc.<arch>
runs architecture specific programs.
.Pp