Remove ATM protocol support.
authorSascha Wildner <saw@online.de>
Thu, 1 May 2014 22:31:57 +0000 (00:31 +0200)
committerSascha Wildner <saw@online.de>
Thu, 1 May 2014 22:31:57 +0000 (00:31 +0200)
FreeBSD ditched it about 6 years ago. Also, I'm not sure if this ever
worked on x86_64.

271 files changed:
Makefile_upgrade.inc
UPDATING
etc/defaults/rc.conf
etc/mtree/BSD.include.dist
etc/mtree/BSD.usr.dist
etc/rc.d/Makefile
etc/rc.d/atm1 [deleted file]
etc/rc.d/atm2 [deleted file]
etc/rc.d/atm3 [deleted file]
etc/rc.d/netif
include/Makefile
lib/Makefile
lib/compat/i386/Makefile
lib/compat/i386/libatm.so.2.20050501.REL1_2 [deleted file]
lib/libatm/Makefile [deleted file]
lib/libatm/atm_addr.c [deleted file]
lib/libatm/cache_key.c [deleted file]
lib/libatm/ioctl_subr.c [deleted file]
lib/libatm/ip_addr.c [deleted file]
lib/libatm/ip_checksum.c [deleted file]
lib/libatm/libatm.h [deleted file]
lib/libatm/timer.c [deleted file]
lib/libnetgraph7/debug.c
sbin/Makefile
sbin/atm/Makefile [deleted file]
sbin/atm/Makefile.inc [deleted file]
sbin/atm/atm/Makefile [deleted file]
sbin/atm/atm/atm.8 [deleted file]
sbin/atm/atm/atm.c [deleted file]
sbin/atm/atm/atm.h [deleted file]
sbin/atm/atm/atm_eni.c [deleted file]
sbin/atm/atm/atm_fore200.c [deleted file]
sbin/atm/atm/atm_inet.c [deleted file]
sbin/atm/atm/atm_print.c [deleted file]
sbin/atm/atm/atm_set.c [deleted file]
sbin/atm/atm/atm_show.c [deleted file]
sbin/atm/atm/atm_subr.c [deleted file]
sbin/atm/fore_dnld/COPYRIGHT [deleted file]
sbin/atm/fore_dnld/Makefile [deleted file]
sbin/atm/fore_dnld/fore_dnld.8 [deleted file]
sbin/atm/fore_dnld/fore_dnld.c [deleted file]
sbin/atm/fore_dnld/pca200e.c [deleted file]
sbin/atm/ilmid/Makefile [deleted file]
sbin/atm/ilmid/ilmid.8 [deleted file]
sbin/atm/ilmid/ilmid.c [deleted file]
share/examples/atm/NOTES [deleted file]
share/examples/atm/README [deleted file]
share/examples/atm/Startup [deleted file]
share/examples/atm/atm-config.sh [deleted file]
share/examples/atm/atm-sockets.txt [deleted file]
share/examples/atm/cpcs-design.txt [deleted file]
share/examples/atm/fore-microcode.txt [deleted file]
share/examples/atm/sscf-design.txt [deleted file]
share/examples/atm/sscop-design.txt [deleted file]
share/man/man4/Makefile
share/man/man4/man4.i386/Makefile
share/man/man4/man4.i386/en.4 [deleted file]
share/man/man4/natm.4 [deleted file]
share/man/man5/rc.conf.5
share/man/man7/hier.7
share/man/man8/rc.8
share/mk/bsd.libnames.mk
sys/conf/files
sys/conf/options
sys/config/LINT
sys/config/LINT64
sys/dev/atm/en/midway.c [deleted file]
sys/dev/atm/en/midwayreg.h [deleted file]
sys/dev/atm/en/midwayvar.h [deleted file]
sys/dev/atm/hea/eni.c [deleted file]
sys/dev/atm/hea/eni.h [deleted file]
sys/dev/atm/hea/eni_buffer.c [deleted file]
sys/dev/atm/hea/eni_globals.c [deleted file]
sys/dev/atm/hea/eni_if.c [deleted file]
sys/dev/atm/hea/eni_init.c [deleted file]
sys/dev/atm/hea/eni_intr.c [deleted file]
sys/dev/atm/hea/eni_receive.c [deleted file]
sys/dev/atm/hea/eni_stats.h [deleted file]
sys/dev/atm/hea/eni_suni.h [deleted file]
sys/dev/atm/hea/eni_transmit.c [deleted file]
sys/dev/atm/hea/eni_var.h [deleted file]
sys/dev/atm/hea/eni_vcm.c [deleted file]
sys/dev/atm/hfa/fore.h [deleted file]
sys/dev/atm/hfa/fore_aali.h [deleted file]
sys/dev/atm/hfa/fore_buffer.c [deleted file]
sys/dev/atm/hfa/fore_command.c [deleted file]
sys/dev/atm/hfa/fore_globals.c [deleted file]
sys/dev/atm/hfa/fore_if.c [deleted file]
sys/dev/atm/hfa/fore_include.h [deleted file]
sys/dev/atm/hfa/fore_init.c [deleted file]
sys/dev/atm/hfa/fore_intr.c [deleted file]
sys/dev/atm/hfa/fore_load.c [deleted file]
sys/dev/atm/hfa/fore_output.c [deleted file]
sys/dev/atm/hfa/fore_receive.c [deleted file]
sys/dev/atm/hfa/fore_slave.h [deleted file]
sys/dev/atm/hfa/fore_stats.c [deleted file]
sys/dev/atm/hfa/fore_stats.h [deleted file]
sys/dev/atm/hfa/fore_timer.c [deleted file]
sys/dev/atm/hfa/fore_transmit.c [deleted file]
sys/dev/atm/hfa/fore_var.h [deleted file]
sys/dev/atm/hfa/fore_vcm.c [deleted file]
sys/dev/netif/en_pci/if_en_pci.c [deleted file]
sys/net/if_atm.h [deleted file]
sys/net/if_atmsubr.c [deleted file]
sys/net/netisr.h
sys/netgraph7/Makefile
sys/netgraph7/atm/ccatm/ng_ccatm.c [deleted file]
sys/netgraph7/atm/ccatm/ng_ccatm_cust.h [deleted file]
sys/netgraph7/atm/ng_atm.c [deleted file]
sys/netgraph7/atm/ng_atm.h [deleted file]
sys/netgraph7/atm/ng_ccatm.h [deleted file]
sys/netgraph7/atm/ng_sscfu.h [deleted file]
sys/netgraph7/atm/ng_sscop.h [deleted file]
sys/netgraph7/atm/ng_uni.h [deleted file]
sys/netgraph7/atm/ngatmbase.c [deleted file]
sys/netgraph7/atm/ngatmbase.h [deleted file]
sys/netgraph7/atm/sscfu/ng_sscfu.c [deleted file]
sys/netgraph7/atm/sscfu/ng_sscfu_cust.h [deleted file]
sys/netgraph7/atm/sscop/ng_sscop.c [deleted file]
sys/netgraph7/atm/sscop/ng_sscop_cust.h [deleted file]
sys/netgraph7/atm/uni/ng_uni.c [deleted file]
sys/netgraph7/atm/uni/ng_uni_cust.h [deleted file]
sys/netgraph7/atmllc/Makefile [deleted file]
sys/netgraph7/atmllc/ng_atmllc.c [deleted file]
sys/netgraph7/atmllc/ng_atmllc.h [deleted file]
sys/netinet/if_atm.c [deleted file]
sys/netinet/if_atm.h [deleted file]
sys/netinet6/nd6.c
sys/netproto/atm/atm.h [deleted file]
sys/netproto/atm/atm_aal5.c [deleted file]
sys/netproto/atm/atm_cm.c [deleted file]
sys/netproto/atm/atm_cm.h [deleted file]
sys/netproto/atm/atm_device.c [deleted file]
sys/netproto/atm/atm_if.c [deleted file]
sys/netproto/atm/atm_if.h [deleted file]
sys/netproto/atm/atm_ioctl.h [deleted file]
sys/netproto/atm/atm_pcb.h [deleted file]
sys/netproto/atm/atm_proto.c [deleted file]
sys/netproto/atm/atm_sap.h [deleted file]
sys/netproto/atm/atm_sigmgr.h [deleted file]
sys/netproto/atm/atm_signal.c [deleted file]
sys/netproto/atm/atm_socket.c [deleted file]
sys/netproto/atm/atm_stack.h [deleted file]
sys/netproto/atm/atm_subr.c [deleted file]
sys/netproto/atm/atm_sys.h [deleted file]
sys/netproto/atm/atm_usrreq.c [deleted file]
sys/netproto/atm/atm_var.h [deleted file]
sys/netproto/atm/atm_vc.h [deleted file]
sys/netproto/atm/ipatm/ipatm.h [deleted file]
sys/netproto/atm/ipatm/ipatm_event.c [deleted file]
sys/netproto/atm/ipatm/ipatm_if.c [deleted file]
sys/netproto/atm/ipatm/ipatm_input.c [deleted file]
sys/netproto/atm/ipatm/ipatm_load.c [deleted file]
sys/netproto/atm/ipatm/ipatm_output.c [deleted file]
sys/netproto/atm/ipatm/ipatm_serv.h [deleted file]
sys/netproto/atm/ipatm/ipatm_usrreq.c [deleted file]
sys/netproto/atm/ipatm/ipatm_var.h [deleted file]
sys/netproto/atm/ipatm/ipatm_vcm.c [deleted file]
sys/netproto/atm/kern_include.h [deleted file]
sys/netproto/atm/port.h [deleted file]
sys/netproto/atm/queue.h [deleted file]
sys/netproto/atm/sigpvc/sigpvc_if.c [deleted file]
sys/netproto/atm/sigpvc/sigpvc_subr.c [deleted file]
sys/netproto/atm/sigpvc/sigpvc_var.h [deleted file]
sys/netproto/atm/spans/spans_arp.c [deleted file]
sys/netproto/atm/spans/spans_cls.c [deleted file]
sys/netproto/atm/spans/spans_cls.h [deleted file]
sys/netproto/atm/spans/spans_if.c [deleted file]
sys/netproto/atm/spans/spans_kxdr.c [deleted file]
sys/netproto/atm/spans/spans_kxdr.h [deleted file]
sys/netproto/atm/spans/spans_msg.c [deleted file]
sys/netproto/atm/spans/spans_print.c [deleted file]
sys/netproto/atm/spans/spans_proto.c [deleted file]
sys/netproto/atm/spans/spans_subr.c [deleted file]
sys/netproto/atm/spans/spans_util.c [deleted file]
sys/netproto/atm/spans/spans_var.h [deleted file]
sys/netproto/atm/spans/spans_xdr.x [deleted file]
sys/netproto/atm/uni/q2110_sigaa.c [deleted file]
sys/netproto/atm/uni/q2110_sigcpcs.c [deleted file]
sys/netproto/atm/uni/q2110_subr.c [deleted file]
sys/netproto/atm/uni/qsaal1_sigaa.c [deleted file]
sys/netproto/atm/uni/qsaal1_sigcpcs.c [deleted file]
sys/netproto/atm/uni/qsaal1_subr.c [deleted file]
sys/netproto/atm/uni/sscf_uni.c [deleted file]
sys/netproto/atm/uni/sscf_uni.h [deleted file]
sys/netproto/atm/uni/sscf_uni_lower.c [deleted file]
sys/netproto/atm/uni/sscf_uni_upper.c [deleted file]
sys/netproto/atm/uni/sscf_uni_var.h [deleted file]
sys/netproto/atm/uni/sscop.c [deleted file]
sys/netproto/atm/uni/sscop.h [deleted file]
sys/netproto/atm/uni/sscop_lower.c [deleted file]
sys/netproto/atm/uni/sscop_misc.h [deleted file]
sys/netproto/atm/uni/sscop_pdu.c [deleted file]
sys/netproto/atm/uni/sscop_pdu.h [deleted file]
sys/netproto/atm/uni/sscop_sigaa.c [deleted file]
sys/netproto/atm/uni/sscop_sigcpcs.c [deleted file]
sys/netproto/atm/uni/sscop_subr.c [deleted file]
sys/netproto/atm/uni/sscop_timer.c [deleted file]
sys/netproto/atm/uni/sscop_upper.c [deleted file]
sys/netproto/atm/uni/sscop_var.h [deleted file]
sys/netproto/atm/uni/uni.h [deleted file]
sys/netproto/atm/uni/uni_load.c [deleted file]
sys/netproto/atm/uni/uniarp.c [deleted file]
sys/netproto/atm/uni/uniarp_cache.c [deleted file]
sys/netproto/atm/uni/uniarp_input.c [deleted file]
sys/netproto/atm/uni/uniarp_output.c [deleted file]
sys/netproto/atm/uni/uniarp_timer.c [deleted file]
sys/netproto/atm/uni/uniarp_vcm.c [deleted file]
sys/netproto/atm/uni/uniip.c [deleted file]
sys/netproto/atm/uni/uniip_var.h [deleted file]
sys/netproto/atm/uni/unisig.h [deleted file]
sys/netproto/atm/uni/unisig_decode.c [deleted file]
sys/netproto/atm/uni/unisig_decode.h [deleted file]
sys/netproto/atm/uni/unisig_encode.c [deleted file]
sys/netproto/atm/uni/unisig_if.c [deleted file]
sys/netproto/atm/uni/unisig_mbuf.c [deleted file]
sys/netproto/atm/uni/unisig_mbuf.h [deleted file]
sys/netproto/atm/uni/unisig_msg.c [deleted file]
sys/netproto/atm/uni/unisig_msg.h [deleted file]
sys/netproto/atm/uni/unisig_print.c [deleted file]
sys/netproto/atm/uni/unisig_print.h [deleted file]
sys/netproto/atm/uni/unisig_proto.c [deleted file]
sys/netproto/atm/uni/unisig_sigmgr_state.c [deleted file]
sys/netproto/atm/uni/unisig_subr.c [deleted file]
sys/netproto/atm/uni/unisig_util.c [deleted file]
sys/netproto/atm/uni/unisig_var.h [deleted file]
sys/netproto/atm/uni/unisig_vc_state.c [deleted file]
sys/netproto/natm/natm.c [deleted file]
sys/netproto/natm/natm.h [deleted file]
sys/netproto/natm/natm_pcb.c [deleted file]
sys/netproto/natm/natm_proto.c [deleted file]
sys/sys/param.h
sys/sys/priv.h
usr.bin/kdump/mkioctls
usr.sbin/Makefile
usr.sbin/atm/Makefile [deleted file]
usr.sbin/atm/Makefile.inc [deleted file]
usr.sbin/atm/atmarpd/Makefile [deleted file]
usr.sbin/atm/atmarpd/atmarp_config.c [deleted file]
usr.sbin/atm/atmarpd/atmarp_log.c [deleted file]
usr.sbin/atm/atmarpd/atmarp_scsp.c [deleted file]
usr.sbin/atm/atmarpd/atmarp_subr.c [deleted file]
usr.sbin/atm/atmarpd/atmarp_timer.c [deleted file]
usr.sbin/atm/atmarpd/atmarp_var.h [deleted file]
usr.sbin/atm/atmarpd/atmarpd.8 [deleted file]
usr.sbin/atm/atmarpd/atmarpd.c [deleted file]
usr.sbin/atm/scspd/Makefile [deleted file]
usr.sbin/atm/scspd/scsp_cafsm.c [deleted file]
usr.sbin/atm/scspd/scsp_config.c [deleted file]
usr.sbin/atm/scspd/scsp_config_lex.c [deleted file]
usr.sbin/atm/scspd/scsp_config_parse.y [deleted file]
usr.sbin/atm/scspd/scsp_hfsm.c [deleted file]
usr.sbin/atm/scspd/scsp_if.c [deleted file]
usr.sbin/atm/scspd/scsp_if.h [deleted file]
usr.sbin/atm/scspd/scsp_input.c [deleted file]
usr.sbin/atm/scspd/scsp_log.c [deleted file]
usr.sbin/atm/scspd/scsp_msg.c [deleted file]
usr.sbin/atm/scspd/scsp_msg.h [deleted file]
usr.sbin/atm/scspd/scsp_output.c [deleted file]
usr.sbin/atm/scspd/scsp_print.c [deleted file]
usr.sbin/atm/scspd/scsp_socket.c [deleted file]
usr.sbin/atm/scspd/scsp_subr.c [deleted file]
usr.sbin/atm/scspd/scsp_timer.c [deleted file]
usr.sbin/atm/scspd/scsp_var.h [deleted file]
usr.sbin/atm/scspd/scspd.8 [deleted file]
usr.sbin/atm/scspd/scspd.c [deleted file]
usr.sbin/mrouted/mrouted.8
usr.sbin/ppp/Makefile
usr.sbin/ppp/atm.c [deleted file]
usr.sbin/ppp/atm.h [deleted file]
usr.sbin/ppp/physical.c

index 8673642..0dbf7dc 100644 (file)
@@ -2600,6 +2600,40 @@ TO_REMOVE+=/usr/share/man/cat8/IPXrouted.8.gz
 TO_REMOVE+=/usr/share/man/man8/IPXrouted.8.gz
 TO_REMOVE+=/usr/share/man/cat8/mount_nwfs.8.gz
 TO_REMOVE+=/usr/share/man/man8/mount_nwfs.8.gz
+TO_REMOVE+=/boot/kernel/ng_atmllc.ko
+TO_REMOVE+=/etc/rc.d/atm1
+TO_REMOVE+=/etc/rc.d/atm2
+TO_REMOVE+=/etc/rc.d/atm3
+TO_REMOVE+=/sbin/atm
+TO_REMOVE+=/sbin/fore_dnld
+TO_REMOVE+=/sbin/ilmid
+TO_REMOVE+=/lib/libatm.so.3
+TO_REMOVE+=/usr/include/libatm.h
+TO_REMOVE+=/usr/include/netatm
+TO_REMOVE+=/usr/include/netgraph7/atmllc
+TO_REMOVE+=/usr/include/netnatm
+TO_REMOVE+=/usr/include/netproto/atm
+TO_REMOVE+=/usr/include/netproto/natm
+TO_REMOVE+=/usr/lib/compat/libatm.so.2
+TO_REMOVE+=/usr/lib/libatm.a
+TO_REMOVE+=/usr/lib/libatm.so
+TO_REMOVE+=/usr/sbin/atmarpd
+TO_REMOVE+=/usr/sbin/scpd
+TO_REMOVE+=/usr/share/examples/atm
+TO_REMOVE+=/usr/share/man/cat4/i386/en.4.gz
+TO_REMOVE+=/usr/share/man/man4/i386/en.4.gz
+TO_REMOVE+=/usr/share/man/cat4/natm.4.gz
+TO_REMOVE+=/usr/share/man/man4/natm.4.gz
+TO_REMOVE+=/usr/share/man/cat8/atm.8.gz
+TO_REMOVE+=/usr/share/man/man8/atm.8.gz
+TO_REMOVE+=/usr/share/man/cat8/atmarpd.8.gz
+TO_REMOVE+=/usr/share/man/man8/atmarpd.8.gz
+TO_REMOVE+=/usr/share/man/cat8/fore_dnld.8.gz
+TO_REMOVE+=/usr/share/man/man8/fore_dnld.8.gz
+TO_REMOVE+=/usr/share/man/cat8/ilmid.8.gz
+TO_REMOVE+=/usr/share/man/man8/ilmid.8.gz
+TO_REMOVE+=/usr/share/man/cat8/scspd.8.gz
+TO_REMOVE+=/usr/share/man/man8/scspd.8.gz
 
 .if ${MACHINE_ARCH} == "x86_64"
 TO_REMOVE+=/usr/sbin/stlstats
index 9e98e49..189f2e0 100644 (file)
--- a/UPDATING
+++ b/UPDATING
 +         UPGRADING DRAGONFLY FROM 3.6 TO LATER VERSIONS                +
 +-----------------------------------------------------------------------+
 
-IPX, NCP AND NWFS SUPPORT DROPPED
----------------------------------
+ATM, IPX, NCP AND NWFS SUPPORT DROPPED
+--------------------------------------
 
 Support for the IPX and NCP network protocols and for mouting NetWare
-file systems has been dropped.
+file systems has been dropped. Dito for ATM protocol support.
 
 INITRD IMAGES NOW INSTALLED BY DEFAULT
 --------------------------------------
index e4f8bf7..87ba6c4 100644 (file)
@@ -221,16 +221,6 @@ arpproxy_all="NO"          # 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_arps=""                    # Set to permanent ARP list (or leave empty).
-
 ### Miscellaneous network options: ###
 icmp_bmcastecho="NO"   # respond to broadcast ping packets
 
index 7c51d23..b5abe5c 100644 (file)
         ..
         async
         ..
-        atmllc
-        ..
         bpf
         ..
         bridge
     netproto
         802_11
         ..
-        atm
-            ipatm
-            ..
-            sigpvc
-            ..
-            spans
-            ..
-            uni
-            ..
-        ..
         ipsec
         ..
         key
         ..
         mpls
         ..
-        natm
-        ..
         smb
         ..
     ..
index e56450a..a2481ad 100644 (file)
             ..
             acpica
             ..
-            atm
-            ..
             cvs
                 contrib
                 ..
index a50320d..1949d87 100644 (file)
@@ -6,7 +6,7 @@
 # note: bgfsk and lomac left out (from 5.0)
 #
 FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz \
-       amd apm apmd atm1 atm2 atm3 \
+       amd apm apmd \
        battd bootconf bootparams btconfig bthcid ccd cleanvar cryptdisks \
        cleartmp cron cryptdisks devd devfs dhclient diskless dmesg dumpon \
        fixbootfile fsck ftpd hostapd hostname hotplugd \
diff --git a/etc/rc.d/atm1 b/etc/rc.d/atm1
deleted file mode 100644 (file)
index 16d44f7..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2000  The FreeBSD Project
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD: src/etc/rc.d/atm1,v 1.12 2003/04/18 17:55:05 mtm Exp $
-# $DragonFly: src/etc/rc.d/atm1,v 1.3 2005/11/19 21:47:32 swildner Exp $
-#
-
-# PROVIDE: atm1
-# REQUIRE: root
-# BEFORE: netif
-
-. /etc/rc.subr
-
-name="atm"
-rcvar="atm_enable"
-start_cmd="atm_start"
-stop_cmd=":"
-
-# ATM networking startup script
-#
-# Initial interface configuration.
-# N.B. /usr is not mounted.
-#
-atm_start()
-{
-       # Locate all probed ATM adapters
-       atmdev=`atm sh stat int | 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} "
-                       ;;
-               idt[0-9] | idt[0-9][0-9])
-                       echo "${dev} "
-                       ;;
-               *)
-                       continue
-                       ;;
-               esac
-       done`
-
-       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
-       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}" ]; then
-                       case ${macaddr_args} in
-                       [Nn][Oo] | '')
-                               ;;
-                       *)
-                               atm set mac ${phy} ${macaddr_args} || continue
-                               ;;
-                       esac
-               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
-
-                       case ${prefix_args} in
-                       ILMI)
-                               ilmid=1
-                               ;;
-                       *)
-                               atm set prefix ${phy} ${prefix_args} || continue
-                               ;;
-                       esac
-               fi
-
-               atm_phy="${atm_phy} ${phy}"
-               echo '.'
-       done
-
-       echo -n 'Starting initial ATM daemons:'
-       # Start ILMI daemon (if needed)
-       case ${ilmid} in
-       1)
-               echo -n ' ilmid'
-               ilmid
-               ;;
-       esac
-
-       echo '.'
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/etc/rc.d/atm2 b/etc/rc.d/atm2
deleted file mode 100644 (file)
index c9e7448..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2000  The FreeBSD Project
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD: src/etc/rc.d/atm2.sh,v 1.13 2003/06/29 05:15:57 mtm Exp $
-# $DragonFly: src/etc/rc.d/atm2.sh,v 1.4 2005/11/19 21:47:32 swildner Exp $
-#
-
-# PROVIDE: atm2
-# REQUIRE: atm1 netif
-# BEFORE:  routing
-
-#
-# Additional ATM interface configuration
-#
-
-. /etc/rc.subr
-dummy_rc_command "$1"
-
-atm2_start()
-{
-       # 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=$((${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}
-
-                       case ${scsparp_args} in
-                       [Yy][Ee][Ss])
-                               case ${atmarp_args} in
-                               local)
-                                       ;;
-                               *)
-                                       echo ' local arpserver required for SCSP'
-                                       continue
-                                       ;;
-                               esac
-
-                               atm_atmarpd="${atm_atmarpd} ${net}"
-                               atm_scspd=1
-                               ;;
-                       esac
-               done
-       done
-       echo '.'
-
-       # Define any permanent ARP entries.
-       if [ -n "${atm_arps}" ]; then
-               for i in ${atm_arps}; do
-                       eval arp_args=\$atm_arp_${i}
-                       atm add arp ${arp_args}
-               done
-       fi
-
-       # XXX - required by atm3. I don't like having one script depend
-       #       on variables in another script (especially in a dynamic
-       #       ordered system like this), but it's necessary for the moment.
-       #
-       export atm_atmarpd
-       export atm_scspd
-}
-
-load_rc_config "XXX"
-
-case ${atm_enable} in
-[Yy][Ee][Ss])
-       atm2_start
-       ;;
-esac
diff --git a/etc/rc.d/atm3 b/etc/rc.d/atm3
deleted file mode 100644 (file)
index 80582af..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2000  The FreeBSD Project
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $FreeBSD: src/etc/rc.d/atm3.sh,v 1.10 2002/06/13 22:14:36 gordon Exp $
-# $DragonFly: src/etc/rc.d/atm3.sh,v 1.4 2005/11/19 21:47:32 swildner Exp $
-#
-
-# Start ATM daemons
-# XXX - This script uses global variables set by scripts atm1 and atm2.
-#      Ideally this shouldn't be the case.
-#
-
-# PROVIDE: atm3
-# REQUIRE: atm2
-# BEFORE: DAEMON
-
-. /etc/rc.subr
-dummy_rc_command "$1"
-
-atm3_start()
-{
-       echo -n 'Starting ATM daemons:'
-
-       # Start SCSP daemon (if needed)
-       case ${atm_scspd} in
-       1)
-               echo -n ' scspd'
-               scspd
-               ;;
-       esac
-
-       # Start ATMARP daemon (if needed)
-       if [ -n "${atm_atmarpd}" ]; then
-               echo -n ' atmarpd'
-               atmarpd ${atm_atmarpd}
-       fi
-       echo '.'
-}
-
-load_rc_config "XXX"
-
-case ${atm_enable} in
-[Yy][Ee][Ss])
-       atm3_start
-       ;;
-esac
index 02b5a0d..4faab37 100644 (file)
@@ -26,7 +26,7 @@
 #
 
 # PROVIDE: netif
-# REQUIRE: atm1 cleanvar mountcritlocal serial sppp sysctl tty
+# REQUIRE: cleanvar mountcritlocal serial sppp sysctl tty
 
 . /etc/rc.subr
 . /etc/network.subr
index 4dfd1dd..584626e 100644 (file)
@@ -77,7 +77,7 @@ LSUBDIRS= \
        netgraph/mppc netgraph/one2many netgraph/ppp \
        netgraph/pppoe netgraph/pptpgre netgraph/rfc1490 netgraph/socket \
        netgraph/tee netgraph/tty netgraph/vjc \
-       netgraph7/UI netgraph7/async netgraph7/atmllc netgraph7/bpf \
+       netgraph7/UI netgraph7/async netgraph7/bpf \
        netgraph7/bridge netgraph7/cisco netgraph7/deflate netgraph7/echo \
        netgraph7/etf netgraph7/ether netgraph7/frame_relay netgraph7/hole \
        netgraph7/hub \
@@ -85,10 +85,8 @@ LSUBDIRS= \
        netgraph7/mppc netgraph7/one2many netgraph7/ppp netgraph7/pppoe \
        netgraph7/pptpgre netgraph7/rfc1490 netgraph7/socket \
        netgraph7/tcpmss netgraph7/tee netgraph7/tty netgraph7/vjc \
-       netproto/atm netproto/ipsec \
-       netproto/atm/ipatm netproto/atm/sigpvc netproto/atm/spans \
-       netproto/atm/uni netproto/802_11 netproto/mpls \
-       netproto/key netproto/natm netproto/smb \
+       netproto/ipsec netproto/802_11 netproto/mpls \
+       netproto/key netproto/smb \
        vfs/isofs/cd9660 vfs/puffs \
        vfs/msdosfs vfs/nfs vfs/ntfs \
        vfs/smbfs vfs/udf vfs/ufs vfs/hammer vfs/hammer2
@@ -99,9 +97,8 @@ LSUBDIRS+=    bus/u4b
 LSUBDIRS+=     bus/usb
 .endif
 
-# For SHARED=symlinks, bus/cam and netproto/atm are symlinks, so cam/scsi
-# and netproto/atm/* are taken care of
-LSYMSUBDIRS=   ${LSUBDIRS:Nbus/cam/scsi:Nnetproto/atm/*:Nnet/*:Nnetgraph/*:Nnetgraph7/*}
+# For SHARED=symlinks, bus/cam is a symlink, so cam/scsi is taken care of
+LSYMSUBDIRS=   ${LSUBDIRS:Nbus/cam/scsi:Nnet/*:Nnetgraph/*:Nnetgraph7/*}
 
 # For obsolete headers which need to be removed
 RMHEADERS=     machine/ansi.h sys/inttypes.h
@@ -146,10 +143,8 @@ INCSLINKS+=        vfs ${INCLUDEDIR}/fs
 INCSLINKS+=    vfs ${INCLUDEDIR}/ufs
 INCSLINKS+=    ufs ${INCLUDEDIR}/vfs/ffs
 INCSLINKS+=    emulation ${INCLUDEDIR}/compat
-INCSLINKS+=    netproto/atm ${INCLUDEDIR}/netatm
 INCSLINKS+=    netproto/ipsec ${INCLUDEDIR}/netipsec
 INCSLINKS+=    netproto/key ${INCLUDEDIR}/netkey
-INCSLINKS+=    netproto/natm ${INCLUDEDIR}/netnatm
 INCSLINKS+=    netproto/smb ${INCLUDEDIR}/netsmb
 INCSLINKS+=    bus/pccard ${INCLUDEDIR}/pccard
 # Some 3rd party software looks for <floatingpoint.h>
index 7bbd20f..a3f9d04 100644 (file)
@@ -7,7 +7,7 @@
 # ${_libc_r} must be built before libpthread.
 # libcom_err must be built before libpam.
 # libcrypt must be built before libpam.
-# libmd must be built before libarchive, libatm, libopie, libradius, and libtacplus.
+# libmd must be built before libarchive, libopie, libradius, and libtacplus.
 # libncurses must be built before libdialog and libedit.
 # libradius must be built before libpam.
 # libsbuf must be built before libcam.
@@ -34,7 +34,6 @@ SUBDIR=       ${SUBDIR_ORDERED} \
        i18n_module \
        libalias \
        libarchive \
-       libatm \
        libbluetooth \
        libbz2 \
        libc \
index f792bc0..fe3e219 100644 (file)
@@ -1,5 +1,5 @@
 FILESDIR=    ${LIBCOMPATDIR}
-COMPAT_LIBS= libalias.so.4 libarchive.so.1 libatm.so.2 libbz2.so.1 \
+COMPAT_LIBS= libalias.so.4 libarchive.so.1 libbz2.so.1 \
             libc.so.4 libc_r.so.4 libcalendar.so.2 libcam.so.2 \
             libcipher.so.2 libcom_err.so.2 libcrypt.so.2 libcrypto.so.3 \
             libdevstat.so.2 libdialog.so.4 libedit.so.3 libfetch.so.3 \
diff --git a/lib/compat/i386/libatm.so.2.20050501.REL1_2 b/lib/compat/i386/libatm.so.2.20050501.REL1_2
deleted file mode 100644 (file)
index dc98303..0000000
Binary files a/lib/compat/i386/libatm.so.2.20050501.REL1_2 and /dev/null differ
diff --git a/lib/libatm/Makefile b/lib/libatm/Makefile
deleted file mode 100644 (file)
index 07adf18..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-#
-# ===================================
-# HARP  |  Host ATM Research Platform
-# ===================================
-#
-#
-# This Host ATM Research Platform ("HARP") file (the "Software") is
-# made available by Network Computing Services, Inc. ("NetworkCS")
-# "AS IS".  NetworkCS does not provide maintenance, improvements or
-# support of any kind.
-#
-# NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
-# INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
-# SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
-# In no event shall NetworkCS be responsible for any damages, including
-# but not limited to consequential damages, arising from or relating to
-# any use of the Software or related support.
-#
-# Copyright 1994-1998 Network Computing Services, Inc.
-#
-# Copies of this Software may be made, however, the above copyright
-# notice must be reproduced on all copies.
-#
-# $FreeBSD: src/lib/libatm/Makefile,v 1.4 2000/01/14 07:57:22 rgrimes Exp $
-# $DragonFly: src/lib/libatm/Makefile,v 1.2 2003/06/17 04:26:41 dillon Exp $
-#
-#
-
-LIB=   atm
-SHLIBDIR?= /lib
-SRCS=  atm_addr.c cache_key.c ioctl_subr.c ip_addr.c ip_checksum.c timer.c
-INCS=  libatm.h
-WARNS?=        1
-
-LDADD+=        -lmd
-DPADD+=        ${LIBMD}
-
-.include <bsd.lib.mk>
diff --git a/lib/libatm/atm_addr.c b/lib/libatm/atm_addr.c
deleted file mode 100644 (file)
index d41e87b..0000000
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- * $FreeBSD: src/lib/libatm/atm_addr.c,v 1.4.2.1 2001/09/28 16:52:10 dillon Exp $
- * $DragonFly: src/lib/libatm/atm_addr.c,v 1.4 2008/09/30 16:57:04 swildner Exp $
- */
-
-/*
- * User Space Library Functions
- * ----------------------------
- *
- * ATM address utility functions
- *
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h>
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "libatm.h"
-
-extern char    *prog;
-
-
-/*
- * Get NSAP, NSAP prefix or MAC address
- *
- * Arguments:
- *     in      pointer to an address in ASCII
- *     out     pointer to a buffer for the converted address
- *     len     the length of the output buffer
- *
- * Returns:
- *     0       error in format
- *     len     the length of the data in the output buffer
- *
- */
-int
-get_hex_atm_addr(char *in, u_char *out, int len)
-{
-       int     c_type, c_value, i, out_len, state, val = 0;
-
-       /*
-        * Character table
-        */
-       static struct {
-               char    c;
-               int     type;
-               int     value;
-       } char_table[] = {
-               {'.',   0,      0},     /* Type 0 -- period */
-               {':',   0,      0},     /* Type 0 -- colon */
-               {'0',   1,      0},     /* Type 1 -- hex digit */
-               {'1',   1,      1},
-               {'2',   1,      2},
-               {'3',   1,      3},
-               {'4',   1,      4},
-               {'5',   1,      5},
-               {'6',   1,      6},
-               {'7',   1,      7},
-               {'8',   1,      8},
-               {'9',   1,      9},
-               {'a',   1,      10},
-               {'b',   1,      11},
-               {'c',   1,      12},
-               {'d',   1,      13},
-               {'e',   1,      14},
-               {'f',   1,      15},
-               {'A',   1,      10},
-               {'B',   1,      11},
-               {'C',   1,      12},
-               {'D',   1,      13},
-               {'E',   1,      14},
-               {'F',   1,      15},
-               {'\0',  2,      0},     /* Type 2 -- end of input */
-       };
-
-       /*
-        * State table
-        */
-       static struct {
-               int     action;
-               int     state;
-       } state_table[3][3] = {
-               /* Period     Hex       End                     */
-               { { 0, 0 }, { 1, 1 }, { 2, 0} },        /* Init */
-               { { 4, 0 }, { 3, 2 }, { 4, 0} },        /* C1   */
-               { { 0, 2 }, { 1, 1 }, { 2, 0} },        /* C2   */
-       };
-
-       /*
-        * Initialize
-        */
-       state = 0;
-       out_len = 0;
-       if (!strncasecmp(in, "0x", 2)) {
-               in += 2;
-       }
-
-       /*
-        * Loop through input until state table says to return
-        */
-       while (1) {
-               /*
-                * Get the character type and value
-                */
-               for (i=0; char_table[i].c; i++)
-                       if (char_table[i].c == *in)
-                               break;
-               if (char_table[i].c != *in)
-                       return(0);
-               c_type = char_table[i].type;
-               c_value = char_table[i].value;
-
-               /*
-                * Process next character based on state and type
-                */
-               switch(state_table[state][c_type].action) {
-               case 0:
-                       /*
-                        * Ignore the character
-                        */
-                       break;
-
-               case 1:
-                       /*
-                        * Save the character's value
-                        */
-                       val = c_value;
-                       break;
-
-               case 2:
-                       /*
-                        * Return the assembled NSAP
-                        */
-                       return(out_len);
-
-               case 3:
-                       /*
-                        * Assemble and save the output byte
-                        */
-                       val = val << 4;
-                       val += c_value;
-                       out[out_len] = (u_char) val;
-                       out_len++;
-                       break;
-
-               case 4:
-                       /*
-                        * Invalid input sequence
-                        */
-                       return(0);
-
-               default:
-                       return(0);
-               }
-
-               /*
-                * Set the next state and go on to the next character
-                */
-               state = state_table[state][c_type].state;
-               in++;
-       }
-}
-
-
-/*
- * Format an ATM address into a string
- * 
- * Arguments:
- *     addr    pointer to an atm address
- *
- * Returns:
- *     none
- *
- */
-char *
-format_atm_addr(Atm_addr *addr)
-{
-       int             i;
-       char            *nsap_format;
-       Atm_addr_nsap   *atm_nsap;
-       Atm_addr_e164   *atm_e164;
-       Atm_addr_spans  *atm_spans;
-       Atm_addr_pvc    *atm_pvc;
-       static char     str[256];
-       union {
-               int     w;
-               char    c[4];
-       } u1, u2;
-
-       static char     nsap_format_DCC[] = "0x%02x.%02x%02x.%02x.%02x%02x%02x.%02x%02x.%02x%02x.%02x%02x.%02x%02x%02x%02x%02x%02x.%02x";
-       static char     nsap_format_ICD[] = "0x%02x.%02x%02x.%02x.%02x%02x%02x.%02x%02x.%02x%02x.%02x%02x.%02x%02x%02x%02x%02x%02x.%02x";
-       static char     nsap_format_E164[] = "0x%02x.%02x%02x%02x%02x%02x%02x%02x%02x.%02x%02x.%02x%02x.%02x%02x%02x%02x%02x%02x.%02x";
-
-       /*
-        * Clear the returned string
-        */
-       UM_ZERO(str, sizeof(str));
-       strlcpy(str, "-", sizeof(str));
-
-       /*
-        * Print format is determined by address type
-        */
-       switch (addr->address_format) {
-       case T_ATM_ENDSYS_ADDR:
-               atm_nsap = (Atm_addr_nsap *)addr->address;
-               switch(atm_nsap->aan_afi) {
-               default:
-               case AFI_DCC:
-                       nsap_format = nsap_format_DCC;
-                       break;
-               case AFI_ICD:
-                       nsap_format = nsap_format_ICD;
-                       break;
-               case AFI_E164:
-                       nsap_format = nsap_format_E164;
-                       break;
-               }
-               sprintf(str, nsap_format, 
-                               atm_nsap->aan_afi,
-                               atm_nsap->aan_afspec[0],
-                               atm_nsap->aan_afspec[1],
-                               atm_nsap->aan_afspec[2],
-                               atm_nsap->aan_afspec[3],
-                               atm_nsap->aan_afspec[4],
-                               atm_nsap->aan_afspec[5],
-                               atm_nsap->aan_afspec[6],
-                               atm_nsap->aan_afspec[7],
-                               atm_nsap->aan_afspec[8],
-                               atm_nsap->aan_afspec[9],
-                               atm_nsap->aan_afspec[10],
-                               atm_nsap->aan_afspec[11],
-                               atm_nsap->aan_esi[0],
-                               atm_nsap->aan_esi[1],
-                               atm_nsap->aan_esi[2],
-                               atm_nsap->aan_esi[3],
-                               atm_nsap->aan_esi[4],
-                               atm_nsap->aan_esi[5],
-                               atm_nsap->aan_sel);
-               break;
-
-       case T_ATM_E164_ADDR:
-               atm_e164 = (Atm_addr_e164 *)addr->address;
-               for(i=0; i<addr->address_length; i++) {
-                       sprintf(&str[strlen(str)], "%c",
-                                       atm_e164->aae_addr[i]);
-               }
-               break;
-
-       case T_ATM_SPANS_ADDR:
-               /*
-                * Print SPANS address as two words, xxxx.yyyy
-                */
-               atm_spans = (Atm_addr_spans *)addr->address;
-               u1.c[0] = atm_spans->aas_addr[0];
-               u1.c[1] = atm_spans->aas_addr[1];
-               u1.c[2] = atm_spans->aas_addr[2];
-               u1.c[3] = atm_spans->aas_addr[3];
-
-               u2.c[0] = atm_spans->aas_addr[4];
-               u2.c[1] = atm_spans->aas_addr[5];
-               u2.c[2] = atm_spans->aas_addr[6];
-               u2.c[3] = atm_spans->aas_addr[7];
-
-               if (!(u1.w == 0 && u2.w == 0))
-                       sprintf(str, "0x%08lx.%08lx", ntohl(u1.w), ntohl(u2.w));
-               break;
-
-       case T_ATM_PVC_ADDR:
-               /*
-                * Print PVC as VPI, VCI
-                */
-               atm_pvc = (Atm_addr_pvc *)addr->address;
-               sprintf(str, "%d, %d",
-                               ATM_PVC_GET_VPI(atm_pvc),
-                               ATM_PVC_GET_VCI(atm_pvc));
-               break;
-
-       case T_ATM_ABSENT:
-       default:
-               break;
-       }
-
-       return(str);
-}
diff --git a/lib/libatm/cache_key.c b/lib/libatm/cache_key.c
deleted file mode 100644 (file)
index e85bd31..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- * $FreeBSD: src/lib/libatm/cache_key.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $
- * $DragonFly: src/lib/libatm/cache_key.c,v 1.3 2008/09/30 16:57:04 swildner Exp $
- */
-
-/*
- * User Space Library Functions
- * ----------------------------
- *
- * SCSP cache key computation
- *
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h>
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include <md5.h>
-#include <string.h>
-
-#include "libatm.h"
-
-/*
- * Compute an SCSP cache key
- *
- * Arguments:
- *     ap      pointer to an Atm_addr with the ATM address
- *     ip      pointer to a struct in_addr with the IP address
- *     ol      the required length of the cache key
- *     op      pointer to receive cache key
- *
- * Returns:
- *     none
- *
- */
-void
-scsp_cache_key(Atm_addr *ap, struct in_addr *ip, int ol, char *op)
-{
-       int     i, len;
-       char    buff[32], digest[16];
-       MD5_CTX context;
-
-       /*
-        * Initialize
-        */
-       UM_ZERO(buff, sizeof(buff));
-
-       /*
-        * Copy the addresses into a buffer for MD5 computation
-        */
-       len = sizeof(struct in_addr) + ap->address_length;
-       if (len > sizeof(buff))
-               len = sizeof(buff);
-       UM_COPY(ip, buff, sizeof(struct in_addr));
-       UM_COPY(ap->address, &buff[sizeof(struct in_addr)],
-                       len - sizeof(struct in_addr));
-
-       /*
-        * Compute the MD5 digest of the combined IP and ATM addresses
-        */
-       MD5Init(&context);
-       MD5Update(&context, buff, len);
-       MD5Final(digest, &context);
-
-       /*
-        * Fold the 16-byte digest to the required length
-        */
-       UM_ZERO((caddr_t)op, ol);
-       for (i = 0; i < 16; i++) {
-               op[i % ol] = op[i % ol] ^ digest[i];
-       }
-}
diff --git a/lib/libatm/ioctl_subr.c b/lib/libatm/ioctl_subr.c
deleted file mode 100644 (file)
index 7a8abe2..0000000
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- * $FreeBSD: src/lib/libatm/ioctl_subr.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $
- * $DragonFly: src/lib/libatm/ioctl_subr.c,v 1.5 2008/09/30 16:57:04 swildner Exp $
- */
-
-/*
- * User Space Library Functions
- * ----------------------------
- *
- * IOCTL subroutines
- *
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h>
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "libatm.h"
-
-#ifndef        TRUE
-#define        TRUE    1
-#endif
-
-#ifndef        FALSE
-#define        FALSE   0
-#endif
-
-extern char    *prog;
-
-
-/*
- * Issue an informational IOCTL
- * 
- * The user fills out the opcode and any subtype information.  This
- * routine will allocate a buffer and issue the IOCTL.  If the request
- * fails because the buffer wasn't big enough, this routine will double
- * the buffer size and retry the request repeatedly.  The buffer must
- * be freed by the caller.
- * 
- * Arguments:
- *     req     pointer to an ATM information request IOCTL structure
- *     buf_len length of buffer to be allocated
- *
- * Returns:
- *     -1      error encountered (reason in errno)
- *     int     length of the returned VCC information
- *
- */
-int
-do_info_ioctl(struct atminfreq *req, int buf_len)
-{
-       int     rc, s;
-       caddr_t buf;
-
-       /*
-        * Open a socket for the IOCTL
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               return(-1);
-       }
-
-       /*
-        * Get memory for returned information
-        */
-mem_retry:
-       buf = (caddr_t)UM_ALLOC(buf_len);
-       if (buf == NULL) {
-               errno = ENOMEM;
-               return(-1);
-       }
-
-       /*
-        * Set the buffer address and length in the request
-        */
-       req->air_buf_addr = buf;
-       req->air_buf_len = buf_len;
-
-       /*
-        * Issue the IOCTL
-        */
-       rc = ioctl(s, AIOCINFO, (caddr_t)req);
-       if (rc) {
-               UM_FREE(buf);
-               if (errno == ENOSPC) {
-                       buf_len = buf_len * 2;
-                       goto mem_retry;
-               }
-               return(-1);
-       }
-       (void)close(s);
-       /*
-        * Set a pointer to the returned info in the request
-        * and return its length
-        */
-       req->air_buf_addr = buf;
-       return(req->air_buf_len);
-}
-
-
-/*
- * Get VCC information
- * 
- * Arguments:
- *     intf    pointer to interface name (or null string)
- *     vccp    pointer to a pointer to a struct air_vcc_rsp for the
- *             address of the returned VCC information
- *
- * Returns:
- *     int     length of the retuned VCC information
- *
- */
-int
-get_vcc_info(char *intf, struct air_vcc_rsp **vccp)
-{
-       int     buf_len = sizeof(struct air_vcc_rsp) * 100;
-       struct atminfreq        air;
-
-       /*
-        * Initialize IOCTL request
-        */
-       air.air_opcode = AIOCS_INF_VCC;
-       UM_ZERO(air.air_vcc_intf, sizeof(air.air_vcc_intf));
-       if (intf != NULL && strlen(intf) != 0)
-               strlcpy(air.air_vcc_intf, intf, IFNAMSIZ);
-
-       buf_len = do_info_ioctl(&air, buf_len);
-
-       /*
-        * Return a pointer to the VCC info and its length
-        */
-       *vccp = (struct air_vcc_rsp *) air.air_buf_addr;
-       return(buf_len);
-}
-
-
-/*
- * Get subnet mask
- * 
- * Arguments:
- *     intf    pointer to an interface name
- *     mask    pointer to a struct sockaddr_in to receive the mask
- *
- * Returns:
- *     0       good completion
- *     -1      error
- *
- */
-int
-get_subnet_mask(char *intf, struct sockaddr_in *mask)
-{
-       int                     rc, s;
-       struct ifreq            req;
-       struct sockaddr_in      *ip_mask;
-
-       /*
-        * Check parameters
-        */
-       if (!intf || !mask ||
-                       strlen(intf) == 0 ||
-                       strlen(intf) > IFNAMSIZ-1)
-               return(-1);
-
-       /*
-        * Open a socket for the IOCTL
-        */
-       s = socket(AF_INET, SOCK_DGRAM, 0);
-       if (s < 0)
-               return(-1);
-
-       /*
-        * Set up and issue the IOCTL
-        */
-       UM_ZERO(&req, sizeof(req));
-       strlcpy(req.ifr_name, intf, sizeof(req.ifr_name));
-       rc = ioctl(s, SIOCGIFNETMASK, (caddr_t)&req);
-       (void)close(s);
-       if (rc)
-               return(-1);
-
-       /*
-        * Give the answer back to the caller
-        */
-       ip_mask = (struct sockaddr_in *)&req.ifr_addr;
-       *mask = *ip_mask;
-       mask->sin_family = AF_INET;
-
-       return(0);
-}
-
-
-/*
- * Get an interface's MTU
- * 
- * Arguments:
- *     intf    pointer to an interface name
- *     mtu     pointer to an int to receive the MTU
- *
- * Returns:
- *     >= 0    interface MTU
- *     -1      error
- *
- */
-int
-get_mtu(char *intf)
-{
-       int                     rc, s;
-       struct ifreq            req;
-
-       /*
-        * Check parameters
-        */
-       if (!intf || strlen(intf) == 0 ||
-                       strlen(intf) > IFNAMSIZ-1)
-               return(-1);
-
-       /*
-        * Open a socket for the IOCTL
-        */
-       s = socket(AF_INET, SOCK_DGRAM, 0);
-       if (s < 0)
-               return(-1);
-
-       /*
-        * Set up and issue the IOCTL
-        */
-       UM_ZERO(&req, sizeof(req));
-       strlcpy(req.ifr_name, intf, sizeof(req.ifr_name));
-       rc = ioctl(s, SIOCGIFMTU, (caddr_t)&req);
-       (void)close(s);
-
-       /*
-        * Set the appropriate return value
-        */
-       if (rc)
-               return(-1);
-       else
-       return(req.ifr_mtu);
-}
-
-
-/*
- * Verify netif name
- * 
- * This routine issues an IOCTL to check whether the passed string is
- * a valid network interface name.
- * 
- * Arguments:
- *     req     pointer to an ATM information request IOCTL structure
- *
- * Returns:
- *     -1              error encountered
- *     FALSE (0)       the string is not a NIF name
- *     TRUE (> 0)      the string is a valid NIF name
- *
- */
-int
-verify_nif_name(char *name)
-{
-       int     rc, s;
-       struct atminfreq        air;
-       struct air_netif_rsp    *nif_info;
-
-       /*
-        * Check whether name is of a valid length
-        */
-       if (strlen(name) > IFNAMSIZ - 1 ||
-                       strlen(name) < 1) {
-               return(FALSE);
-       }
-
-       /*
-        * Open a socket for the IOCTL
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               return(-1);
-       }
-
-       /*
-        * Get memory for returned information
-        */
-       nif_info = (struct air_netif_rsp *)UM_ALLOC(
-                       sizeof(struct air_netif_rsp));
-       if (nif_info == NULL) {
-               errno = ENOMEM;
-               return(-1);
-       }
-
-       /*
-        * Set up the request
-        */
-       air.air_opcode = AIOCS_INF_NIF;
-       air.air_buf_addr = (caddr_t)nif_info;
-       air.air_buf_len = sizeof(struct air_netif_rsp);
-       UM_ZERO(air.air_netif_intf, sizeof(air.air_netif_intf));
-       strlcpy(air.air_netif_intf, name, sizeof(air.air_netif_intf));
-
-       /*
-        * Issue the IOCTL
-        */
-       rc = ioctl(s, AIOCINFO, (caddr_t)&air);
-       UM_FREE(nif_info);
-       (void)close(s);
-
-       /*
-        * Base return value on IOCTL return code
-        */
-       if (rc)
-               return(FALSE);
-       else
-               return(TRUE);
-}
-
-/*
- * Get Config information
- *
- * Arguments:
- *      intf    pointer to interface name (or null string)
- *      cfgp    pointer to a pointer to a struct air_cfg_rsp for the
- *              address of the returned Config information
- *
- * Returns:
- *      int     length of returned Config information
- *
- */
-int
-get_cfg_info(char *intf, struct air_cfg_rsp **cfgp)
-{
-        int     buf_len = sizeof(struct air_cfg_rsp) * 4;
-        struct atminfreq air;
-
-        /*
-         * Initialize IOCTL request
-         */
-        air.air_opcode = AIOCS_INF_CFG;
-        UM_ZERO ( air.air_cfg_intf, sizeof(air.air_cfg_intf));
-        if ( intf != NULL && strlen(intf) != 0 )
-                strlcpy ( air.air_cfg_intf, intf, IFNAMSIZ );
-
-        buf_len = do_info_ioctl ( &air, buf_len );
-
-        /*
-         * Return a pointer to the Config info and its length
-         */
-        *cfgp = (struct air_cfg_rsp *) air.air_buf_addr;
-        return ( buf_len );
-
-}
-
-/*
- * Get Physical Interface information
- *
- * Arguments:
- *      intf    pointer to interface name (or null string)
- *      intp    pointer to a pointer to a struct air_cfg_rsp for the
- *              address of the returned Config information
- *
- * Returns:
- *      int     length of returned Config information
- *
- */
-int
-get_intf_info(char *intf, struct air_int_rsp **intp)
-{
-        int     buf_len = sizeof(struct air_int_rsp) * 4;
-        struct atminfreq air;
-
-        /*
-         * Initialize IOCTL request
-         */
-        air.air_opcode = AIOCS_INF_INT;
-        UM_ZERO ( air.air_int_intf, sizeof(air.air_int_intf));
-        if ( intf != NULL && strlen(intf) != 0 )
-                strlcpy ( air.air_int_intf, intf, IFNAMSIZ );
-
-        buf_len = do_info_ioctl ( &air, buf_len );
-        /*
-         * Return a pointer to the Physical Interface info and its length
-         */
-        *intp = (struct air_int_rsp *) air.air_buf_addr;
-        return ( buf_len );
-
-}
-
-
-/*
- * Get Netif information
- *
- * Arguments:
- *      intf    pointer to interface name (or null string)
- *      netp    pointer to a pointer to a struct air_netif_rsp for the
- *              address of the returned Netif information
- *
- * Returns:
- *      int     length of returned Netif information
- *
- */
-int
-get_netif_info(char *intf, struct air_netif_rsp **netp)
-{
-        int     buf_len = sizeof(struct air_netif_rsp) * 10;
-        struct atminfreq air;
-
-        /*
-         * Initialize IOCTL request
-         */
-        air.air_opcode = AIOCS_INF_NIF;
-        UM_ZERO ( air.air_int_intf, sizeof(air.air_int_intf) );
-        if ( intf != NULL && strlen(intf) != 0 )
-                strlcpy ( air.air_int_intf, intf, IFNAMSIZ );
-
-        buf_len = do_info_ioctl ( &air, buf_len );
-
-        /*
-         * Return a pointer to the Netif info and its length
-         */
-        *netp = (struct air_netif_rsp *) air.air_buf_addr;
-        return ( buf_len );
-
-}
diff --git a/lib/libatm/ip_addr.c b/lib/libatm/ip_addr.c
deleted file mode 100644 (file)
index 2400b2c..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/lib/libatm/ip_addr.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $
- *
- */
-
-/*
- * User Space Library Functions
- * ----------------------------
- *
- * IP address utilities
- *
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h>
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include <netdb.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "libatm.h"
-
-/*
- * Get IP address
- *
- * Return an IP address in a socket address structure, given a character
- * string with a domain name or a dotted decimal number.
- * 
- * Arguments:
- *     p       pointer to a host name or IP address
- *
- * Returns:
- *     null                    error was encountered
- *     struct sockaddr_in *    a pointer to a socket address with the
- *                             requested IP address
- *
- */
-struct sockaddr_in *
-get_ip_addr(char *p)
-{
-       struct hostent                  *ip_host;
-       static struct sockaddr_in       sin;
-
-       /*
-        * Get IP address of specified host name
-        */
-       UM_ZERO(&sin, sizeof(sin));
-       sin.sin_family = AF_INET;
-       if (p[0] >= '0' && p[0] <= '9') {
-               /*
-                * IP address is in dotted decimal format
-                */
-               if ((sin.sin_addr.s_addr = inet_addr(p)) == -1) {
-                       return(NULL);
-               }
-       } else {
-               /*
-                * Host name is in domain name system format
-                */
-               ip_host = gethostbyname(p);
-               if (!ip_host ||
-                               ip_host->h_addrtype != AF_INET) {
-                       return(NULL);
-               }
-               sin.sin_addr.s_addr = *(u_long *)ip_host->h_addr_list[0];
-       }
-       return(&sin);
-}
-
-
-/*
- * Format an IP address
- *
- * Return a text-formatted string with an IP address and domain name
- * given a sockaddr_in with an IP address.
- * 
- * Arguments:
- *     p       pointer to sockaddr_in with an IP address
- *
- * Returns:
- *     char *  pointer to a text-formatted string
- *
- */
-char *
-format_ip_addr(struct in_addr *addr)
-{
-       static char     host_name[MAXHOSTNAMELEN + 18];
-       char            *ip_num;
-       struct hostent  *ip_host;
-
-       /*
-        * Initialize
-        */
-       UM_ZERO(host_name, sizeof(host_name));
-
-       /*
-        * Check for a zero address
-        */
-       if (!addr || addr->s_addr == 0) {
-               return("-");
-       }
-
-       /*
-        * Get address in dotted decimal format
-        */
-       ip_num = inet_ntoa(*addr);
-
-       /*
-        * Look up name in DNS
-        */
-       ip_host = gethostbyaddr(addr, sizeof(*addr), AF_INET);
-       if (ip_host && ip_host->h_name &&
-                       strlen(ip_host->h_name)) {
-               /*
-                * Return host name followed by dotted decimal address
-                */
-               snprintf(host_name, sizeof(host_name), "%s (%s)",
-                       ip_host->h_name, ip_num);
-               return (host_name);
-       } else {
-               /*
-                * No host name -- just return dotted decimal address
-                */
-               return(ip_num);
-       }
-}
diff --git a/lib/libatm/ip_checksum.c b/lib/libatm/ip_checksum.c
deleted file mode 100644 (file)
index dd13a8f..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/lib/libatm/ip_checksum.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $
- *
- */
-
-/*
- * User Space Library Functions
- * ----------------------------
- *
- * IP checksum computation
- *
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h>
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include "libatm.h"
-
-/*
- * Compute an IP checksum
- *
- * This code was taken from RFC 1071.
- *
- * "The following "C" code algorithm computes the checksum with an inner
- * loop that sums 16 bits at a time in a 32-bit accumulator."
- *
- * Arguments:
- *     addr    pointer to the buffer whose checksum is to be computed
- *     count   number of bytes to include in the checksum
- *
- * Returns:
- *     the computed checksum
- *
- */
-short
-ip_checksum(char *addr, int count)
-{
-       /* Compute Internet Checksum for "count" bytes
-        * beginning at location "addr".
-        */
-       long sum = 0;
-
-       while( count > 1 ) {
-               /* This is the inner loop */
-               sum += ntohs(* (unsigned short *) addr);
-               addr += sizeof(unsigned short);
-               count -= sizeof(unsigned short);
-       }
-
-       /* Add left-over byte, if any */
-       if( count > 0 )
-               sum += * (unsigned char *) addr;
-
-       /* Fold 32-bit sum to 16 bits */
-       while (sum>>16)
-               sum = (sum & 0xffff) + (sum >> 16);
-
-       return((short)~sum);
-}
diff --git a/lib/libatm/libatm.h b/lib/libatm/libatm.h
deleted file mode 100644 (file)
index d889786..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/lib/libatm/libatm.h,v 1.3 1999/08/27 23:58:05 peter Exp $
- *     @(#) $DragonFly: src/lib/libatm/libatm.h,v 1.3 2003/11/12 20:21:22 eirikn Exp $
- *
- */
-
-/*
- * User Space Library Functions
- * ----------------------------
- *
- * Library functions
- *
- */
-
-#ifndef _HARP_LIBHARP_H
-#define _HARP_LIBHARP_H
-
-/*
- * Start a HARP user-space timer
- *
- *     tp      pointer to timer control block
- *     time    number of seconds for timer to run
- *     fp      pointer to function to call at expiration
- */
-#define HARP_TIMER(tp, time, fp)                               \
-{                                                              \
-       (tp)->ht_ticks = (time);                                \
-       (tp)->ht_mark = 0;                                      \
-       (tp)->ht_func = (fp);                                   \
-       LINK2HEAD((tp), Harp_timer, harp_timer_head, ht_next);  \
-}
-
-/*
- * Cancel a HARP user-space timer
- *
- *     tp      pointer to timer control block
- */
-#define HARP_CANCEL(tp)                                                \
-{                                                              \
-       UNLINK((tp), Harp_timer, harp_timer_head, ht_next);     \
-}
-
-
-/*
- * HARP user-space timer control block
- */
-struct harp_timer {
-       struct harp_timer       *ht_next;       /* Timer chain */
-       int                     ht_ticks;       /* Seconds till exp */
-       int                     ht_mark;        /* Processing flag */
-       void                    (*ht_func)();   /* Function to call */
-};
-typedef struct harp_timer      Harp_timer;
-
-
-/*
- * Externally-visible variables and functions
- */
-
-/* atm_addr.c */
-extern int             get_hex_atm_addr (char *, u_char *, int);
-extern char            *format_atm_addr (Atm_addr *);
-
-/* cache_key.c */
-extern void            scsp_cache_key (Atm_addr *,
-                               struct in_addr  *, int, char *);
-
-/* ioctl_subr.c */
-extern int             do_info_ioctl (struct atminfreq *, int);
-extern int             get_vcc_info (char *,
-                               struct air_vcc_rsp **);
-extern int             get_subnet_mask (char *,
-                               struct sockaddr_in *);
-extern int             get_mtu (char *);
-extern int             verify_nif_name (char *);
-extern int             get_cfg_info (char *, struct air_cfg_rsp **);
-extern int             get_intf_info (char *, struct air_int_rsp **);
-extern int             get_netif_info (char *, struct air_netif_rsp **);
-
-/* ip_addr.c */
-extern struct sockaddr_in      *get_ip_addr (char *);
-extern char            *format_ip_addr (struct in_addr *);
-
-/* ip_checksum.c */
-extern short           ip_checksum (char *, int);
-
-/* timer.c */
-extern Harp_timer      *harp_timer_head;
-extern int             harp_timer_exec;
-extern void            timer_proc ();
-extern int             init_timer ();
-extern int             block_timer ();
-extern void            enable_timer (int);
-
-
-#endif /* _HARP_LIBHARP_H */
diff --git a/lib/libatm/timer.c b/lib/libatm/timer.c
deleted file mode 100644 (file)
index ab7d7b2..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/lib/libatm/timer.c,v 1.3.2.1 2001/09/28 16:52:10 dillon Exp $
- *
- */
-
-/*
- * User Space Library Functions
- * ----------------------------
- *
- * Timer functions
- *
- */
-
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/queue.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h>
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include <errno.h>
-#include <signal.h>
-
-#include "libatm.h"
-
-Harp_timer     *harp_timer_head;
-int            harp_timer_exec;
-
-
-/*
- * Process a HARP timer tick
- *
- * This function is called via the SIGALRM signal.  It increments
- * harp_timer_exec.  The user should check this flag frequently and
- * call timer_proc when it is set.
- *
- * Arguments:
- *     None
- *
- * Returns:
- *     None
- *
- */
-static void
-timer_tick(int signo __unused)
-{
-       /*
-        * Bump the timer flag
-        */
-       harp_timer_exec++;
-}
-
-
-/*
- * Process HARP timers
- *
- * This function is called after a SIGALRM signal is posted.  It runs
- * down the list of timer entries, calling the specified functions
- * for any timers that have expired.
- *
- * Arguments:
- *     None
- *
- * Returns:
- *     None
- *
- */
-void
-timer_proc(void)
-{
-       Harp_timer      *htp;
-       void            (*f)();
-
-       /*
-        * Reset marks in all timers on the queue
-        */
-       for (htp = harp_timer_head; htp; htp = htp->ht_next) {
-               htp->ht_mark = -1;
-       }
-
-       /*
-        * Run through timer chain decrementing each timer.
-        * If an expired timer is found, take the timer block
-        * off the chain and call the specified function.  A
-        * timer's action can result in other timers being
-        * cancelled (taken off the queue), so every time we
-        * call a user function, we start over from the top of
-        * the list.
-        */
-timer_cont:
-       for (htp = harp_timer_head; htp; htp = htp->ht_next) {
-               /*
-                * Make sure we only process each entry once and
-                * don't process entries that are put on the queue
-                * by user functions we call for this tick
-                */
-               if (htp->ht_mark == -1) {
-                       /*
-                        * Decrement the timer and mark that we've
-                        * processed the entry
-                        */
-                       htp->ht_ticks -= harp_timer_exec;
-                       htp->ht_mark = 1;
-
-                       /*
-                        * Check whether the timer is expired
-                        */
-                       if (htp->ht_ticks <= 0) {
-                               /*
-                                * Unlink the timer block and call
-                                * the user function
-                                */
-                               f = htp->ht_func;
-                               UNLINK(htp, Harp_timer, harp_timer_head,
-                                               ht_next);
-                               f(htp);
-
-                               /*
-                                * Start over
-                                */
-                               goto timer_cont;
-                       }
-               }
-       }
-
-       /*
-        * Reset the timer exec flag
-        */
-       harp_timer_exec = 0;
-}
-
-
-/*
- * Start the timer
- *
- * Set up the SIGALRM signal handler and set up the real-time
- * timer to tick once per second.
- *
- * Arguments:
- *     None
- *
- * Returns:
- *     0       success
- *     errno   reason for failure
- *
- */
-int
-init_timer(void)
-{
-       int                     rc = 0;
-       struct itimerval        timeval;
-
-       /*
-        * Clear the timer flag
-        */
-       harp_timer_exec = 0;
-
-       /*
-        * Set up signal handler
-        */
-       if (signal(SIGALRM, timer_tick) == SIG_ERR) {
-               return(errno);
-       }
-
-       /*
-        * Start timer
-        */
-       timeval.it_value.tv_sec = 1;
-       timeval.it_value.tv_usec = 0;
-       timeval.it_interval.tv_sec = 1;
-       timeval.it_interval.tv_usec = 0;
-
-       if (setitimer(ITIMER_REAL, &timeval,
-                       NULL) == -1) {
-               rc = errno;
-               (void)signal(SIGALRM, SIG_DFL);
-       }
-
-       return(rc);
-}
-
-
-/*
- * Block timers from firing
- *
- * Block the SIGALRM signal.
- *
- * Arguments:
- *     None
- *
- * Returns:
- *     mask    the previous blocked signal mask
- *
- */
-int
-block_timer(void)
-{
-       /*
-        * Block the SIGALRM signal
-        */
-       return(sigblock(sigmask(SIGALRM)));
-}
-
-
-/*
- * Re-enable timers
- *
- * Restore the signal mask (presumably one that was returned by
- * block_timer).
- *
- * Arguments:
- *     mask    the signal mask to be restored
- *
- * Returns:
- *     mask    the previous blocked signal mask
- *
- */
-void
-enable_timer(int mask)
-{
-       /*
-        * Set the signal mask
-        */
-       sigsetmask(mask);
-
-       return;
-}
index b57e18c..2aa0602 100644 (file)
@@ -36,7 +36,6 @@
  * Author: Archie Cobbs <archie@whistle.com>
  *
  * $FreeBSD: src/lib/libnetgraph/debug.c,v 1.9 2005/10/25 20:58:30 ru Exp $
- * $DragonFly: src/lib/libnetgraph/debug.c,v 1.4 2007/06/17 20:33:14 swildner Exp $
  * $Whistle: debug.c,v 1.24 1999/01/24 01:15:33 archie Exp $
  */
 
@@ -58,7 +57,6 @@
 
 #include <netgraph7/UI/ng_UI.h>
 #include <netgraph7/async/ng_async.h>
-#include <netgraph7/atmllc/ng_atmllc.h>
 #include <netgraph7/bpf/ng_bpf.h>
 #include <netgraph/bridge/ng_bridge.h>
 #include <netgraph7/cisco/ng_cisco.h>
@@ -128,7 +126,6 @@ struct ng_cookie {
 static const struct ng_cookie cookies[] = {
        COOKIE(UI),
        COOKIE(ASYNC),
-       COOKIE(ATMLLC),
        COOKIE(BPF),
        COOKIE(BRIDGE),
        COOKIE(CISCO),
index e1656c4..655b4fa 100644 (file)
@@ -4,7 +4,6 @@
 # XXX MISSING:         icheck ncheck
 
 SUBDIR=        adjkerntz \
-       atm \
        badsect \
        camcontrol \
        ccdconfig \
diff --git a/sbin/atm/Makefile b/sbin/atm/Makefile
deleted file mode 100644 (file)
index a6b82ca..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-#
-# ===================================
-# HARP  |  Host ATM Research Platform
-# ===================================
-#
-#
-# This Host ATM Research Platform ("HARP") file (the "Software") is
-# made available by Network Computing Services, Inc. ("NetworkCS")
-# "AS IS".  NetworkCS does not provide maintenance, improvements or
-# support of any kind.
-#
-# NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
-# INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
-# SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
-# In no event shall NetworkCS be responsible for any damages, including
-# but not limited to consequential damages, arising from or relating to
-# any use of the Software or related support.
-#
-# Copyright 1994-1998 Network Computing Services, Inc.
-#
-# Copies of this Software may be made, however, the above copyright
-# notice must be reproduced on all copies.
-#
-#      @(#) $FreeBSD: src/sbin/atm/Makefile,v 1.2 1999/08/28 00:12:15 peter Exp $
-#      @(#) $DragonFly: src/sbin/atm/Makefile,v 1.2 2003/06/17 04:27:32 dillon Exp $
-#
-
-SUBDIR=        atm \
-       fore_dnld \
-       ilmid
-
-.include <bsd.subdir.mk>
diff --git a/sbin/atm/Makefile.inc b/sbin/atm/Makefile.inc
deleted file mode 100644 (file)
index 1135db9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-#
-# ===================================
-# HARP  |  Host ATM Research Platform
-# ===================================
-#
-#
-# This Host ATM Research Platform ("HARP") file (the "Software") is
-# made available by Network Computing Services, Inc. ("NetworkCS")
-# "AS IS".  NetworkCS does not provide maintenance, improvements or
-# support of any kind.
-#
-# NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
-# INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
-# SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
-# In no event shall NetworkCS be responsible for any damages, including
-# but not limited to consequential damages, arising from or relating to
-# any use of the Software or related support.
-#
-# Copyright 1994-1998 Network Computing Services, Inc.
-#
-# Copies of this Software may be made, however, the above copyright
-# notice must be reproduced on all copies.
-#
-#      @(#) $FreeBSD: src/sbin/atm/Makefile.inc,v 1.2.2.1 2002/07/17 14:19:29 ru Exp $
-#      @(#) $DragonFly: src/sbin/atm/Makefile.inc,v 1.2 2003/06/17 04:27:32 dillon Exp $
-#
-#
-
-.include "../Makefile.inc"
diff --git a/sbin/atm/atm/Makefile b/sbin/atm/atm/Makefile
deleted file mode 100644 (file)
index 00605f0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-#
-# ===================================
-# HARP  |  Host ATM Research Platform
-# ===================================
-#
-#
-# This Host ATM Research Platform ("HARP") file (the "Software") is
-# made available by Network Computing Services, Inc. ("NetworkCS")
-# "AS IS".  NetworkCS does not provide maintenance, improvements or
-# support of any kind.
-#
-# NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
-# INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
-# SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
-# In no event shall NetworkCS be responsible for any damages, including
-# but not limited to consequential damages, arising from or relating to
-# any use of the Software or related support.
-#
-# Copyright 1994-1998 Network Computing Services, Inc.
-#
-# Copies of this Software may be made, however, the above copyright
-# notice must be reproduced on all copies.
-#
-#      @(#) $FreeBSD: src/sbin/atm/atm/Makefile,v 1.4.2.1 2001/04/25 10:58:10 ru Exp $
-#      @(#) $DragonFly: src/sbin/atm/atm/Makefile,v 1.2 2003/06/17 04:27:32 dillon Exp $
-#
-#
-
-PROG=  atm
-SRCS=  atm.c atm_fore200.c atm_eni.c atm_inet.c atm_print.c \
-       atm_set.c atm_show.c atm_subr.c
-MAN=   atm.8
-
-CFLAGS+=       -I${.CURDIR}/../../../sys
-LDADD+=                -latm
-DPADD+=                 ${LIBATM}
-
-.include <bsd.prog.mk>
diff --git a/sbin/atm/atm/atm.8 b/sbin/atm/atm/atm.8
deleted file mode 100644 (file)
index aef11b4..0000000
+++ /dev/null
@@ -1,988 +0,0 @@
-.\"
-.\" ===================================
-.\" HARP  |  Host ATM Research Platform
-.\" ===================================
-.\"
-.\"
-.\" This Host ATM Research Platform ("HARP") file (the "Software") is
-.\" made available by Network Computing Services, Inc. ("NetworkCS")
-.\" "AS IS".  NetworkCS does not provide maintenance, improvements or
-.\" support of any kind.
-.\"
-.\" NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
-.\" INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
-.\" AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
-.\" SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
-.\" In no event shall NetworkCS be responsible for any damages, including
-.\" but not limited to consequential damages, arising from or relating to
-.\" any use of the Software or related support.
-.\"
-.\" Copyright 1994-1998 Network Computing Services, Inc.
-.\"
-.\" Copies of this Software may be made, however, the above copyright
-.\" notice must be reproduced on all copies.
-.\"
-.\" @(#) $FreeBSD: src/sbin/atm/atm/atm.8,v 1.3.2.2 2002/12/29 16:35:37 schweikh Exp $
-.\" @(#) $DragonFly: src/sbin/atm/atm/atm.8,v 1.2 2003/06/17 04:27:32 dillon Exp $
-.\"
-.\"
-.de EX         \"Begin example
-.ne 5
-.if n .sp 1
-.if t .sp .5
-.nf
-.in +.5i
-..
-.de EE
-.fi
-.in -.5i
-.if n .sp 1
-.if t .sp .5
-..
-.TH ATM 8 "1998-08-20" "HARP"
-.SH NAME
-atm \- user configuration and display command for HARP ATM interface
-.SH SYNOPSIS
-Interface management subcommands:
-.in +10
-.ti -5
-.B atm attach
-<interface> <sigmgr>
-.ti -5
-.B atm detach
-<interface>
-.ti -5
-.B atm set MAC
-<interface> <MAC/ESI address>
-.ti -5
-.B atm set netif
-<interface> <prefix> <count>
-.ti -5
-.B atm set prefix
-<interface> <NSAP prefix>
-.ti -5
-.B atm show config
-[<interface>]
-.ti -5
-.B atm show interface
-[<interface>]
-.ti -5
-.B atm show netif
-[<netif>]
-.ti -5
-.B atm show stats interface
-[<interface> [phy | dev | atm | aal0 | aal4 | aal5 | driver]]
-.sp
-.ti -10
-VCC management subcommands:
-.ti -5
-.B atm add PVC
-<interface> <vpi> <vci> <aal> <encaps> <owner> ...
-.ti -5
-.B atm delete PVC
-<interface> <vpi> <vci>
-.ti -5
-.B atm delete SVC
-<interface> <vpi> <vci>
-.ti -5
-.B atm show stats VCC
-[<interface> [<vpi> [<vci>]]]
-.ti -5
-.B atm show VCC
-[<interface> [<vpi> [<vci>] | SVC | PVC]]
-.sp
-.ti -10
-IP management subcommands:
-.ti -5
-.B atm add ARP
-[<netif>] <host> <ATM address>
-.ti -5
-.B atm add PVC
-<interface> <vpi> <vci> <aal> <encaps> IP <netif> <host> | dynamic
-.ti -5
-.B atm delete ARP
-[<netif>] <host>
-.ti -5
-.B atm set arpserver
-<netif> <ATM address> | local [<IP prefix> ...]
-.ti -5
-.B atm show ARP
-[<host>]
-.ti -5
-.B atm show arpserver
-[<netif>]
-.ti -5
-.B atm show IPVCC
-[<host> | <netif>]
-.ti -5
-.sp
-.ti -10
-Miscellaneous subcommands:
-.ti -5
-.B atm help
-.ti -5
-.B atm show version
-.in -10
-.fi
-.SH DESCRIPTION
-.I atm
-configures and displays the status of the Host ATM Research Platform
-(HARP) networking software.
-The subcommands fall into several categories:
-.PP
-\fIInterface management\fP subcommands allow manipulation of the
-ATM interface.
-Functions include assigning a signalling manager to an interface,
-setting the ATM address, associating network interfaces with
-an interface, and displaying information about interfaces.
-.PP
-\fIVCC management\fP subcommands allow for managing ATM virtual
-channel connections (VCCs).
-Functions include opening and closing VCCs and displaying information
-about them.
-.PP
-\fIIP management\fP subcommands allow for managing the interface
-between IP and the ATM software.
-Functions include displaying and manipulating the ATMARP cache,
-opening a PVC connected to IP,
-assigning an ATMARP server to a network interface,
-and displaying information about IP VCCs.
-.PP
-\fIMiscellaneous\fP subcommands allow for displaying the version
-of the ATM software and for getting help with the \fIatm\fP command.
-.SS "Signalling Managers"
-The signalling manager is responsible for the opening and closing of
-VCCs.
-Four signalling managers are supported:
-.PP
-.in +10
-.ti -5
-PVC - for PVCs only,
-.ti -5
-SPANS - supports SPANS, FORE's proprietary signalling protocol,
-.ti -5
-UNI 3.0 - supports the signalling protocol from The ATM Forum's
-\fIATM User-Network Interface Specification, Version 3.0\fP.
-.ti -5
-UNI 3.1 - supports the signalling protocol from The ATM Forum's
-\fIATM User-Network Interface Specification, Version 3.1\fP.
-.in -10
-.PP
-All four signalling managers support the opening and closing of PVCs
-(see the \fIadd\fP and \fIdelete\fP subcommands).
-.PP
-A signalling manager must be attached to a physical interface
-(see the \fIattach\fP subcommand)
-before any VCCs can be created on the interface.
-.SS "Physical and Network Interfaces"
-Two types of interfaces are supported:
-physical interfaces and network interfaces.
-A physical interface represents a physical point of attachment to an
-ATM network.
-A physical interface has an ATM address associated with it, except
-when the PVC-only signalling manager is being used.
-.PP
-A network interface is a logical interface.
-One or more network interfaces are associated with a physical
-interface;  each network interface has an IP address associated with it.
-For UNI-controlled interfaces, there can be up to 256 network
-interfaces associated with a physical interface.
-In this case, the correspondence between the network interface and
-the ATM address is determined by the selector field (the last
-byte) of the physical interface's ATM address.
-For PVC-only interfaces, there can be up to 256 logical interfaces
-associated with each physical interface.
-For interfaces controlled by the SPANS signalling manager,
-there must be one and
-only one network interface associated with each physical interface.
-.SS "Keyword and Documentation Conventions"
-Command and subcommand keywords can be abbreviated by simply giving
-enough of the first part of the keyword to make it unique.
-Thus, \fIatm sh v\fB gives the same result as \fIatm show vcc\fB.
-.PP
-All keywords are case-insensitive.
-.PP
-Where a host address needs to be given to the \fIatm\fP command,
-either a DNS name or an IP address in dotted decimal format can
-be used.
-.PP
-ATM addresses are specified as strings of hex digits, with an
-optional leading "0x".
-Fields within the address may be separated by periods, but periods
-are for readability only and are ignored.
-SPANS addresses are 8 bytes long, while NSAP-format addresses
-are 20 bytes long.
-The full address, including any leading zeroes, must be given.
-For example:
-.in +5
-0x47.0005.80.ffe100.0000.f21a.0170.0020481a0170.00 (NSAP format)
-.br
-0x00000010.f2050aa9 (SPANS format)
-.in -5
-.fi
-.SH SUBCOMMANDS
-.SS Interface Management Subcommands:
-.in +5
-.ti -5
-\fIatm add PVC <interface> <vpi> <vci> <aal> <encaps> <owner> ...\fP
-.in -5
-.PP
-the format of the \fIadd PVC\fP subcommand varies depending on the
-owner of the PVC.
-See the description under "IP Management Subcommands."
-.PP
-\fIatm attach <interface> <sigmgr>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<interface>\fP specifies the physical interface to which the
-signalling manager is to be attached,
-.ti -5
-\fI<sigmgr>\fP specifies which signalling manager is to be attached.
-Valid choices are "SIGPVC", "SPANS", "UNI30", and "UNI31".
-.in -10
-.PP
-This command attaches a signalling manager to an interface.
-Until this is done, VCCs cannot be opened or closed.
-Only one signalling manager at a time can be attached to an interface.
-.PP
-\fIatm detach <interface>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<interface>\fP specifies the physical interface whose signalling
-manager is to be detached.
-.in -10
-.PP
-This command detaches a signalling manager from an interface.
-All VCCs that the signalling manager has created will be closed,
-and no new VCCs can be created until a signalling manager (either
-the same or a different one) is attached again.
-.PP
-\fIatm set MAC <interface> <MAC/ESI address>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<interface>\fP specifies the physical interface whose
-MAC address is to be set,
-.ti -5
-\fI<MAC/ESI address>\fP specifies the 6-byte MAC part of the NSAP
-address for the interface.
-The MAC address is specified as a string of 12 hexadecimal
-digits with an optional leading "0x".
-Fields in the address may be separated by periods.
-.in -10
-.PP
-This command sets the MAC address for a UNI-controlled interface.
-The first 13 bytes (the prefix) of the 20-byte NSAP-format address
-are set by the \fIatm set prefix\fP command or the ILMI daemon
-(\fIilmid\fP (8)),
-the next 6 bytes (the End System Identifier (ESI)) are set by
-this command,
-and the last byte (the selector) will be determined by which
-network interface is to be associated with the address.
-.PP
-The \fIatm set MAC\fP command can be used to override the MAC
-address in the interface hardware.
-.PP
-\fIatm set netif <interface> <prefix> <count>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<interface>\fP specifies the physical interface that the network
-interface(s) are to be associated with,
-.ti -5
-\fI<prefix>\fP specifies the invariant part of the network
-interface name,
-.ti -5
-\fI<count>\fP specifies the number of network interface to be
-created.
-.in -10
-.PP
-This command creates one or more network interfaces and associates them
-with the specified physical interface.
-The network interface names are determined by the prefix and the count.
-The names will be of the form <prefix><nn>, where <prefix> is the
-prefix specified in the \fIset\fP subcommand and <nn> is a number
-in the range 0 - <count>-1.  For example, the command:
-.PP
-.ti +5
-atm set netif hfa0 ni 2
-.PP
-would create two network interfaces, named ni0 and ni1, and associate
-them with physical interface hfa0.
-.PP
-\fIatm set prefix <interface> <NSAP prefix>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<interface>\fP specifies the physical interface whose NSAP
-prefix is to be set,
-.ti -5
-\fI<NSAP prefix>\fP specifies the first 13 bytes of the NSAP address
-for the interface.
-The prefix is specified as a string of hexadecimal digits with an
-optional leading "0x".
-Fields in the prefix may be separated by periods.
-.in -10
-.PP
-This command sets the address for a UNI-controlled interface.
-The first 13 bytes (the prefix) of the 20-byte NSAP-format address
-are set by this command,
-the next 6 bytes (the End System Identifier (ESI)) will be the
-MAC address taken from the physical interface or set by the
-\fIset MAC\fP subcommand,
-and the last byte (the selector) will be determined by which
-network interface is to be associated with the address.
-.PP
-The NSAP prefix must be set before a UNI-controlled
-interface can become active.
-This can be accomplished either by the ILMI daemon (\fIilmid\fP (8))
-or the \fIset prefix\fP subcommand.
-.PP
-.I atm show config [<interface>]
-.PP
-displays the following information:
-.PP
-.B Interface
-\- the name of the physical interface.
-.PP
-.B Vendor
-\- the name of the adapter vendor.
-.PP
-.B Model
-\- the model of the adapter.
-.PP
-.B Media
-\- the communications medium used by the adapter.
-.PP
-.B Bus
-\- the type of bus the adapter is attached to.
-.PP
-.B Serial No.
-\- the adapter's serial number.
-.PP
-.B MAC address
-\- the MAC address of the interface.
-Note that this is the MAC address encoded in the hardware of
-the adapter, even if the \fIatm set MAC\fP command has been used
-to change the effective MAC address of the interface.
-.PP
-.B Hardware version
-\- the hardware revision level reported by the interface.
-.PP
-.B Firmware version
-\- the firmware revision level reported by the interface.
-.PP
-If no parameters are specified on the \fIshow config\fP subcommand,
-the configurations of all physical interfaces will be displayed.
-If an interface name is specified, only the configuration of the given
-interface is displayed.
-.PP
-.I atm show interface [<interface>]
-.PP
-displays the following information:
-.PP
-.B Interface
-\- the name of the physical interface.
-.PP
-.B Sigmgr
-\- the name of the signalling manager which has been attached to the
-interface.
-A dash (-) is shown if no signalling manager has been attached.
-.PP
-.B State
-\- the state of the signalling manager for the interface.
-Each signalling manager has its own set of states.
-They are:
-.in +21
-.ti -16
-PVC:
-.ti -11
-ACTIVE\ ---\ The signalling manager is active.
-.ti -11
-DETACH\ ---\ The signalling manager is being detached.
-.ti -16
-SPANS:
-.ti -11
-ACTIVE\ ---\ The signalling manager is active.
-.ti -11
-DETACH\ ---\ The signalling manager is being detached.
-.ti -11
-INIT\ -----\ The signalling manager's initial state.
-.ti -11
-PROBE\ ----\ The signalling manager is attempting to make
-contact with the ATM switch.
-.ti -16
-UNI 3.0 or UNI 3.1:
-.ti -11
-NULL\ -----\ The signalling manager's initial state.
-.ti -11
-ADR_WAIT\ -\ The signalling manager is waiting for the NSAP
-prefix to be set.
-.ti -11
-INIT\ -----\ The signalling manager is attempting to establish
-contact with the switch.
-.ti -11
-ACTIVE\ ---\ The signalling manager is active.
-.ti -11
-DETACH\ ---\ The signalling manager is being detached.
-.ti -21
-.PP
-.B ATM address
-\- the ATM address of the interface.
-.PP
-.B Network interfaces
-\- the names of network interfaces, if any, associated with the
-physical interface.
-.PP
-If no parameters are specified on the \fIshow interface\fP subcommand,
-information about all physical interfaces will be displayed.
-If an interface name is specified, only information about the given
-interface is displayed.
-.PP
-.I atm show netif [<netif>]
-.PP
-displays the following information:
-.PP
-.B Net Intf
-\- the name of the network interface.
-.PP
-.B IP Address
-\- the IP address of the network interface.
-.PP
-If no parameters are specified on the \fIshow netif\fP subcommand,
-information about all network interfaces will be displayed.
-If an interface name is specified, only information about the given
-network interface is displayed.
-.PP
-\fIatm show stats interface [<interface> [phy | dev | atm | aal0 |
-aal4 | aal5 | driver]]\fP
-.PP
-displays statistics associated with one or more interfaces.
-Subject-area keywords
-(\fIphy\fP, \fIdev\fP, \fIatm\fP, \fIaal0\fP,
-\fIaal4\fP, \fIaal5\fP, or \fIdriver\fP)
-can be specified to change the scope of the statistics displayed.
-.PP
-If no subject area keyword is specified, the following information is
-displayed:
-.PP
-.B Interface
-\- the name of the physical ATM interface.
-.PP
-.B Input PDUs
-\- the number of Protocol Data Units (PDUs) which have been received
-by the interface.
-.PP
-.B Input Bytes
-\- the number of bytes which have been received by the interface.
-.PP
-.B Input Errs
-\- the number of input errors which the interface has experienced.
-.PP
-.B Output PDUs
-\- the number of Protocol Data Units (PDUs) which have been transmitted
-by the interface.
-.PP
-.B Output Bytes
-\- the number of bytes which have been transmitted by the interface.
-.PP
-.B Output Errs
-\- the number of output errors which the interface has experienced.
-.PP
-.B Cmd Errs
-\- the number of command errors which the interface has experienced.
-.PP
-If a subject-area keyword is specified, then statistics for
-that subject are displayed.
-The statistics displayed depend on the adapter.
-If requested statistics are not available for an adaptor,
-an error will be noted.
-.PP
-If no parameters are specified on the \fIshow stats interface\fP
-subcommand, statistics for all ATM interfaces are displayed.
-If an interface name is specified, only statistics for the given
-interface are displayed.
-.PP
-.SS VCC Management Subcommands:
-.PP
-\fIatm delete PVC <interface> <vpi> <vci>\fP
-.br
-\fIatm delete SVC <interface> <vpi> <vci>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fIPVC\fP specifies that the VCC to be closed is a PVC,
-.ti -5
-\fISVC\fP specifies that the VCC to be closed is an SVC,
-.ti -5
-\fI<interface>\fP specifies the physical interface at which the
-VCC to be closed terminates,
-.ti -5
-\fI<vpi>\fP specifies the Virtual Path Identifier (VPI) of the VCC,
-.ti -5
-\fI<vci>\fP specifies the Virtual Channel Identifier (VCI) of the VCC.
-.in -10
-.PP
-This command closes a VCC.
-The two forms differ only in that the first specifies that the
-VCC is a PVC (that was created by the \fIadd PVC\fP subcommand) and
-the second specifies that the VCC is an SVC.
-Reserved VCCs (with VCI values less than 32) cannot be closed
-with this command.
-.PP
-\fIatm show stats VCC [<interface> [<vpi> [<vci>]]]\fP
-.PP
-displays the following information:
-.PP
-.B Interface
-\- the physical interface on which the VCC terminates.
-.PP
-.B VPI
-\- the Virtual Path Identifier (VPI) for the VCC.
-.PP
-.B VCI
-\- the Virtual Channel Identifier (VCI) for the VCC.
-.PP
-.B Input PDUs
-\- the number of Protocol Data Units (PDUs) which have been received
-on the VCC.
-.PP
-.B Input Bytes
-\- the number of bytes which have been received on the VCC.
-.PP
-.B Input Errs
-\- the number of input errors which the VCC has experienced.
-.PP
-.B Output PDUs
-\- the number of Protocol Data Units (PDUs) which have been transmitted
-on the VCC.
-.PP
-.B Output Bytes
-\- the number of bytes which have been transmitted on the VCC.
-.PP
-.B Output Errs
-\- the number of output errors which the VCC has experienced.
-.PP
-If no parameters are specified on the \fIshow VCC\fP subcommand, all
-active VCCs are displayed.
-If an interface name is specified, all active VCCs for the given
-interface are displayed.
-If an interface and VPI are specified, all active VCCs for the VPI
-on the given interface are displayed.
-If an interface, VPI, and VCI are specified, only the specified VCC on
-the given interface is displayed (note that this could actually be
-two VCCs, since SPANS considers SVCs to be unidirectional).
-.PP
-\fIatm show VCC [<interface> [<vpi> [<vci>] | SVC | PVC]]\fP
-.PP
-displays the following information:
-.PP
-.B Interface
-\- the physical interface on which the VCC terminates.
-.PP
-.B VPI
-\- the Virtual Path Identifier (VPI) for the VCC.
-.PP
-.B VCI
-\- the Virtual Channel Identifier (VCI) for the VCC.
-.PP
-.B AAL
-\- the ATM Adaptation Layer (AAL) in use on the VCC.
-Possible values are null and AAL 1-5.
-.PP
-.B Type
-\- specifies whether the VCC is an SVC or a PVC.
-.PP
-.B Dir
-\- the direction of information flow on the VCC.
-VCCs can be inbound, outbound, or both.
-.PP
-.B State
-\- the state of the VCC, as reported by the signalling manager.
-Each signalling manager has its own set of states.
-They are:
-.in +21
-.ti -16
-PVC:
-.ti -11
-NULL\ -----\ No state.
-.ti -11
-ACTIVE\ ---\ The VCC is active.
-.ti -11
-FREE\ -----\ The VCC is closed and the signalling manager is waiting for
-its resources to be freed.
-.ti -16
-SPANS:
-.ti -11
-NULL\ -----\ No state.
-.ti -11
-ACTIVE\ ---\ The VCC is a PVC and is active.
-.ti -11
-ACT_DOWN\ -\ The VCC is a PVC and the interface is down.
-.ti -11
-POPEN\ ----\ The VCC is being opened.
-.ti -11
-R_POPEN\ --\ The VCC is being opened by a remote host.
-.ti -11
-OPEN\ -----\ The VCC is active.
-.ti -11
-CLOSE\ ----\ The VCC is being closed.
-.ti -11
-ABORT\ ----\ The VCC is being aborted.
-.ti -11
-FREE\ -----\ The VCC is closed and the signalling manager is waiting for
-its resources to be freed.
-.ti -16
-UNI 3.0 or UNI 3.1:
-.ti -11
-NULL\ -----\ No state.
-.ti -11
-C_INIT\ ---\ A VCC is being initiated.
-.ti -11
-C_OUT_PR\ -\ An outgoing VCC request is proceeding.
-.ti -11
-C_PRES\ ---\ A VCC is being initiated by the network.
-.ti -11
-CONN_REQ\ -\ A VCC request has been accepted by a HARP user.
-.ti -11
-C_IN_PR\ --\ An incoming VCC request is proceeding.
-.ti -11
-ACTIVE\ ---\ The VCC is active.
-.ti -11
-REL_REQ\ --\ The VCC is being closed.
-.ti -11
-REL_IND\ --\ The network is clearing a VCC.
-.ti -11
-SSCF_REC\ -\ The SSCF session on the signalling channel is in
-recovery from an error.
-.ti -11
-FREE\ -----\ The VCC is closed and the signalling manager is waiting
-for its resources to be freed.
-.ti -11
-ACT_DOWN\ -\ The VCC is a PVC and the interface is down.
-.ti -21
-.PP
-.B Encaps
-\- the encapsulation in effect on the VCC.
-Possible encapsulations are null and LLC/SNAP.
-.PP
-.B Owner
-\- the owner or owners of the VCC.
-Shows the name(s) of the function(s) using the VCC.
-.PP
-.B Destination
-\- the ATM address of the host at the remote end of the VCC.
-.PP
-If no parameters are specified on the \fIshow VCC\fP subcommand, all
-active VCCs are displayed.
-If an interface name is specified, all active VCCs for the given
-interface are displayed.
-If an interface and VPI are specified, all active VCCs for the VPI
-on the given interface are displayed.
-If an interface, VPI, and VCI are specified, only the specified VCC on
-the given interface is displayed (note that this could actually be
-two VCCs, since SPANS considers SVCs to be unidirectional).
-.PP
-.SS IP Management Subcommands:
-\fIatm add ARP [<netif>] <host> <ATM address>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<netif>\fP is the optional name of the network interface the
-ATMARP entry is to be associated with.
-If no name is specified, a network interface is chosen depending
-on the IP address of the host being added.
-.ti -5
-\fI<host>\fP is the host name or IP address of the host to
-be added to the ATMARP table,
-.ti -5
-\fI<ATM address>\fP is the ATM address of the host.
-.in -10
-.PP
-This command adds an entry to the ATMARP table for ATM.
-The given host's IP address is associated with the given ATM address.
-When IP needs to transmit data to the host, the specified ATM
-address will be used to open an SVC.
-.PP
-The entry will be marked as permanent in the ATMARP table and will not
-be subject to aging.
-.PP
-.in +5
-.ti -5
-\fIatm add PVC <interface> <vpi> <vci> <aal> <encaps> IP <netif> <host> | dynamic\fP
-.in -5
-.PP
-where:
-.in +10
-.ti -5
-\fI<interface>\fP specifies the physical interface where the PVC
-is to terminate,
-.ti -5
-\fI<vpi>\fP specifies the Virtual Path Identifier (VPI) of the PVC,
-.ti -5
-\fI<vci>\fP specifies the Virtual Channel Identifier (VCI) of the PVC,
-.ti -5
-\fI<aal>\fP specifies the ATM Adaptation Layer (AAL) for the PVC.
-Valid choices are "null" or "AAL0" for the null AAL; "AAL1" for
-AAL 1; "AAL2" for AAL 2; "AAL3", "AAL4", or "AAL3/4" for AAL 3/4;
-and "AAL5" for AAL 5,
-.ti -5
-\fI<encaps>\fP specifies the encapsulation for the PVC.
-Valid choices are "null" or "none" for null encapsulation, and
-"LLC/SNAP", "LLC", or "SNAP" for LLC/SNAP encapsulation,
-.ti -5
-\fIIP\fP specifies that the owner of the PVC is IP.
-.ti -5
-\fI<netif>\fP specifies the network interface which the PVC is
-to be associated with.
-The network interface must exist and be associated with the
-specified physical interface,
-.ti -5
-\fI<host> | dynamic\fP gives the address of the host at
-the far end of the PVC, or the word "dynamic" if its address
-is to be determined with Inverse ARP.
-If "dynamic" is specified, LLC/SNAP encapsulation must also
-be specified.
-.PP
-This command creates a PVC with the specified attributes and attaches
-it to IP.
-.PP
-\fIatm delete ARP [<netif>] <host>\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<netif>\fP is the optional name of the network interface the
-ATMARP entry is associated with.
-If no name is specified, the specified host is deleted from the
-cache regardless of what network interface it is associated with.
-.ti -5
-\fI<host>\fP is the host name or IP address of the host to
-be deleted from the ATMARP table.
-.PP
-This command deletes the specified host's entry from the ATMARP table.
-.PP
-\fIatm set arpserver <netif> <ATM address> | local [<IP prefix> ...]\fP
-.PP
-where:
-.in +10
-.ti -5
-\fI<netif>\fP specifies the network interface for which the
-ATMARP server address is to be set.
-.ti -5
-\fI<ATM address>\fP specifies the ATM address of the host which is to
-provide ATMARP service.
-If "local" is specified instead of an ATM address, the host on
-which the command is issued will become the ATMARP server.
-.ti -5
-\fI<IP prefix> ...\fP is an optional list of IP prefixes
-that the ATMARP server will provide information about.
-An IP prefix is specified as a dotted decimal IP address, followed by
-a slash, followed a number specifying how many bits of the IP address
-are significant.
-For example, 10.0.0.0/8 indicates that the ATMARP server will provide
-services for all addresses on IP network 10.
-The IP subnetwork which the network interface belongs to is
-automatically included.
-.in -10
-.PP
-This command sets the address of the ATMARP server for a network
-interface.
-.PP
-.I atm show ARP [<host>]
-.PP
-displays the following information:
-.PP
-.B Net Intf
-\- the network interface which traffic for the entry will use.
-.PP
-.B Flags
-\- flags showing whether the entry is valid and whether it is
-permanent.
-\- flags giving further information about the ATMARP entry.
-The meanings of the characters in the flags are:
-.PP
-.in +5
-P - the entry is permanent
-.br
-R - the entry has been refreshed
-.br
-V - the entry is valid
-.in -5
-.PP
-.B Age
-\- the number of minutes for which the entry will remain valid.
-.PP
-.B Origin
-\- the source of the ATMARP entry.
-Possible values are:
-.in +16
-.ti -11
-LOCAL\ ----\ The entry is for an interface on the host.
-.ti -11
-PERM\ -----\ The entry is permanent.
-This is used for entries that are created with the
-\fIadd ARP\fP command.
-.ti -11
-REG\ ------\ The entry was created as the result of a host
-registering with the ATMARP server.
-.ti -11
-SCSP\ -----\ The entry was learned via SCSP.
-.ti -11
-LOOKUP\ ---\ The entry was created as the result of a host
-performing an ATMARP lookup.
-.ti -11
-PEER_RSP\ -\ The entry was created as the result of a host
-answering an InARP Request.
-.ti -11
-PEER_REQ\ -\ The entry was created as the result of a host
-sending an InARP Request.
-.in -5
-.PP
-.B ATM address
-\- the ATM address of the host the entry refers to.
-.PP
-.B IP address
-\- the IP address or domain name of the host the entry refers to.
-.PP
-If no parameters are specified on the \fIshow ARP\fP subcommand,
-the whole ATMARP table will be displayed.
-If a host name or IP address is specified, only information about the
-given host is displayed.
-.PP
-This command displays both information that has been learned dynamically
-(through one form or another of ATMARP and via SCSP) and information
-which has been configured by the user (through the \fIadd ARP\fP
-subcommand).
-.PP
-.I atm show arpserver [<netif>]
-.PP
-displays the following information:
-.PP
-.B Net Intf
-\- the network interface for which information is being displayed.
-.PP
-.B State
-\- the state of the connection to the ATMARP server.
-Possible values are:
-.in +16
-.ti -11
-NOT_CONF\ -\ No ATMARP server has been configured for the interface.
-.ti -11
-SERVER\ ---\ The host is the ATMARP server.
-.ti -11
-PEND_ADR\ -\ No ATM address has been set for the interface.
-.ti -11
-POPEN\ ----\ The host is attempting to open a VCC to the ATMARP server.
-.ti -11
-REGISTER\ -\ The host has a VCC open to the ATMARP server and is in
-the process of registering with the server.
-.ti -11
-ACTIVE\ ---\ The ATMARP server connection is active.
-.in -16
-.PP
-.B ATM Address
-\- the ATM address of the ATMARP server.
-.PP
-If no parameters are specified on the \fIshow arpserver\fP subcommand,
-the ATMARP servers for all network interfaces will be displayed.
-If an interface name is specified, only information about the given
-network interface is displayed.
-.PP
-.I atm show IPVCC [<host> | <netif>]
-.PP
-displays the following information:
-.PP
-.B Net Intf
-\- the name of the network interface at which the VCC terminates.
-.PP
-.B VPI
-\- the Virtual Path Identifier (VPI) for the VCC.
-.PP
-.B VCI
-\- the Virtual Channel Identifier (VCI) for the VCC.
-.PP
-.B State
-\- the state of the VCC.
-Possible values are:
-.in +15
-.ti -10
-PMAP\ ----\ The host has an IP packet to send and is waiting for
-an ATMARP mapping.
-.ti -10
-POPEN\ ---\ The VCC is being opened.
-.ti -10
-PACCEPT\ -\ A VCC from a remote host is being accepted.
-.ti -10
-ACTPENT\ -\ A PVC is open, but no ATMARP information is
-available for it yet.
-.ti -10
-ACTIVE\ --\ The VCC is active.
-.in -15
-.PP
-.B Flags
-\- flags giving further information about the VCC.
-The meanings of the characters in the flags are:
-.PP
-.in +5
-S - the VCC is an SVC
-.br
-P - the VCC is a PVC
-.br
-L - the VCC uses LLC/SNAP encapsulation
-.br
-M - the IP-to-ATM address mapping for the VCC is valid
-.br
-N - there is no idle timeout for the VCC
-.in -5
-.PP
-.B IP Address
-\- the name and IP address of the host at the remote end of the VCC.
-.PP
-If no parameters are specified on the \fIshow IPVCC\fP subcommand, all
-active VCCs are displayed.
-If a host name is specified, the active VCC(s) for the given
-host are displayed.
-If a network interface name is specified, the active VCC(s) for the
-given network interface are displayed.
-.PP
-.SS Miscellaneous Subcommands:
-.I atm help
-.PP
-displays a synopsis of the atm command with its subcommands
-and their parameters.
-.PP
-.I atm show version
-displays the version of the running HARP software.
-.fi
-.SH "SEE ALSO"
-\fIilmid\fP (8); \fIscspd\fP (8); \fIatmarpd\fP (8).
-.fi
-.SH BUGS
-Care must be taken to avoid confusing physical interfaces and
-network interfaces.
-.PP
-Please report any bugs to harp-bugs@magic.net.
-.fi
-.SH COPYRIGHT
-Copyright (c) 1994-1998, Network Computing Services, Inc.
-.fi
-.SH AUTHORS
-John Cavanaugh, Network Computing Services, Inc.
-.br
-Mike Spengler, Network Computing Services, Inc.
-.br
-Joe Thomas, Network Computing Services, Inc.
-.fi
-.SH ACKNOWLEDGMENTS
-This software was developed with the support of the Defense
-Advanced Research Projects Agency (DARPA).
diff --git a/sbin/atm/atm/atm.c b/sbin/atm/atm/atm.c
deleted file mode 100644 (file)
index ba907f8..0000000
+++ /dev/null
@@ -1,1039 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm.c,v 1.5 2006/10/16 00:15:35 pavalos Exp $
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * Main routine
- *
- */
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h>
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_cm.h>
-#include <netatm/atm_sigmgr.h>
-#include <netatm/atm_ioctl.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "atm.h"
-
-/*
- * Usage string
- */
-#define USAGE_STR      "Interface management subcommands:\n\
-    attach <intf> <protocol>\n\
-    detach <intf>\n\
-    set mac <intf> <MAC/ESI address>\n\
-    set netif <intf> <prefix> <n>\n\
-    set prefix <intf> <NSAP prefix>\n\
-    show config [<intf>]\n\
-    show interface [<intf>]\n\
-    show netif [<netif>]\n\
-    show stats interface [<intf> phy | dev | atm | aal0 | aal4 |\n\
-        aal5 | driver]\n\
-\n\
-VC management subcommands:\n\
-    add pvc <intf> <vpi> <vci> <aal> <encaps> <owner> ...\n\
-    delete pvc <intf> <vpi> <vci>\n\
-    delete svc <intf> <vpi> <vci>\n\
-    show stats vcc [<intf> [vpi [vci]]]\n\
-    show vcc [<intf> [<vpi> [<vci>] | SVC | PVC]]\n\
-\n\
-IP management subcommands:\n\
-    add arp [<netif>] <IP addr> <ATM addr>\n\
-    add pvc <intf> <vpi> <vci> <aal> <encaps> IP <netif> <IP addr> |\n\
-        dynamic\n\
-    delete arp [<netif>] <IP addr>\n\
-    set arpserver <netif> <server> <IP prefix> ...\n\
-    show arp [<host>]\n\
-    show arpserver [<netif>]\n\
-    show ipvcc [<IP addr> | <netif>]\n\
-\n\
-Miscellaneous subcommands:\n\
-    help\n\
-    show version\n"
-
-
-/*
- * Local definitions
- */
-
-static int     do_cmd(const struct cmd *, int, char **);
-static void    usage(const struct cmd *, const char *);
-static void    attach(int, char **, const struct cmd *);
-static void    detach(int, char **, const struct cmd *);
-static void    pvc_add(int, char **, const struct cmd *);
-static void    arp_add(int, char **, const struct cmd *);
-static void    pvc_dlt(int, char **, const struct cmd *);
-static void    svc_dlt(int, char **, const struct cmd *);
-static void    vcc_dlt(int, char **, const struct cmd *, struct atmdelreq *);
-static void    arp_dlt(int, char **, const struct cmd *);
-static void    help(int, char **, const struct cmd *);
-
-static const struct cmd add_subcmd[] = {
-       { "arp",        2,      3,      arp_add, "[<netif>] <IP addr> <ATM addr>" },
-       { "pvc",        6,      12,     pvc_add, "<intf> <vpi> <vci> <aal> <encaps> <owner> ..." },
-       { 0,            0,      0,      NULL,   "" }
-};
-
-static const struct cmd dlt_subcmd[] = {
-       { "arp",        1,      2,      arp_dlt, "[<netif>] <IP addr>" },
-       { "pvc",        3,      3,      pvc_dlt, "<intf> <vpi> <vci>" },
-       { "svc",        3,      3,      svc_dlt, "<intf> <vpi> <vci>" },
-       { 0,            0,      0,      NULL,   "" }
-};
-
-static const struct cmd set_subcmd[] = {
-       { "arpserver",  2,      18,     set_arpserver, "<netif> <server>" },
-       { "mac",        2,      2,      set_macaddr, "<intf> <MAC/ESI address>" },
-       { "netif",      3,      3,      set_netif, "<intf> <prefix> <n>" },
-       { "prefix",     2,      2,      set_prefix, "<intf> <NSAP prefix>" },
-       { 0,            0,      0,      NULL,   ""}
-};
-
-static const struct cmd stats_subcmd[] = {
-       { "interface",  0,      2,      show_intf_stats, "[<intf> [cfg | phy | dev | atm | aal0 | aal4 | aal5 | driver]]" },
-       { "vcc",        0,      3,      show_vcc_stats, "[<intf> [vpi [vci]]]" },
-       { 0,            0,      0,      NULL,   "" }
-};
-
-static const struct cmd show_subcmd[] = {
-       { "arp",        0,      1,      show_arp, "[<host>]" },
-       { "arpserver",  0,      1,      show_arpserv, "[<netif>]" },
-       { "config",     0,      1,      show_config, "[<intf>]" },
-       { "interface",  0,      1,      show_intf, "[<intf>]" },
-       { "ipvcc",      0,      3,      show_ip_vcc, "[<IP addr> | <netif>]" },
-       { "netif",      0,      1,      show_netif, "[<netif>]" },
-       { "stats",      0,      3,      NULL, (const char *) stats_subcmd },
-       { "vcc",        0,      3,      show_vcc, "[<intf>] [<vpi> [<vci>] | SVC | PVC]" },
-       { "version",    0,      0,      show_version, "" },
-       { 0,            0,      0,      NULL,   "" }
-};
-
-static const struct cmd        cmds[] = {
-       { "add",        0,      0,      NULL,   (const char *) add_subcmd },
-       { "attach",     2,      2,      attach, "<intf> <protocol>" },
-       { "delete",     0,      0,      NULL,   (const char *) dlt_subcmd },
-       { "detach",     1,      1,      detach, "<intf>" },
-       { "set",        0,      0,      NULL,   (const char *) set_subcmd },
-       { "show",       0,      0,      NULL,   (const char *) show_subcmd },
-       { "help",       0,      99,     help,   "" },
-       { 0,            0,      0,      NULL,   "" }
-};
-
-
-/*
- * Supported signalling protocols
- */
-static const struct proto      protos[] = {
-       { "SIGPVC",     ATM_SIG_PVC },
-       { "SPANS",      ATM_SIG_SPANS },
-       { "UNI30",      ATM_SIG_UNI30 },
-       { "UNI31",      ATM_SIG_UNI31 },
-       { "UNI40",      ATM_SIG_UNI40 },
-       { 0,            0 }
-};
-
-/*
- * Supported VCC owners
- */
-static const struct owner      owners[] = {
-       { "IP",         ENDPT_IP,       ip_pvcadd },
-       { "SPANS",      ENDPT_SPANS_SIG,0 },
-       { "SPANS CLS",  ENDPT_SPANS_CLS,0 },
-       { "UNI SIG",    ENDPT_UNI_SIG,  0 },
-       { 0,            0,              0 }
-};
-
-/*
- * Supported AAL parameters
- */
-const struct aal       aals[] = {
-       { "Null",       ATM_AAL0 },
-       { "AAL0",       ATM_AAL0 },
-       { "AAL1",       ATM_AAL1 },
-       { "AAL2",       ATM_AAL2 },
-       { "AAL4",       ATM_AAL3_4 },
-       { "AAL3",       ATM_AAL3_4 },
-       { "AAL3/4",     ATM_AAL3_4 },
-       { "AAL5",       ATM_AAL5 },
-       { 0,    0 },
-};
-
-/*
- * Supported VCC encapsulations
- */
-const struct encaps    encaps[] = {
-       { "Null",       ATM_ENC_NULL },
-       { "None",       ATM_ENC_NULL },
-       { "LLC/SNAP",   ATM_ENC_LLC },
-       { "LLC",        ATM_ENC_LLC },
-       { "SNAP",       ATM_ENC_LLC },
-       { 0,    0 },
-};
-
-
-char   *prog;
-char   prefix[128] = "";
-
-
-int
-main(int argc, char **argv)
-{
-       int     error;
-
-       /*
-        * Save program name, ignoring any path components
-        */
-       if ((prog = (char *)strrchr(argv[0], '/')) != NULL)
-               prog++;
-       else
-               prog = argv[0];
-
-       if (argc < 2) {
-               usage(cmds, "");
-               exit(1);
-       }
-       argc--; argv++;
-               
-       /*
-        * Validate and process command
-        */
-       if ((error = do_cmd(cmds, argc, argv)) != 0)
-               usage(cmds, "");
-
-       exit(error);
-}
-
-
-/*
- * Validate and process user command
- * 
- * Arguments:
- *     descp   pointer to command description array
- *     argc    number of arguments left in command
- *     argv    pointer to argument strings
- *
- * Returns:
- *     none
- *
- */
-static int
-do_cmd(const struct cmd *descp, int argc, char **argv)
-{
-       const struct cmd        *cmdp = NULL;
-
-       /*
-        * Make sure we have paramaters to process
-        */
-       if (!argc) {
-               usage(cmds, "");
-               exit(1);
-       }
-
-       /*
-        * Figure out what command user wants
-        */
-       for (; descp->name; descp++) {
-               /*
-                * Use an exact match if there is one
-                */
-               if (!strcasecmp(descp->name, argv[0])) {
-                       cmdp = descp;
-                       break;
-               }
-               /*
-                * Look for a match on the first part of keyword
-                */
-               if (!strncasecmp(descp->name, argv[0], strlen(argv[0]))) {
-                       if (cmdp) {
-                               fprintf(stderr, "%s: Ambiguous parameter \"%s\"\n",
-                                               prog, argv[0]);
-                               exit(1);
-                       }
-                       cmdp = descp;
-               }
-       }
-       if (!cmdp)
-               return(1);
-       argc--; argv++;
-
-       /*
-        * See if this command has subcommands
-        */
-       if (cmdp->func == NULL) {
-               strcat(prefix, cmdp->name);
-               strcat(prefix, " ");
-               return(do_cmd((const struct cmd *)cmdp->help, argc, argv));
-       }
-
-       /*
-        * Minimal validation
-        */
-       if ((argc < cmdp->minp) || (argc > cmdp->maxp)) {
-               fprintf(stderr, "%s: Invalid number of arguments\n",
-                       prog);
-               fprintf(stderr, "\tformat is: %s%s %s\n",
-                       prefix, cmdp->name, cmdp->help);
-               exit(1);
-       }
-
-       /*
-        * Process command
-        */
-       (*cmdp->func)(argc, argv, cmdp);
-       return(0);
-}
-
-
-/*
- * Print command usage information
- * 
- * Arguments:
- *     cmdp    pointer to command description 
- *     pref    pointer current command prefix 
- *
- * Returns:
- *     none
- *
- */
-static void
-usage(__unused const struct cmd *cmdp, __unused const char *pref)
-{
-       fprintf(stderr, "usage: %s command [arg] [arg]...\n", prog);
-       fprintf(stderr, USAGE_STR);
-}
-
-
-/*
- * Process interface attach command
- * 
- * Command format: 
- *     atm attach <interface_name> <protocol_name>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-attach(__unused int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       struct atmcfgreq        aar;
-       const struct proto      *prp;
-       int             s;
-
-       /*
-        * Validate interface name
-        */
-       if (strlen(argv[0]) > sizeof(aar.acr_att_intf) - 1) {
-               fprintf(stderr, "%s: Illegal interface name\n", prog);
-               exit(1);
-       }
-
-       /*
-        * Find/validate requested signalling protocol
-        */
-       for (prp = protos; prp->p_name; prp++) {
-               if (strcasecmp(prp->p_name, argv[1]) == 0)
-                       break;
-       }
-       if (prp->p_name == NULL) {
-               fprintf(stderr, "%s: Unknown signalling protocol\n", prog);
-               exit(1);
-       }
-
-
-       /*
-        * Build ioctl request
-        */
-       aar.acr_opcode = AIOCS_CFG_ATT;
-       strncpy(aar.acr_att_intf, argv[0], sizeof(aar.acr_att_intf));
-       aar.acr_att_proto = prp->p_id;
-
-       /*
-        * Tell the kernel to do the attach
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCCFG, (caddr_t)&aar) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EINVAL:
-               case EOPNOTSUPP:
-               case EPROTONOSUPPORT:
-                       perror("Internal error");
-                       break;
-               case ENOMEM:
-                       fprintf(stderr, "Kernel memory exhausted\n");
-                       break;
-               case EEXIST:
-                       fprintf(stderr, "Signalling manager already attached to %s\n",
-                                       argv[0]);
-                       break;
-               case ENETDOWN:
-                       fprintf(stderr, "ATM network is inoperable\n");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use attach subcommand\n");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               case ETOOMANYREFS:
-                       fprintf(stderr, "%s has too few or too many network interfaces\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("Ioctl (AIOCCFG) attach");
-                       break;
-               }
-               exit(1);
-       }
-       close(s);
-}
-
-
-/*
- * Process interface detach command
- * 
- * Command format: 
- *     atm detach <interface_name>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-detach(__unused int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       struct atmcfgreq        adr;
-       int             s;
-
-       /*
-        * Validate interface name
-        */
-       if (strlen(argv[0]) > sizeof(adr.acr_det_intf) - 1) {
-               fprintf(stderr, "%s: Illegal interface name\n", prog);
-               exit(1);
-       }
-
-       /*
-        * Build ioctl request
-        */
-       adr.acr_opcode = AIOCS_CFG_DET;
-       strncpy(adr.acr_det_intf, argv[0], sizeof(adr.acr_det_intf));
-
-       /*
-        * Tell the kernel to do the detach
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCCFG, (caddr_t)&adr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EALREADY:
-                       fprintf(stderr, "Signalling manager already detaching from %s\n",
-                                       argv[0]);
-                       break;
-               case EINVAL:
-                       perror("Internal error");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use detach subcommand\n");
-                       break;
-               default:
-                       perror("ioctl (AIOCCFG) detach");
-                       break;
-               }
-               exit(1);
-       }
-       close(s);
-}
-
-
-/*
- * Process PVC add command
- * 
- * Command format: 
- *     atm add PVC <interface_name> <vpi> <vci> <aal> <encaps>
- *             <owner_name>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-pvc_add(int argc, char **argv, const struct cmd *cmdp)
-{
-       struct atmaddreq        apr;
-       struct atminfreq        air;
-       struct air_int_rsp      *int_info;
-       const struct owner      *owp;
-       const struct aal        *alp;
-       const struct encaps     *enp;
-       char    *cp;
-       long    v;
-       int     buf_len, s;
-
-       /*
-        * Initialize opcode and flags
-        */
-       apr.aar_opcode = AIOCS_ADD_PVC;
-       apr.aar_pvc_flags = 0;
-
-       /*
-        * Validate interface name and issue an information
-        * request IOCTL for the interface
-        */
-       if (strlen(argv[0]) > sizeof(apr.aar_pvc_intf) - 1) {
-               fprintf(stderr, "%s: Illegal interface name\n", prog);
-               exit(1);
-       }
-       UM_ZERO(air.air_int_intf, sizeof(air.air_int_intf));
-       strcpy(air.air_int_intf, argv[0]);
-       buf_len = sizeof(struct air_int_rsp);
-       air.air_opcode = AIOCS_INF_INT;
-       buf_len = do_info_ioctl(&air, buf_len);
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-       int_info = (struct air_int_rsp *) air.air_buf_addr;
-       strcpy(apr.aar_pvc_intf, argv[0]);
-       argc--; argv++;
-
-       /*
-        * Validate vpi/vci values
-        */
-       v = strtol(argv[0], &cp, 0);
-       if ((*cp != '\0') || (v < 0) || (v >= 1 << 8)) {
-               fprintf(stderr, "%s: Invalid VPI value\n", prog);
-               exit(1);
-       }
-       apr.aar_pvc_vpi = (u_short) v;
-       argc--; argv++;
-
-       v = strtol(argv[0], &cp, 0);
-       if ((*cp != '\0') || (v < MIN_VCI) || (v >= 1 << 16)) {
-               fprintf(stderr, "%s: Invalid VCI value\n", prog);
-               exit(1);
-       }
-       apr.aar_pvc_vci = (u_short) v;
-       argc--; argv++;
-
-       /*
-        * Validate requested PVC AAL
-        */
-       for (alp = aals; alp->a_name; alp++) {
-               if (strcasecmp(alp->a_name, argv[0]) == 0)
-                       break;
-       }
-       if (alp->a_name == NULL) {
-               fprintf(stderr, "%s: Invalid PVC AAL\n", prog);
-               exit(1);
-       }
-       apr.aar_pvc_aal = alp->a_id;
-       argc--; argv++;
-
-       /*
-        * Validate requested PVC encapsulation
-        */
-       for (enp = encaps; enp->e_name; enp++) {
-               if (strcasecmp(enp->e_name, argv[0]) == 0)
-                       break;
-       }
-       if (enp->e_name == NULL) {
-               fprintf(stderr, "%s: Invalid PVC encapsulation\n", prog);
-               exit(1);
-       }
-       apr.aar_pvc_encaps = enp->e_id;
-       argc--; argv++;
-
-       /*
-        * Validate requested PVC owner
-        */
-       for (owp = owners; owp->o_name; owp++) {
-               if (strcasecmp(owp->o_name, argv[0]) == 0)
-                       break;
-       }
-       if (owp->o_name == NULL) {
-               fprintf(stderr, "%s: Unknown PVC owner\n", prog);
-               exit(1);
-       }
-       apr.aar_pvc_sap = owp->o_sap;
-       argc--; argv++;
-
-       /*
-        * Perform service user processing
-        */
-       if (owp->o_pvcadd) {
-               (*owp->o_pvcadd)(argc, argv, cmdp, &apr, int_info);
-       } else {
-               fprintf(stderr, "%s: Unsupported PVC owner\n", prog);
-               exit(1);
-       }
-
-       /*
-        * Tell the kernel to add the PVC
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCADD, (caddr_t)&apr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EPROTONOSUPPORT:
-               case ENOPROTOOPT:
-                       perror("Internal error");
-                       break;
-               case EINVAL:
-                       fprintf(stderr, "Invalid parameter\n");
-                       break;
-               case EEXIST:
-                       fprintf(stderr, "PVC already exists\n");
-                       break;
-               case ENETDOWN:
-                       fprintf(stderr, "ATM network is inoperable\n");
-                       break;
-               case ENOMEM:
-                       fprintf(stderr, "Kernel memory exhausted\n");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use add subcommand\n");
-                       break;
-               case ERANGE:
-                       fprintf(stderr, "Invalid VPI or VCI value\n");
-                       break;
-               default:
-                       perror("ioctl (AIOCADD) add PVC");
-                       break;
-               }
-               exit(1);
-       }
-       close(s);
-}
-
-
-/*
- * Process ARP add command
- * 
- * Command formats: 
- *     atm add arp [<netif>] <IP addr> <ATM addr>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-arp_add(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int                     len, s;
-       struct atmaddreq        apr;
-       Atm_addr                host_atm;
-       struct sockaddr_in      *sin;
-       union {
-               struct sockaddr_in      sin;
-               struct sockaddr         sa;
-       } host_ip;
-
-       /*
-        * Initialize add request structure
-        */
-       UM_ZERO(&apr, sizeof(apr));
-
-       /*
-        * Get network interface name if one is present
-        */
-       if (argc == 3) {
-               check_netif_name(argv[0]);
-               strcpy(apr.aar_arp_intf, argv[0]);
-               argc--; argv++;
-       }
-
-        /*
-         * Get IP address of specified host name
-         */
-       UM_ZERO(&host_ip, sizeof(host_ip));
-       host_ip.sa.sa_family = AF_INET;
-       sin = get_ip_addr(argv[0]);
-       host_ip.sin.sin_addr.s_addr = sin->sin_addr.s_addr;
-       argc--; argv++;
-
-       /*
-        * Get specified ATM address
-        */
-       len = get_hex_atm_addr(argv[0], (u_char *)host_atm.address,
-                       sizeof(Atm_addr_nsap));
-       switch(len) {
-       case sizeof(Atm_addr_nsap):
-               host_atm.address_format = T_ATM_ENDSYS_ADDR;
-               host_atm.address_length = sizeof(Atm_addr_nsap);
-               break;
-       case sizeof(Atm_addr_spans):
-               host_atm.address_format = T_ATM_SPANS_ADDR;
-               host_atm.address_length = sizeof(Atm_addr_spans);
-               break;
-       default:
-               fprintf(stderr, "%s: Invalid ATM address\n", prog);
-               exit(1);
-       }
-
-       /*
-        * Build IOCTL request
-        */
-       apr.aar_opcode = AIOCS_ADD_ARP;
-       apr.aar_arp_dst = host_ip.sa;
-       ATM_ADDR_COPY(&host_atm, &apr.aar_arp_addr);
-       apr.aar_arp_origin = ARP_ORIG_PERM;
-
-       /*
-        * Tell the kernel to add the ARP table entry
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCADD, (caddr_t)&apr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EINVAL:
-                       fprintf(stderr, "Invalid parameter\n");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use add subcommand\n");
-                       break;
-               case EADDRNOTAVAIL:
-                       fprintf(stderr, "IP address not valid for interface\n");
-                       break;
-               default:
-                       perror("ioctl (AIOCADD) add");
-                       break;
-               }
-               exit(1);
-       }
-       close(s);
-}
-
-
-/*
- * Process PVC delete command
- * 
- * Command formats: 
- *     atm delete pvc <interface_name> <vpi> <vci>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-pvc_dlt(int argc, char **argv, const struct cmd *cmdp)
-{
-       struct atmdelreq        apr;
-
-       /*
-        * Set opcode
-        */
-       apr.adr_opcode = AIOCS_DEL_PVC;
-
-       /*
-        * Complete request by calling subroutine
-        */
-       vcc_dlt(argc, argv, cmdp, &apr);
-}
-
-
-/*
- * Process SVC delete command
- * 
- * Command formats: 
- *     atm delete svc <interface_name> <vpi> <vci>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-svc_dlt(int argc, char **argv, const struct cmd *cmdp)
-{
-       struct atmdelreq        apr;
-
-       /*
-        * Set opcode
-        */
-       apr.adr_opcode = AIOCS_DEL_SVC;
-
-       /*
-        * Complete request by calling subroutine
-        */
-       vcc_dlt(argc, argv, cmdp, &apr);
-}
-
-
-/*
- * Complete an SVC or PVC delete command
- * 
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *     apr     pointer to ATM delete IOCTL structure
- *
- * Returns:
- *     none
- *
- */
-static void
-vcc_dlt(int argc, char **argv, __unused const struct cmd *cmdp, struct atmdelreq *apr)
-{
-       char    *cp;
-       long    v;
-       int     s;
-
-       /*
-        * Validate interface name
-        */
-       if (strlen(argv[0]) > sizeof(apr->adr_pvc_intf) - 1) {
-               fprintf(stderr, "%s: Illegal interface name\n", prog);
-               exit(1);
-       }
-       strcpy(apr->adr_pvc_intf, argv[0]);
-       argc--; argv++;
-
-       /*
-        * Validate vpi/vci values
-        */
-       v = strtol(argv[0], &cp, 0);
-       if ((*cp != '\0') || (v < 0) || (v >= 1 << 8)) {
-               fprintf(stderr, "%s: Invalid VPI value\n", prog);
-               exit(1);
-       }
-       apr->adr_pvc_vpi = (u_short) v;
-       argc--; argv++;
-
-       v = strtol(argv[0], &cp, 0);
-       if ((*cp != '\0') || (v < MIN_VCI) || (v >= 1 << 16)) {
-               fprintf(stderr, "%s: Invalid VCI value\n", prog);
-               exit(1);
-       }
-       apr->adr_pvc_vci = (u_short) v;
-       argc--; argv++;
-
-       /*
-        * Tell the kernel to delete the VCC
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCDEL, (caddr_t)apr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EINVAL:
-                       fprintf(stderr, "Invalid parameter\n");
-                       break;
-               case ENOENT:
-                       fprintf(stderr, "VCC not found\n");
-                       break;
-               case EALREADY:
-                       fprintf(stderr, "VCC already being closed\n");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       apr->adr_pvc_intf);
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use delete subcommand\n");
-                       break;
-               default:
-                       perror("ioctl (AIOCDEL) delete");
-                       break;
-               }
-               exit(1);
-       }
-       close(s);
-}
-
-
-/*
- * Process ARP delete command
- * 
- * Command formats: 
- *     atm delete arp <IP addr>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-arp_dlt(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int     s;
-       struct atmdelreq        apr;
-       struct sockaddr_in      *sin;
-       union {
-               struct sockaddr_in      sin;
-               struct sockaddr         sa;
-       } host_addr;
-
-       /*
-        * Set opcode
-        */
-       UM_ZERO(&apr, sizeof(apr));
-       apr.adr_opcode = AIOCS_DEL_ARP;
-
-       /*
-        * Get network interface name if one is present
-        */
-       if (argc == 2) {
-               check_netif_name(argv[0]);
-               strcpy(apr.adr_arp_intf, argv[0]);
-               argc--; argv++;
-       }
-
-        /*
-         * Get IP address of specified host name
-         */
-       UM_ZERO(&host_addr, sizeof(host_addr));
-       host_addr.sa.sa_family = AF_INET;
-       sin = get_ip_addr(argv[0]);
-       host_addr.sin.sin_addr.s_addr = sin->sin_addr.s_addr;
-       apr.adr_arp_dst = host_addr.sa;
-
-       /*
-        * Tell the kernel to delete the ARP table entry
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCDEL, (caddr_t)&apr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EINVAL:
-                       fprintf(stderr, "Invalid parameter\n");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use delete subcommand\n");
-                       break;
-               default:
-                       perror("ioctl (AIOCDEL) delete");
-                       break;
-               }
-               exit(1);
-       }
-       close(s);
-}
-
-
-/*
- * Process help command
- * 
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-static void
-help(__unused int argc, __unused char **argv, __unused const struct cmd *cmdp)
-{
-       usage(cmds, "");
-}
diff --git a/sbin/atm/atm/atm.h b/sbin/atm/atm/atm.h
deleted file mode 100644 (file)
index 4537b69..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm.h,v 1.4 1999/08/28 00:12:17 peter Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm.h,v 1.5 2006/10/16 00:15:35 pavalos Exp $
- *
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * Control blocks
- *
- */
-
-#define        MAX_NIFS        256             /* Max network interfaces */
-#define        MIN_VCI         32              /* Smallest non-reserved VCI */
-
-#ifndef TRUE
-#define        TRUE    1
-#endif
-#ifndef FALSE
-#define        FALSE   0
-#endif
-
-/*
- * User commands
- */
-struct cmd {
-       const char      *name;          /* Command name */
-       int     minp;                   /* Minimum number of parameters */
-       int     maxp;                   /* Maximum number of parameters */
-       void    (*func)                 /* Processing function */
-               (int, char **, const struct cmd *);
-       const char      *help;          /* User help string */
-};
-
-
-/*
- * Supported signalling protocols
- */
-struct proto {
-       const char      *p_name;        /* Protocol name */
-       u_char  p_id;                   /* Protocol id */ 
-};
-
-
-/*
- * Table of state names
- */
-struct state {
-       const char      *s_name;        /* State name */
-       u_char  s_id;                   /* State id */ 
-};
-
-
-/*
- * Supported signalling protocol states
- */
-struct proto_state {
-       const char      *p_name;        /* Signalling manager name */
-       const struct state *p_state;    /* Protocol state table */
-       const struct state *v_state;    /* Protocol VCC state table */
-       u_char          p_id;           /* Protocol ID */ 
-};
-
-
-/*
- * Supported VCC owners
- */
-struct owner {
-       const char      *o_name;        /* Owner name */
-       u_int   o_sap;                  /* Owner's SAP */
-       void    (*o_pvcadd)             /* PVC ADD processing function */
-                       (int, char **, const struct cmd *, struct atmaddreq *,
-                            struct air_int_rsp *);
-};
-
-
-/*
- * Supported AALs
- */
-struct aal {
-       const char      *a_name;        /* AAL name */
-       u_char  a_id;                   /* AAL code */ 
-};
-
-
-/*
- * Supported encapsulations
- */
-struct encaps {
-       const char      *e_name;        /* Encapsulation name */
-       u_char  e_id;                   /* Encapsulation code */ 
-};
-
-
-/*
- * External variables
- */
-extern char    *prog;                  /* Program invocation */
-extern char    prefix[];               /* Current command prefix */
-
-/*
- * Global function declarations
- */
-
-       /* atm_eni.c */
-void           show_eni_stats(char *, int, char **);
-
-       /* atm_fore200.c */
-void           show_fore200_stats(char *, int, char **);
-
-       /* atm_inet.c */
-void           ip_pvcadd (int, char **, const struct cmd *, struct atmaddreq *,
-                       struct air_int_rsp *);
-
-       /* atm_print.c */
-void           print_arp_info(struct air_arp_rsp *);
-void           print_asrv_info(struct air_asrv_rsp *);
-void           print_cfg_info(struct air_cfg_rsp *);
-void           print_intf_info(struct air_int_rsp *);
-void           print_ip_vcc_info(struct air_ip_vcc_rsp *);
-void           print_netif_info(struct air_netif_rsp *);
-void           print_intf_stats(struct air_phy_stat_rsp *);
-void           print_vcc_stats(struct air_vcc_rsp *);
-void           print_vcc_info(struct air_vcc_rsp *);
-void           print_version_info(struct air_version_rsp *);
-
-       /* atm_set.c */
-void           set_arpserver(int, char **, const struct cmd *);
-void           set_macaddr(int, char **, const struct cmd *);
-void           set_netif(int, char **, const struct cmd *);
-void           set_prefix(int, char **, const struct cmd *);
-
-       /* atm_show.c */
-void           show_arp(int, char **, const struct cmd *);
-void           show_arpserv(int, char **, const struct cmd *);
-void           show_config(int, char **, const struct cmd *);
-void           show_intf(int, char **, const struct cmd *);
-void           show_ip_vcc(int, char **, const struct cmd *);
-void           show_netif(int, char **, const struct cmd *);
-void           show_intf_stats(int, char **, const struct cmd *);
-void           show_vcc_stats(int, char **, const struct cmd *);
-void           show_vcc(int, char **, const struct cmd *);
-void           show_version(int, char **, const struct cmd *);
-
-       /* atm_subr.c */
-const char *   get_vendor(int);
-const char *   get_adapter(int);
-const char *   get_media_type(int);
-const char *   get_bus_type(int);
-const char *   get_adapter_name(char *);
-const char *   format_mac_addr(Mac_addr *);
-int            parse_ip_prefix(char *, struct in_addr *);
-int            compress_prefix_list(struct in_addr *, int);
-void           check_netif_name(char *);
-void           sock_error(int);
diff --git a/sbin/atm/atm/atm_eni.c b/sbin/atm/atm/atm_eni.c
deleted file mode 100644 (file)
index d6c32a3..0000000
+++ /dev/null
@@ -1,429 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm_eni.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm_eni.c,v 1.5 2006/10/16 00:15:35 pavalos Exp $
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * Routines for Efficient-specific subcommands
- *
- */
-
-#include <sys/param.h>  
-#include <sys/socket.h> 
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h> 
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-#include <dev/atm/hea/eni_stats.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "atm.h"
-
-/*
- * Local constants
- */
-#define        SHOW_PHY        1
-#define        SHOW_ATM        2
-#define        SHOW_AAL0       4
-#define        SHOW_AAL5       8
-#define        SHOW_DRIVER     64
-
-
-/*
- * Headers for statistics
- */
-#define ATM_STATS_HDR \
-"%s ATM Layer Statistics\n\
-  Cells In   Cells Out\n"
-
-#define AAL0_STATS_HDR \
-"%s AAL 0 Statistics\n\
-  Cells In   Cells Out  Cell Drops\n"
-
-#define AAL5_STATS_HDR \
-"%s AAL 5 Statistics\n\
-                        CRC/Len                              CRC   Proto  PDU\n\
-  Cells In   Cells Out  Errs   Drops    PDUs In   PDUs Out   Errs  Errs   Drops\n"
-
-#define DRIVER_STATS_HDR_1 \
-"%s Device Driver Statistics\n\
-  Buf    Buf    Buf    Buf  Can't    VCC    VCC     No     No  No RX     RX\n\
-  Req     No     No  Alrdy   Find    PDU  Range  Resrc     RX    DMA  Queue\n\
- Size  Descr    Mem   Free  Descr   Size  Error     In   Bufs   Room   Full\n"
-
-#define DRIVER_STATS_HDR_2 \
-"%s Device Driver Statistics\n\
-   No    ATM  No RX  No TX    Seg           Max       No     No    No TX\n\
-   RX  IntrQ    DMA    DMA    Not    Seg    Seg       TX  Resrc      DMA\n\
-  VCC   Full   Room   Addr  Align    Pad    Out      Buf    Out     Room\n"
-
-#define OC3_STATS_HDR \
-"%s OC-3c Statistics\n\
-Section     Path    Line      Line     Path     Corr   Uncorr\n\
-BIP8        BIP8    BIP24     FEBE     FEBE     HCS    HCS\n\
-Errs        Errs    Errs      Errs     Errs     Errs   Errs\n"
-
-
-static void    print_eni_oc3(struct air_vinfo_rsp *);
-static void    print_eni_atm(struct air_vinfo_rsp *);
-static void    print_eni_aal0(struct air_vinfo_rsp *);
-static void    print_eni_aal5(struct air_vinfo_rsp *);
-static void    print_eni_driver(struct air_vinfo_rsp *);
-
-/*
- * Process show ENI statistics command
- *
- * The statistics printed are vendor-specific, depending on the brand of
- * the interface card.
- * 
- * Command format: 
- *     atm show stats interface [<interface-name> [phy | dev | atm |
-               aal0 | aal5 | driver ]]
- *
- * Arguments:
- *     intf    interface to print statistics for
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *
- * Returns:
- *     none
- *
- */
-void
-show_eni_stats(char *intf, int argc, char **argv)
-{
-       int     buf_len, stats_type;
-       struct atminfreq        air;
-       struct air_vinfo_rsp    *stats;
-
-       /*
-        * Get statistics type qualifier
-        */
-       if (!strcasecmp("phy", argv[0])) {
-               stats_type = SHOW_PHY;
-       } else if (!strcasecmp("atm", argv[0])) {
-               stats_type = SHOW_ATM;
-       } else if (!strcasecmp("aal0", argv[0])) {
-               stats_type = SHOW_AAL0;
-       } else if (!strcasecmp("aal5", argv[0])) {
-               stats_type = SHOW_AAL5;
-       } else if (!strcasecmp("driver", argv[0])) {
-               stats_type = SHOW_DRIVER;
-       } else {
-               fprintf(stderr, "%s: Illegal or unsupported statistics type\n", prog);
-               exit(1);
-       }
-       argc--; argv++;
-
-       /*
-        * Get vendor-specific statistics from the kernel
-        */
-       UM_ZERO(&air, sizeof(air));
-       air.air_opcode = AIOCS_INF_VST;
-       strcpy(air.air_vinfo_intf, intf);
-       buf_len = do_info_ioctl(&air, sizeof(struct air_vinfo_rsp) + 1024);
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       intf);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-       stats = (struct air_vinfo_rsp *) air.air_buf_addr;
-
-       /*
-        * Print the statistics
-        */
-       if ((size_t)buf_len < sizeof(struct air_vinfo_rsp) +
-                       sizeof(Eni_stats)) {
-               UM_FREE(stats);
-               return;
-       }
-
-       switch (stats_type) {
-       case SHOW_PHY:
-               print_eni_oc3(stats);
-               break;
-       case SHOW_ATM:
-               print_eni_atm(stats);
-               break;
-       case SHOW_AAL0:
-               print_eni_aal0(stats);
-               break;
-       case SHOW_AAL5:
-               print_eni_aal5(stats);
-               break;
-       case SHOW_DRIVER:
-               print_eni_driver(stats);
-               break;
-       }
-
-       UM_FREE(stats);
-}
-
-
-/*
- * Print ENI OC-3c statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_eni_oc3(struct air_vinfo_rsp *vi)
-{
-       Eni_stats       *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Eni_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(OC3_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the OC-3c info
-        */
-       printf("%7ld  %7ld  %7ld  %7ld  %7ld  %7ld  %7ld\n",
-                       stats->eni_st_oc3.oc3_sect_bip8,
-                       stats->eni_st_oc3.oc3_path_bip8,
-                       stats->eni_st_oc3.oc3_line_bip24,
-                       stats->eni_st_oc3.oc3_line_febe,
-                       stats->eni_st_oc3.oc3_path_febe,
-                       stats->eni_st_oc3.oc3_hec_corr,
-                       stats->eni_st_oc3.oc3_hec_uncorr);
-}
-
-
-/*
- * Print ENI ATM statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_eni_atm(struct air_vinfo_rsp *vi)
-{
-       Eni_stats       *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Eni_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(ATM_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the ATM layer info
-        */
-       printf("%10ld  %10ld\n",
-                       stats->eni_st_atm.atm_rcvd,
-                       stats->eni_st_atm.atm_xmit);
-}
-
-
-/*
- * Print ENI AAL 0 statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_eni_aal0(struct air_vinfo_rsp *vi)
-{
-       Eni_stats       *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Eni_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(AAL0_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the AAL 0 info
-        */
-       printf("%10ld  %10ld  %10ld\n",
-                       stats->eni_st_aal0.aal0_rcvd,
-                       stats->eni_st_aal0.aal0_xmit,
-                       stats->eni_st_aal0.aal0_drops);
-}
-
-
-/*
- * Print ENI AAL 5 statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_eni_aal5(struct air_vinfo_rsp *vi)
-{
-       Eni_stats       *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Eni_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(AAL5_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the AAL 5 info
-        */
-       printf("%10ld  %10ld  %5ld  %5ld  %9ld  %9ld  %5ld  %5ld  %5ld\n",
-                       stats->eni_st_aal5.aal5_rcvd,
-                       stats->eni_st_aal5.aal5_xmit,
-                       stats->eni_st_aal5.aal5_crc_len,
-                       stats->eni_st_aal5.aal5_drops,
-                       stats->eni_st_aal5.aal5_pdu_rcvd,
-                       stats->eni_st_aal5.aal5_pdu_xmit,
-                       stats->eni_st_aal5.aal5_pdu_crc,
-                       stats->eni_st_aal5.aal5_pdu_errs,
-                       stats->eni_st_aal5.aal5_pdu_drops);
-}
-
-/*
- * Print Efficient device driver statistics
- *
- * Arguments:
- *      vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *      none
- *
- */
-static void
-print_eni_driver(struct air_vinfo_rsp *vi)
-{
-        Eni_stats       *stats;
-
-        /*
-         * Bump stats pointer past header info
-         */
-        stats = (Eni_stats *)
-                        ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-        /*
-         * Print 1st header
-         */
-        printf(DRIVER_STATS_HDR_1, get_adapter_name(vi->avsp_intf));
-
-        /*
-         * Print the driver info
-         */
-        printf ( "%5ld  %5ld  %5ld  %5ld  %5ld  %5ld  %5ld  %5ld  %5ld  %5ld  %5ld\n",
-                stats->eni_st_drv.drv_mm_toobig,
-                stats->eni_st_drv.drv_mm_nodesc,
-                stats->eni_st_drv.drv_mm_nobuf,
-                stats->eni_st_drv.drv_mm_notuse,
-                stats->eni_st_drv.drv_mm_notfnd,
-                stats->eni_st_drv.drv_vc_maxpdu,
-                stats->eni_st_drv.drv_vc_badrng,
-                stats->eni_st_drv.drv_rv_norsc,
-                stats->eni_st_drv.drv_rv_nobufs,
-                stats->eni_st_drv.drv_rv_nodma,
-                stats->eni_st_drv.drv_rv_rxq
-        );
-
-        /*
-         * Print 2nd header
-         */
-        printf(DRIVER_STATS_HDR_2, get_adapter_name(vi->avsp_intf));
-
-        /*
-         * Print the driver info
-         */
-        printf ( "%5ld  %5ld  %5ld  %5ld  %5ld  %5ld  %5ld  %7ld  %5ld  %7ld\n",
-                stats->eni_st_drv.drv_rv_novcc,
-                stats->eni_st_drv.drv_rv_intrq,
-                stats->eni_st_drv.drv_rv_segdma,
-                stats->eni_st_drv.drv_xm_segdma,
-                stats->eni_st_drv.drv_xm_segnoal,
-                stats->eni_st_drv.drv_xm_seglen,
-                stats->eni_st_drv.drv_xm_maxpdu,
-                stats->eni_st_drv.drv_xm_nobuf,
-                stats->eni_st_drv.drv_xm_norsc,
-                stats->eni_st_drv.drv_xm_nodma
-        );
-
-
-}
-
diff --git a/sbin/atm/atm/atm_fore200.c b/sbin/atm/atm/atm_fore200.c
deleted file mode 100644 (file)
index e5b7892..0000000
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm_fore200.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm_fore200.c,v 1.5 2006/10/16 00:15:35 pavalos Exp $
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * Routines for Fore SBA-200-specific subcommands
- *
- */
-
-#include <sys/param.h>  
-#include <sys/socket.h> 
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h> 
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-#include <dev/atm/hfa/fore_aali.h>
-#include <dev/atm/hfa/fore_slave.h>
-#include <dev/atm/hfa/fore_stats.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "atm.h"
-
-/*
- * Local constants
- */
-#define        SHOW_PHY        1
-#define        SHOW_DEV        2
-#define        SHOW_ATM        4
-#define        SHOW_AAL0       8
-#define        SHOW_AAL4       16
-#define        SHOW_AAL5       32
-#define        SHOW_DRIVER     64
-
-
-/*
- * Headers for statistics
- */
-#define TAXI_STATS_HDR \
-"%s TAXI Statistics\n\
-  CRC Errs  Framing Errs\n"
-
-#define DEV_STATS_HDR \
-"%s Device Statistics\n\
-Type 1      Type 1      Type 2      Type 2\n\
-Small Buff  Large Buff  Small Buff  Large Buff  Receive     Receive\n\
-Alloc Fail  Alloc Fail  Alloc Fail  Alloc Fail  Queue Full  Carrier\n"
-
-#define ATM_STATS_HDR \
-"%s ATM Layer Statistics\n\
-  Cells In   Cells Out   VPI Range  VPI NoConn   VCI Range  VCI NoConn\n"
-
-#define AAL0_STATS_HDR \
-"%s AAL 0 Statistics\n\
-  Cells In   Cells Out  Cell Drops\n"
-
-#define AAL4_STATS_HDR \
-"%s AAL 4 Statistics\n\
-                         CRC   Proto  Cell                          PDU   PDU\n\
-  Cells In   Cells Out   Errs  Errs   Drops    PDUs In   PDUs Out   Errs  Drops\n"
-
-#define AAL5_STATS_HDR \
-"%s AAL 5 Statistics\n\
-                        CRC/Len                              CRC   Proto  PDU\n\
-  Cells In   Cells Out  Errs   Drops    PDUs In   PDUs Out   Errs  Errs   Drops\n"
-
-#define DRIVER_STATS_HDR \
-"%s Device Driver Statistics\n\
-  No  Xmit   Max   Seg          No    No          No    IQ    No   Cmd    No\n\
- VCC Queue   Seg   Not   Seg   DMA   VCC    No  Mbuf  Full   DMA Queue   DMA\n\
- Out  Full  Size Align   Pad   Out    In  Buff    In    In   Sup  Full   Cmd\n"
-
-#define OC3_STATS_HDR \
-"%s OC-3c Statistics\n\
-Section     Path    Line      Line     Path     Corr   Uncorr\n\
-BIP8        BIP8    BIP24     FEBE     FEBE     HCS    HCS\n\
-Errs        Errs    Errs      Errs     Errs     Errs   Errs\n"
-
-static void    print_fore200_taxi(struct air_vinfo_rsp *);
-static void    print_fore200_oc3(struct air_vinfo_rsp *);
-static void    print_fore200_dev(struct air_vinfo_rsp *);
-static void    print_fore200_atm(struct air_vinfo_rsp *);
-static void    print_fore200_aal0(struct air_vinfo_rsp *);
-static void    print_fore200_aal4(struct air_vinfo_rsp *);
-static void    print_fore200_aal5(struct air_vinfo_rsp *);
-static void    print_fore200_driver(struct air_vinfo_rsp *);
-
-/*
- * Process show Fore SBA-200 statistics command
- *
- * The statistics printed are vendor-specific, depending on the brand of
- * the interface card.
- * 
- * Command format: 
- *     atm show stats interface [<interface-name> [phy | dev | atm |
- *             aal0 | aal4 | aal5 | driver]]
- *
- * Arguments:
- *     intf    interface statistics are for
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *
- * Returns:
- *     none
- *
- */
-void
-show_fore200_stats(char *intf, int argc, char **argv)
-{
-       int                     buf_len, stats_type;
-       struct air_cfg_rsp      *cfg;
-       struct air_vinfo_rsp    *stats;
-       struct atminfreq        air;
-
-       /*
-        * Get statistics type qualifier
-        */
-       if (!strcasecmp("phy", argv[0])) {
-               stats_type = SHOW_PHY;
-       } else if (!strcasecmp("dev", argv[0])) {
-               stats_type = SHOW_DEV;
-       } else if (!strcasecmp("atm", argv[0])) {
-               stats_type = SHOW_ATM;
-       } else if (!strcasecmp("aal0", argv[0])) {
-               stats_type = SHOW_AAL0;
-       } else if (!strcasecmp("aal4", argv[0])) {
-               stats_type = SHOW_AAL4;
-       } else if (!strcasecmp("aal5", argv[0])) {
-               stats_type = SHOW_AAL5;
-       } else if (!strcasecmp("driver", argv[0])) {
-               stats_type = SHOW_DRIVER;
-       } else {
-               fprintf(stderr, "%s: Illegal statistics type\n", prog);
-               exit(1);
-       }
-       argc--; argv++;
-
-       /*
-        * Get adapter configuration from the kernel
-        */
-       UM_ZERO(&air, sizeof(air));
-       air.air_opcode = AIOCS_INF_CFG;
-       strcpy(air.air_cfg_intf, intf);
-       buf_len = do_info_ioctl(&air, sizeof(struct air_cfg_rsp));
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       intf);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-       cfg = (struct air_cfg_rsp *) air.air_buf_addr;
-
-       /*
-        * Get vendor-specific statistics from the kernel
-        */
-       UM_ZERO(&air, sizeof(air));
-       air.air_opcode = AIOCS_INF_VST;
-       strcpy(air.air_vinfo_intf, intf);
-       buf_len = do_info_ioctl(&air, sizeof(struct air_vinfo_rsp) + 1024);
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       intf);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-       stats = (struct air_vinfo_rsp *) air.air_buf_addr;
-
-       /*
-        * Print the statistics
-        */
-       if ((size_t)buf_len < sizeof(struct air_vinfo_rsp) +
-                       sizeof(Fore_stats)) {
-               UM_FREE(stats);
-               UM_FREE(cfg);
-               return;
-       }
-
-       switch (stats_type) {
-       case SHOW_PHY:
-               switch (cfg->acp_media) {
-               case MEDIA_TAXI_100:
-               case MEDIA_TAXI_140:
-                       print_fore200_taxi(stats);
-                       break;
-               case MEDIA_OC3C:
-                       print_fore200_oc3(stats);
-                       break;
-               case MEDIA_OC12C:
-                       break;
-               default:
-                       break;
-               }
-               break;
-       case SHOW_DEV:
-               print_fore200_dev(stats);
-               break;
-       case SHOW_ATM:
-               print_fore200_atm(stats);
-               break;
-       case SHOW_AAL0:
-               print_fore200_aal0(stats);
-               break;
-       case SHOW_AAL4:
-               print_fore200_aal4(stats);
-               break;
-       case SHOW_AAL5:
-               print_fore200_aal5(stats);
-               break;
-       case SHOW_DRIVER:
-               print_fore200_driver(stats);
-               break;
-       }
-
-       UM_FREE(stats);
-       UM_FREE(cfg);
-}
-
-
-/*
- * Print Fore ASX-200 TAXI statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_taxi(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *) 
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(TAXI_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the physical layer info
-        */
-       printf("%10ld  %12ld\n",
-                       stats->st_taxi.taxi_bad_crc,
-                       stats->st_taxi.taxi_framing);
-}
-
-
-/*
- * Print Fore ASX-200 OC-3c statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_oc3(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(OC3_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the OC-3c info
-        */
-       printf("%7ld  %7ld  %7ld  %7ld  %7ld  %7ld  %7ld\n",
-                       stats->st_oc3.oc3_sect_bip8,
-                       stats->st_oc3.oc3_path_bip8,
-                       stats->st_oc3.oc3_line_bip24,
-                       stats->st_oc3.oc3_line_febe,
-                       stats->st_oc3.oc3_path_febe,
-                       stats->st_oc3.oc3_hec_corr,
-                       stats->st_oc3.oc3_hec_uncorr);
-}
-
-
-/*
- * Print Fore ASX-200 device statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_dev(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(DEV_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the device info
-        */
-       printf("%10ld  %10ld  %10ld  %10ld  %10ld  %s\n",
-                       stats->st_misc.buf1_sm_fail,
-                       stats->st_misc.buf1_lg_fail,
-                       stats->st_misc.buf2_sm_fail,
-                       stats->st_misc.buf2_lg_fail,
-                       stats->st_misc.rcvd_pdu_fail,
-                       (stats->st_misc.carrier_status ? "On" : "Off"));
-}
-
-
-/*
- * Print Fore ASX-200 ATM statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_atm(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(ATM_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the ATM layer info
-        */
-       printf("%10ld  %10ld  %10ld  %10ld  %10ld  %10ld\n",
-                       stats->st_atm.atm_rcvd,
-                       stats->st_atm.atm_xmit,
-                       stats->st_atm.atm_vpi_range,
-                       stats->st_atm.atm_vpi_noconn,
-                       stats->st_atm.atm_vci_range,
-                       stats->st_atm.atm_vci_noconn);
-}
-
-
-/*
- * Print Fore ASX-200 AAL 0 statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_aal0(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(AAL0_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the AAL 0 info
-        */
-       printf("%10ld  %10ld  %10ld\n",
-                       stats->st_aal0.aal0_rcvd,
-                       stats->st_aal0.aal0_xmit,
-                       stats->st_aal0.aal0_drops);
-}
-
-
-/*
- * Print Fore ASX-200 AAL 4 statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_aal4(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(AAL4_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the AAL 4 info
-        */
-       printf("%10ld  %10ld  %5ld  %5ld  %5ld  %9ld  %9ld  %5ld  %5ld\n",
-                       stats->st_aal4.aal4_rcvd,
-                       stats->st_aal4.aal4_xmit,
-                       stats->st_aal4.aal4_crc,
-                       stats->st_aal4.aal4_sar_cs,
-                       stats->st_aal4.aal4_drops,
-                       stats->st_aal4.aal4_pdu_rcvd,
-                       stats->st_aal4.aal4_pdu_xmit,
-                       stats->st_aal4.aal4_pdu_errs,
-                       stats->st_aal4.aal4_pdu_drops);
-}
-
-
-/*
- * Print Fore ASX-200 AAL 5 statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_aal5(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(AAL5_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the AAL 5 info
-        */
-       printf("%10ld  %10ld  %5ld  %5ld  %9ld  %9ld  %5ld  %5ld  %5ld\n",
-                       stats->st_aal5.aal5_rcvd,
-                       stats->st_aal5.aal5_xmit,
-                       stats->st_aal5.aal5_crc_len,
-                       stats->st_aal5.aal5_drops,
-                       stats->st_aal5.aal5_pdu_rcvd,
-                       stats->st_aal5.aal5_pdu_xmit,
-                       stats->st_aal5.aal5_pdu_crc,
-                       stats->st_aal5.aal5_pdu_errs,
-                       stats->st_aal5.aal5_pdu_drops);
-}
-
-
-/*
- * Print Fore ASX-200 device driver statistics
- * 
- * Arguments:
- *     vi      pointer to vendor-specific statistics to print
- *
- * Returns:
- *     none
- *
- */
-static void
-print_fore200_driver(struct air_vinfo_rsp *vi)
-{
-       Fore_stats      *stats;
-
-       /*
-        * Bump stats pointer past header info
-        */
-       stats = (Fore_stats *)
-                       ((u_long) vi + sizeof(struct air_vinfo_rsp));
-
-       /*
-        * Print a header
-        */
-       printf(DRIVER_STATS_HDR, get_adapter_name(vi->avsp_intf));
-       
-       /*
-        * Print the driver info
-        */
-       printf("%4ld  %4ld  %4ld  %4ld  %4ld  %4ld  %4ld  %4ld  %4ld  %4ld  %4ld  %4ld  %4ld\n",
-                       stats->st_drv.drv_xm_notact,
-                       stats->st_drv.drv_xm_full,
-                       stats->st_drv.drv_xm_maxpdu,
-                       stats->st_drv.drv_xm_segnoal,
-                       stats->st_drv.drv_xm_seglen,
-                       stats->st_drv.drv_xm_segdma,
-                       stats->st_drv.drv_rv_novcc,
-                       stats->st_drv.drv_rv_nosbf,
-                       stats->st_drv.drv_rv_nomb,
-                       stats->st_drv.drv_rv_ifull,
-                       stats->st_drv.drv_bf_segdma,
-                       stats->st_drv.drv_cm_full,
-                       stats->st_drv.drv_cm_nodma);
-
-}
diff --git a/sbin/atm/atm/atm_inet.c b/sbin/atm/atm/atm_inet.c
deleted file mode 100644 (file)
index 6015da2..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm_inet.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm_inet.c,v 1.4 2006/10/16 00:15:35 pavalos Exp $
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * IP support
- *
- */
-
-#include <sys/param.h>  
-#include <sys/socket.h> 
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h> 
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "atm.h"
-
-/*
- * Process add command for a TCP/IP PVC
- * 
- * Command format: 
- *     atm add pvc <intf> <vpi> <vci> <aal> <encaps> IP <netif>
- *             <IP addr> | dynamic
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description 
- *     app     pointer to AIOCAPVC structure
- *     intp    pointer to air_int_rsp structure with information
- *             about the physical interface that is the PVC is for.
- *
- * Returns:
- *     none
- *
- */
-void
-ip_pvcadd(int argc, char **argv, const struct cmd *cmdp, struct atmaddreq *app,
-          struct air_int_rsp *intp)
-{
-       char    *cp;
-       char    nhelp[128];
-       int     netif_no;
-       unsigned int    i, netif_pref_len;
-
-       /*
-        * Yet more validation
-        */
-       if (argc != 2) {
-               strcpy(nhelp, cmdp->help);
-               cp = strstr(nhelp, "<netif>");
-               if (cp)
-                       strcpy(cp, "ip {dyn|<dst>}");
-               fprintf(stderr, "%s: Invalid number of arguments:\n",
-                               prog);
-               fprintf(stderr, "\tformat is: %s%s %s\n",
-                               prefix, cmdp->name, nhelp);
-               exit(1);
-       }
-
-       /*
-        * Validate and set network interface
-        */
-       UM_ZERO(app->aar_pvc_intf, sizeof(app->aar_pvc_intf));
-       netif_pref_len = strlen(intp->anp_nif_pref);
-       cp = &argv[0][netif_pref_len];
-       netif_no = atoi(cp);
-       for (i=0; i<strlen(cp); i++) {
-               if (cp[i] < '0' || cp[i] > '9') {
-                       netif_no = -1;
-                       break;
-               }
-       }
-       if ((strlen(argv[0]) > sizeof(app->aar_pvc_intf) - 1) ||
-                       (netif_no < 0)) {
-               fprintf(stderr, "%s: Illegal network interface name\n",
-                               prog);
-               exit(1);
-       }
-       if (strncasecmp(intp->anp_nif_pref, argv[0], netif_pref_len) ||
-                       strlen (argv[0]) <= netif_pref_len ||
-                       netif_no > intp->anp_nif_cnt - 1) {
-               fprintf(stderr, "%s: network interface %s is not associated with interface %s\n",
-                               prog,
-                               argv[0],
-                               intp->anp_intf);
-               exit(1);
-       }
-       strcpy(app->aar_pvc_intf, argv[0]);
-       argc--; argv++;
-
-       /*
-        * Set PVC destination address
-        */
-       UM_ZERO(&app->aar_pvc_dst, sizeof(struct sockaddr));
-       if (strcasecmp(argv[0], "dynamic") == 0 ||
-                       strcasecmp(argv[0], "dyn") == 0) {
-
-               /*
-                * Destination is dynamically determined
-                */
-               app->aar_pvc_flags |= PVC_DYN;
-       } else {
-
-               /*
-                * Get destination IP address
-                */
-               struct sockaddr_in      *sin;
-
-               sin = (struct sockaddr_in *) &app->aar_pvc_dst;
-               sin->sin_addr.s_addr =
-                               get_ip_addr(argv[0])->sin_addr.s_addr;
-       }
-       argc--; argv++;
-}
-
diff --git a/sbin/atm/atm/atm_print.c b/sbin/atm/atm/atm_print.c
deleted file mode 100644 (file)
index 4133f94..0000000
+++ /dev/null
@@ -1,885 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm_print.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm_print.c,v 1.5 2006/10/16 00:15:35 pavalos Exp $
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * Print routines for "show" subcommand
- *
- */
-
-#include <sys/param.h>  
-#include <sys/socket.h> 
-#include <net/if.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h> 
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sigmgr.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_vc.h>
-#include <netatm/atm_ioctl.h>
-#include <netatm/ipatm/ipatm_var.h>
-#include <netatm/sigpvc/sigpvc_var.h>
-#include <netatm/spans/spans_var.h>
-#include <netatm/uni/uniip_var.h>
-#include <netatm/uni/unisig_var.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "atm.h"
-
-#define ARP_HDR \
-"Net Intf  Flags  Age  Origin\n"
-
-#define ASRV_HDR \
-"Net Intf  State     ATM Address\n"
-
-#define CFG_HDR \
-"Intf      Vendor    Model     Media           Bus   Serial No\n"
-
-#define IP_VCC_HDR \
-"Net Intf  VPI   VCI  State   Flags IP Address\n"
-
-#define INTF_HDR \
-"Interface  Sigmgr   State\n"
-
-#define NETIF_HDR \
-"Net Intf  Phy Intf  IP Address\n"
-
-#define VCC_HDR \
-"Interface  VPI   VCI  AAL   Type Dir    State    Encaps   Owner\n"
-
-#define VCC_STATS_HDR \
-"                        Input    Input  Input  Output   Output Output\n\
-Interface  VPI   VCI     PDUs    Bytes   Errs    PDUs    Bytes   Errs\n"
-
-#define VERSION_HDR \
-"Version\n"
-
-#define PHY_STATS_HDR \
-"             Input    Input  Input  Output   Output Output    Cmd\n\
-Interface     PDUs    Bytes   Errs    PDUs    Bytes   Errs   Errs\n"
-
-/*
- * External references
- */
-extern struct proto    protos[];
-extern struct aal      aals[];
-extern struct encaps   encaps[];
-
-/*
- * Local variables
- */
-static int     arp_hdr = 0;
-static int     asrv_hdr = 0;
-static int     cfg_hdr = 0;
-static int     ip_vcc_hdr = 0;
-static int     netif_hdr = 0;
-static int     vcc_hdr = 0;
-static int     vcc_stats_hdr = 0;
-static int     phy_stats_hdr = 0;
-static int     version_hdr = 0;
-
-/*
- * SIGPVC state definitions
- */
-static const struct state      sigpvc_states[] = {
-       { "ACTIVE",     SIGPVC_ACTIVE },
-       { "DETACH",     SIGPVC_DETACH },
-       { 0,            0 }
-};
-
-/*
- * SPANS state definitions
- */
-static const struct state      spans_states[] = {
-       { "ACTIVE",     SPANS_ACTIVE },
-       { "DETACH",     SPANS_DETACH },
-       { "INIT",       SPANS_INIT },
-       { "PROBE",      SPANS_PROBE },
-       { 0,            0 }
-};
-
-/*
- * UNISIG state definitions
- */
-static const struct state    unisig_states[] = {
-       { "NULL",       UNISIG_NULL },
-       { "ADR_WAIT",   UNISIG_ADDR_WAIT },
-       { "INIT",       UNISIG_INIT },
-       { "ACTIVE",     UNISIG_ACTIVE },
-       { "DETACH",     UNISIG_DETACH },
-       { 0,            0 }
-};
-
-/*
- * SIGPVC VCC state definitions
- */
-static const struct state      sigpvc_vcc_states[] = {
-       { "NULL",       VCCS_NULL },
-       { "ACTIVE",     VCCS_ACTIVE },
-       { "FREE",       VCCS_FREE },
-       { 0,            0 }
-};
-
-/*
- * SPANS VCC state definitions
- */
-static const struct state      spans_vcc_states[] = {
-       { "NULL",       SPANS_VC_NULL },
-       { "ACTIVE",     SPANS_VC_ACTIVE },
-       { "ACT_DOWN",   SPANS_VC_ACT_DOWN },
-       { "POPEN",      SPANS_VC_POPEN },
-       { "R_POPEN",    SPANS_VC_R_POPEN },
-       { "OPEN",       SPANS_VC_OPEN },
-       { "CLOSE",      SPANS_VC_CLOSE },
-       { "ABORT",      SPANS_VC_ABORT },
-       { "FREE",       SPANS_VC_FREE },
-       {0,             0 }
-};
-
-/*
- * UNISIG VCC state definitions
- */
-static const struct state      unisig_vcc_states[] = {
-       { "NULL",       UNI_NULL },
-       { "C_INIT",     UNI_CALL_INITIATED },
-       { "C_OUT_PR",   UNI_CALL_OUT_PROC },
-       { "C_DELIV",    UNI_CALL_DELIVERED },
-       { "C_PRES",     UNI_CALL_PRESENT },
-       { "C_REC",      UNI_CALL_RECEIVED },
-       { "CONN_REQ",   UNI_CONNECT_REQUEST },
-       { "C_IN_PR",    UNI_CALL_IN_PROC },
-       { "ACTIVE",     UNI_ACTIVE },
-       { "REL_REQ",    UNI_RELEASE_REQUEST },
-       { "REL_IND",    UNI_RELEASE_IND },
-       { "SSCF_REC",   UNI_SSCF_RECOV },
-       { "FREE",       UNI_FREE },
-       { "ACTIVE",     UNI_PVC_ACTIVE },
-       { "ACT_DOWN",   UNI_PVC_ACT_DOWN },
-       {0,                     0 }
-};
-
-/*
- * IP VCC state definitions
- */
-static const struct state      ip_vcc_states[] = {
-       { "FREE",       IPVCC_FREE },
-       { "PMAP",       IPVCC_PMAP },
-       { "POPEN",      IPVCC_POPEN },
-       { "PACCEPT",    IPVCC_PACCEPT },
-       { "ACTPENT",    IPVCC_ACTPENT },
-       { "ACTIVE",     IPVCC_ACTIVE },
-       { "CLOSED",     IPVCC_CLOSED },
-       { 0,            0 }
-};
-
-/*
- * ARP server state definitions
- */
-static const struct state      arpserver_states[] = {
-       { "NOT_CONF",   UIAS_NOTCONF },
-       { "SERVER",     UIAS_SERVER_ACTIVE },
-       { "PEND_ADR",   UIAS_CLIENT_PADDR },
-       { "POPEN",      UIAS_CLIENT_POPEN },
-       { "REGISTER",   UIAS_CLIENT_REGISTER },
-       { "ACTIVE",     UIAS_CLIENT_ACTIVE },
-       { 0,            0 }
-};
-
-/*
- * Supported signalling managers
- */
-static const struct proto_state        proto_states[] = {
-       { "SIGPVC",  sigpvc_states, sigpvc_vcc_states, ATM_SIG_PVC },
-       { "SPANS",   spans_states,  spans_vcc_states,  ATM_SIG_SPANS },
-       { "UNI 3.0", unisig_states, unisig_vcc_states, ATM_SIG_UNI30 },
-       { "UNI 3.1", unisig_states, unisig_vcc_states, ATM_SIG_UNI31 },
-       { "UNI 4.0", unisig_states, unisig_vcc_states, ATM_SIG_UNI40 },
-       { 0,         0,             0,                 0 }
-};
-
-/*
- * ATMARP origin values
- */
-static const struct state      arp_origins[] = {
-       { "LOCAL",      UAO_LOCAL },
-       { "PERM",       UAO_PERM },
-       { "REG",        UAO_REGISTER },
-       { "SCSP",       UAO_SCSP },
-       { "LOOKUP",     UAO_LOOKUP },
-       { "PEER_RSP",   UAO_PEER_RSP },
-       { "PEER_REQ",   UAO_PEER_REQ },
-       { 0,            0 }
-};
-
-
-/*
- * Print ARP table information
- * 
- * Arguments:
- *     ai      pointer to a struct air_arp_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_arp_info(struct air_arp_rsp *ai)
-{
-       int     i;
-       const char      *atm_addr, *ip_addr, *origin;
-       char    age[8], flags[32];
-       struct sockaddr_in      *sin;
-
-       /*
-        * Print a header if it hasn't been done yet.
-        */
-       if (!arp_hdr) {
-               printf(ARP_HDR);
-               arp_hdr = 1;
-       }
-
-       /*
-        * Format the addresses
-        */
-       atm_addr = format_atm_addr(&ai->aap_addr);
-       sin = (struct sockaddr_in *)&ai->aap_arp_addr;
-       ip_addr = format_ip_addr(&sin->sin_addr);
-
-       /*
-        * Decode the flags
-        */
-       UM_ZERO(flags, sizeof(flags));
-       if (ai->aap_flags & ARPF_VALID) {
-               strcat(flags, "V");
-       }
-       if (ai->aap_flags & ARPF_REFRESH) {
-               strcat(flags, "R");
-       }
-
-       /*
-        * Format the origin
-        */
-       for (i=0; arp_origins[i].s_name != NULL && 
-                       ai->aap_origin != arp_origins[i].s_id;
-                       i++);
-       if (arp_origins[i].s_name) {
-               origin = arp_origins[i].s_name;
-       } else {
-               origin = "-";
-       }
-
-       /*
-        * Format the age
-        */
-       UM_ZERO(age, sizeof(age));
-       if (!(ai->aap_flags & ARPF_VALID)) {
-               strcpy(age, "-");
-       } else {
-               sprintf(age, "%d", ai->aap_age);
-       }
-
-       /*
-        * Print the ARP information
-        */
-       printf("%-8s  %-5s  %3s  %s\n    ATM address = %s\n    IP address = %s\n",
-                       ai->aap_intf,
-                       flags,
-                       age,
-                       origin,
-                       atm_addr,
-                       ip_addr);
-}
-
-
-/*
- * Print ARP server information
- * 
- * Arguments:
- *     si      pointer to a struct air_asrv_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_asrv_info(struct air_asrv_rsp *si)
-{
-       int             i;
-       const char      *atm_addr, *state;
-       struct in_addr  *addr;
-
-       /*
-        * Print a header if it hasn't been done yet.
-        */
-       if (!asrv_hdr) {
-               printf(ASRV_HDR);
-               asrv_hdr = 1;
-       }
-
-       /*
-        * Format the ATM address of the ARP server
-        */
-       atm_addr = format_atm_addr(&si->asp_addr);
-
-       /*
-        * Format the server state
-        */
-       for (i=0; arpserver_states[i].s_name != NULL && 
-                       si->asp_state != arpserver_states[i].s_id;
-                       i++);
-       if (arpserver_states[i].s_name) {
-               state = arpserver_states[i].s_name;
-       } else {
-               state = "-";
-       }
-
-       /*
-        * Print the ARP server information
-        */
-       printf("%-8s  %-8s  %s\n",
-                       si->asp_intf,
-                       state,
-                       atm_addr);
-
-       /*
-        * Format and print the LIS prefixes
-        */
-       if (si->asp_nprefix) {
-               addr = (struct in_addr *)((u_long)si +
-                               sizeof(struct air_asrv_rsp));
-               printf("    LIS = ");
-               for (i = 0; i < si->asp_nprefix; i++) {
-                       printf("%s", inet_ntoa(*addr));
-                       addr++;
-                       printf("/0x%0lx", (unsigned long)ntohl(addr->s_addr));
-                       addr++;
-                       if (i < si->asp_nprefix -1)
-                               printf(", ");
-               }
-               printf("\n");
-       }
-}
-
-
-/*
- * Print adapter configuration information
- * 
- * Arguments:
- *     si      pointer to a struct air_cfg_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_cfg_info(struct air_cfg_rsp *si)
-{
-       const char      *adapter, *bus, *media, *vendor;
-
-       /*
-        * Print a header if it hasn't been done yet.
-        */
-       if (!cfg_hdr) {
-               printf(CFG_HDR);
-               cfg_hdr = 1;
-       }
-
-       /*
-        * Format the vendor name and adapter type
-        */
-       vendor = get_vendor(si->acp_vendor);
-       adapter = get_adapter(si->acp_device);
-
-       /*
-        * Format the communications medium
-        */
-       media = get_media_type(si->acp_media);
-       bus = get_bus_type(si->acp_bustype);
-
-       /*
-        * Print the ARP server information
-        */
-       printf("%-8s  %-8s  %-8s  %-14s  %-4s  %ld\n",
-                       si->acp_intf,
-                       vendor,
-                       adapter,
-                       media,
-                       bus,
-                       si->acp_serial);
-       printf("    MAC address = %s\n",
-                       format_mac_addr(&si->acp_macaddr));
-       printf("    Hardware version = %s\n", si->acp_hard_vers);
-       printf("    Firmware version = %s\n", si->acp_firm_vers);
-}
-
-
-/*
- * Print interface information
- * 
- * Arguments:
- *     ni      pointer to a struct air_int_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_intf_info(struct air_int_rsp *ni)
-{
-       int     i;
-       char    nif_names[(IFNAMSIZ *2)+4];
-       char    *atm_addr;
-       const char      *sigmgr = "-", *state_name = "-";
-       const struct state      *s_t;
-
-       /*
-        * Print a header
-        */
-       printf(INTF_HDR);
-
-       /*
-        * Translate signalling manager name
-        */
-       for (i=0; proto_states[i].p_state != NULL; i++)
-               if (ni->anp_sig_proto == proto_states[i].p_id)
-                       break;
-       if (proto_states[i].p_state != NULL)
-               sigmgr = proto_states[i].p_name;
-
-       /*
-        * Get the signalling manager state
-        */
-       if (proto_states[i].p_state != NULL) {
-               s_t = proto_states[i].p_state;
-               for (i=0; s_t[i].s_name != NULL; i++)
-                       if (ni->anp_sig_state == s_t[i].s_id)
-                               break;
-               if (s_t[i].s_name != NULL)
-                       state_name = s_t[i].s_name;
-       }
-
-       /*
-        * Format the ATM address
-        */
-       atm_addr = format_atm_addr(&ni->anp_addr);
-
-       /*
-        * Get the range of NIFs on the physical interface
-        */
-       UM_ZERO(nif_names, sizeof(nif_names));
-       if (strlen(ni->anp_nif_pref) == 0) {
-               strcpy(nif_names, "-");
-       } else {
-               strcpy(nif_names, ni->anp_nif_pref);
-               strcat(nif_names, "0");
-               if (ni->anp_nif_cnt > 1) {
-                       strcat(nif_names, " - ");
-                       strcat(nif_names, ni->anp_nif_pref);
-                       sprintf(&nif_names[strlen(nif_names)], "%d",
-                                       ni->anp_nif_cnt-1);
-               }
-       }
-       
-
-       /*
-        * Print the interface information
-        */
-       printf("%-9s  %-7s  %s\n",
-                       ni->anp_intf,
-                       sigmgr,
-                       state_name);
-       printf("    ATM address = %s\n", atm_addr);
-       printf("    Network interfaces: %s\n", nif_names);
-}
-
-
-/*
- * Print IP address map information
- * 
- * Arguments:
- *     ai      pointer to a struct air_arp_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_ip_vcc_info(struct air_ip_vcc_rsp *ai)
-{
-       int     i;
-       const char      *ip_addr, *state;
-       char    flags[32], vpi_vci[16];
-       struct sockaddr_in      *sin;
-
-       /*
-        * Print a header if it hasn't been done yet.
-        */
-       if (!ip_vcc_hdr) {
-               printf(IP_VCC_HDR);
-               ip_vcc_hdr = 1;
-       }
-
-       /*
-        * Format the IP address
-        */
-       sin = (struct sockaddr_in *)&ai->aip_dst_addr;
-       ip_addr = format_ip_addr(&sin->sin_addr);
-
-       /*
-        * Format the VPI/VCI
-        */
-       if (ai->aip_vpi == 0 && ai->aip_vci == 0) {
-               strcpy(vpi_vci, "  -     -");
-       } else {
-               sprintf(vpi_vci, "%3d %5d", ai->aip_vpi, ai->aip_vci);
-       }
-
-       /*
-        * Decode VCC flags
-        */
-       UM_ZERO(flags, sizeof(flags));
-       if (ai->aip_flags & IVF_PVC) {
-               strcat(flags, "P");
-       }
-       if (ai->aip_flags & IVF_SVC) {
-               strcat(flags, "S");
-       }
-       if (ai->aip_flags & IVF_LLC) {
-               strcat(flags, "L");
-       }
-       if (ai->aip_flags & IVF_MAPOK) {
-               strcat(flags, "M");
-       }
-       if (ai->aip_flags & IVF_NOIDLE) {
-               strcat(flags, "N");
-       }
-
-       /*
-        * Get the state of the VCC
-        */
-       for (i=0; ip_vcc_states[i].s_name != NULL && 
-                       ai->aip_state != ip_vcc_states[i].s_id;
-                       i++);
-       if (ip_vcc_states[i].s_name) {
-               state = ip_vcc_states[i].s_name;
-       } else {
-               state = "-";
-       }
-
-       /*
-        * Print the IP VCC information
-        */
-       printf("%-8s  %9s  %-7s %-5s %s\n",
-                       ai->aip_intf,
-                       vpi_vci,
-                       state,
-                       flags,
-                       ip_addr);
-}
-
-
-/*
- * Print network interface information
- * 
- * Arguments:
- *     ni      pointer to a struct air_int_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_netif_info(struct air_netif_rsp *ni)
-{
-       const char              *ip_addr;
-       struct sockaddr_in      *sin;
-
-       /*
-        * Print a header
-        */
-       if (!netif_hdr) {
-               netif_hdr++;
-               printf(NETIF_HDR);
-       }
-
-       /*
-        * Format the protocol address
-        */
-       sin = (struct sockaddr_in *)&ni->anp_proto_addr;
-       ip_addr = format_ip_addr(&sin->sin_addr);
-
-       /*
-        * Print the network interface information
-        */
-       printf("%-8s  %-8s  %s\n",
-                       ni->anp_intf,
-                       ni->anp_phy_intf,
-                       ip_addr);
-}
-
-
-/*
- * Print physical interface statistics
- * 
- * Arguments:
- *     pi      pointer to a struct air_phy_stat_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_intf_stats(struct air_phy_stat_rsp *pi)
-{
-       /*
-        * Print a header if it hasn't already been done
-        */
-       if (!phy_stats_hdr) {
-               printf(PHY_STATS_HDR);
-               phy_stats_hdr = 1;
-       }
-
-       /*
-        * Print the interface statistics
-        */
-       printf("%-9s  %7ld %8ld  %5ld %7ld %8ld  %5ld  %5ld\n",
-                       pi->app_intf,
-                       pi->app_ipdus,
-                       pi->app_ibytes,
-                       pi->app_ierrors,
-                       pi->app_opdus,
-                       pi->app_obytes,
-                       pi->app_oerrors,
-                       pi->app_cmderrors);
-}
-
-
-/*
- * Print VCC statistics
- * 
- * Arguments:
- *     vi      pointer to VCC statistics to print
- *
- * Returns:
- *     none
- *
- */
-void
-print_vcc_stats(struct air_vcc_rsp *vi)
-{
-
-       /*
-        * Print a header if it hasn't already been done
-        */
-       if (!vcc_stats_hdr) {
-               printf(VCC_STATS_HDR);
-               vcc_stats_hdr = 1;
-       }
-
-       /*
-        * Print the VCC statistics
-        */
-       printf("%-9s  %3d  %4d",
-                       vi->avp_intf,
-                       vi->avp_vpi,
-                       vi->avp_vci);
-       if ( vi->avp_type & VCC_IN )
-               printf ( "  %7ld %8ld  %5ld",
-                       vi->avp_ipdus,
-                       vi->avp_ibytes,
-                       vi->avp_ierrors);
-       else
-               printf ( "        -        -      -" );
-
-       if ( vi->avp_type & VCC_OUT )
-               printf ( " %7ld %8ld  %5ld\n",
-                       vi->avp_opdus,
-                       vi->avp_obytes,
-                       vi->avp_oerrors);
-       else
-               printf ( "       -        -      -\n" );
-}
-
-
-/*
- * Print VCC information
- * 
- * Arguments:
- *     vi      pointer to a struct air_vcc_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_vcc_info(struct air_vcc_rsp *vi)
-{
-       int     i;
-       const char      *aal_name = "-" , *encaps_name = "-", *owner_name = "-";
-       const char      *state_name = "-", *type_name = "-";
-       char    dir_name[10];
-       const struct state      *s_t;
-
-       /*
-        * Print a header if it hasn't already been done
-        */
-       if (!vcc_hdr) {
-               printf(VCC_HDR);
-               vcc_hdr = 1;
-       }
-
-       /*
-        * Translate AAL
-        */
-       for (i=0; aals[i].a_name != NULL; i++)
-               if (vi->avp_aal == aals[i].a_id)
-                       break;
-       if (aals[i].a_name)
-               aal_name = aals[i].a_name;
-
-       /*
-        * Translate VCC type
-        */
-       if (vi->avp_type & VCC_PVC)
-               type_name = "PVC";
-       else if (vi->avp_type & VCC_SVC)
-               type_name = "SVC";
-       /*
-        * Translate VCC direction
-        */
-       UM_ZERO(dir_name, sizeof(dir_name));
-       if (vi->avp_type & VCC_IN)
-               strcat(dir_name, "In");
-       if (vi->avp_type & VCC_OUT)
-               strcat(dir_name, "Out");
-       if (strlen(dir_name) == 0)
-               strcpy(dir_name, "-");
-
-       /*
-        * Translate state
-        */
-       for (i=0; proto_states[i].p_state != NULL; i++)
-               if (vi->avp_sig_proto == proto_states[i].p_id)
-                       break;
-       if (proto_states[i].p_state) {
-               s_t = proto_states[i].v_state;
-               for (i=0; s_t[i].s_name != NULL; i++)
-                       if (vi->avp_state == s_t[i].s_id)
-                               break;
-               if (s_t[i].s_name)
-                       state_name = s_t[i].s_name;
-       }
-
-       /*
-        * Translate encapsulation
-        */
-       for (i=0; encaps[i].e_name != NULL; i++)
-               if (vi->avp_encaps == encaps[i].e_id)
-                       break;
-       if (encaps[i].e_name)
-               encaps_name = encaps[i].e_name;
-
-       /*
-        * Print the VCC information
-        */
-       printf("%-9s  %3d %5d  %-4s  %-4s %-5s  %-8s %-8s ",
-                       vi->avp_intf,
-                       vi->avp_vpi,
-                       vi->avp_vci,
-                       aal_name,
-                       type_name,
-                       dir_name,
-                       state_name,
-                       encaps_name);
-
-       /*
-        * Print VCC owners' names
-        */
-       for (i = 0, owner_name = vi->avp_owners;
-                       i < O_CNT - 1 && strlen(owner_name);
-                       i++, owner_name += (T_ATM_APP_NAME_LEN + 1)) {
-               if (i > 0)
-                       printf(", ");
-               printf("%s", owner_name);
-       }
-       if (i == 0)
-               printf("-");
-       printf("\n");
-
-       /*
-        * Print destination address if it's an SVC
-        */
-       if (vi->avp_type & VCC_SVC) {
-               printf("    Dest = %s\n",
-                               format_atm_addr(&vi->avp_daddr));
-       }
-}
-
-
-/*
- * Print network interface information
- * 
- * Arguments:
- *     ni      pointer to a struct air_int_rsp
- *
- * Returns:
- *     none
- *
- */
-void
-print_version_info(struct air_version_rsp *vi)
-{
-       char                    version_str[80];
-
-       /*
-        * Print a header
-        */
-       if (!version_hdr) {
-               version_hdr++;
-               printf(VERSION_HDR);
-       }
-
-       /*
-        * Print the interface information
-        */
-       sprintf(version_str, "%d.%d",
-                       ATM_VERS_MAJ(vi->avp_version),
-                       ATM_VERS_MIN(vi->avp_version));
-       printf("%7s\n", version_str);
-}
diff --git a/sbin/atm/atm/atm_set.c b/sbin/atm/atm/atm_set.c
deleted file mode 100644 (file)
index 978f87b..0000000
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm_set.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm_set.c,v 1.7 2008/04/20 13:44:24 swildner Exp $
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * Routines for "set" subcommand
- *
- */
-
-#include <sys/param.h>  
-#include <sys/socket.h> 
-#include <sys/sockio.h> 
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h> 
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_ioctl.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "atm.h"
-
-/*
- * Process ATM ARP server set command
- *
- * Command format:
- *     atm set arpserver <interface_name> <atm-address> <IP prefix> ...
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description
- *
- * Returns:
- *     none
- *
- */
-void
-set_arpserver(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int                     i, len, prefix_len = 0, rc, s;
-       char                    *intf;
-       Atm_addr                server;
-       struct sockaddr_in      *lis;
-       struct sockaddr_in      if_mask;
-       struct atmsetreq        asr;
-       struct atminfreq        air;
-       struct air_netif_rsp    *int_info;
-       struct {
-               struct in_addr  ip_addr;
-               struct in_addr  ip_mask;
-       } prefix_buf[64];
-
-       /*
-        * Validate interface name
-        */
-       check_netif_name(argv[0]);
-       intf = argv[0];
-       argc--; argv++;
-
-       /*
-        * Get the ARP server's ATM address
-        */
-       UM_ZERO(&server, sizeof(server));
-       if (strcasecmp(argv[0], "local")) {
-               /*
-                * ARP server NSAP address is provided
-                */
-               server.address_format = T_ATM_ENDSYS_ADDR;
-               server.address_length = sizeof(Atm_addr_nsap);
-               if (get_hex_atm_addr(argv[0],
-                                       (u_char *)server.address,
-                                       sizeof(Atm_addr_nsap)) !=
-                               sizeof(Atm_addr_nsap)) {
-                       fprintf(stderr, "%s: Invalid ARP server address\n",
-                                       prog);
-                       exit(1);
-               }
-               if (argc > 1) {
-                       fprintf(stderr, "%s: Invalid number of arguments\n",
-                                       prog);
-                       exit(1);
-               }
-               prefix_len = 0;
-       } else {
-               argc--; argv++;
-
-               /*
-                * This host is the ARP server
-                */
-               server.address_format = T_ATM_ABSENT;
-               server.address_length = 0;
-
-               /*
-                * Get interface information from the kernel.  We need
-                * to get the IP address and the subnet mask associated
-                * with the network interface and insert them into the
-                * list of permitted LIS prefixes.
-                */
-               len = sizeof(struct air_netif_rsp);
-               UM_ZERO(&air, sizeof(air));
-               air.air_opcode = AIOCS_INF_NIF;
-               strcpy(air.air_int_intf, intf);
-               len = do_info_ioctl(&air, len);
-               if (len < 0) {
-                       fprintf(stderr, "%s: ", prog);
-                       switch (errno) {
-                       case ENOPROTOOPT:
-                       case EOPNOTSUPP:
-                               perror("Internal error");
-                               break;
-                       case ENXIO:
-                               fprintf(stderr, "%s is not an ATM device\n",
-                                               intf);
-                               break;
-                       default:
-                               perror("ioctl (AIOCINFO)");
-                               break;
-                       }
-                       exit(1);
-               }
-               int_info = (struct air_netif_rsp *) air.air_buf_addr;
-               lis = (struct sockaddr_in *)&int_info->anp_proto_addr;
-               prefix_buf[0].ip_addr = lis->sin_addr;
-               UM_FREE(int_info);
-       
-               rc = get_subnet_mask(intf, &if_mask);
-               if (rc) {
-                       fprintf(stderr, "%s: Can't get subnet mask for %s\n",
-                                       prog, intf);
-               }
-               prefix_buf[0].ip_mask = if_mask.sin_addr;
-               prefix_buf[0].ip_addr.s_addr &=
-                               prefix_buf[0].ip_mask.s_addr;
-
-               /*
-                * Get the prefixes of the LISs that we'll support
-                */
-               for (i = 1; argc; i++, argc--, argv++) {
-                       rc = parse_ip_prefix(argv[0],
-                                       (struct in_addr *)&prefix_buf[i]);
-                       if (rc != 0) {
-                               fprintf(stderr, "%s: Invalid IP prefix value \'%s\'\n",
-                                       prog, argv[0]);
-                               exit(1);
-                       }
-               }
-
-               /*
-                * Compress the prefix list
-                */
-               prefix_len = compress_prefix_list((struct in_addr *)prefix_buf,
-                               i * sizeof(struct in_addr) * 2);
-       }
-
-       /*
-        * Build ioctl request
-        */
-       UM_ZERO(&asr, sizeof(asr));
-       asr.asr_opcode = AIOCS_SET_ASV;
-       strncpy(asr.asr_arp_intf, intf, sizeof(asr.asr_arp_intf));
-       asr.asr_arp_addr = server;
-       asr.asr_arp_subaddr.address_format = T_ATM_ABSENT;
-       asr.asr_arp_subaddr.address_length = 0;
-       if (prefix_len)
-               asr.asr_arp_pbuf = (caddr_t)prefix_buf;
-       else
-               asr.asr_arp_pbuf = (caddr_t)0;
-       asr.asr_arp_plen = prefix_len;
-
-       /*
-        * Pass the new ARP server address to the kernel
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCSET, (caddr_t)&asr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EOPNOTSUPP:
-               case EPROTONOSUPPORT:
-                       perror("Internal error");
-                       break;
-               case EINVAL:
-                       fprintf(stderr, "Invalid parameter\n");
-                       break;
-               case ENOMEM:
-                       fprintf(stderr, "Kernel memory exhausted\n");
-                       break;
-               case ENETDOWN:
-                       fprintf(stderr, "ATM network is inoperable\n");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use set subcommand\n");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM interface\n", intf);
-                       break;
-               case ENOENT:
-                       fprintf(stderr, "Signalling manager not attached\n");
-                       break;
-               case ENOPROTOOPT:
-                       fprintf(stderr,
-                               "%s does not have an IP address configured\n",
-                               intf);
-                       break;
-               default:
-                       perror("Ioctl (AIOCSET) ARPSERVER address");
-                       break;
-               }
-               exit(1);
-       }
-
-       close(s);
-}
-
-
-/*
- * Process set MAC address command
- *
- * Command format:
- *     atm set mac <interface_name> <MAC address>
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description
- *
- * Returns:
- *     none
- *
- */
-void
-set_macaddr(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int                     s;
-       char                    *intf;
-       struct mac_addr         mac;
-       struct atmsetreq        asr;
-
-       /*
-        * Validate interface name
-        */
-       if (strlen(argv[0]) > sizeof(asr.asr_mac_intf) - 1) {
-               fprintf(stderr, "%s: Illegal interface name\n", prog);
-               exit(1);
-       }
-       intf = argv[0];
-       argc--; argv++;
-
-       /*
-        * Get the MAC address provided by the user
-        */
-       if (get_hex_atm_addr(argv[0], (u_char *)&mac, sizeof(mac)) !=
-                       sizeof(mac)) {
-               fprintf(stderr, "%s: Invalid MAC address\n", prog);
-               exit(1);
-       }
-
-       /*
-        * Build ioctl request
-        */
-       asr.asr_opcode = AIOCS_SET_MAC;
-       strncpy(asr.asr_mac_intf, intf, sizeof(asr.asr_mac_intf));
-       UM_COPY(&mac, &asr.asr_mac_addr, sizeof(asr.asr_mac_addr));
-
-       /*
-        * Pass the new address to the kernel
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCSET, (caddr_t)&asr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EOPNOTSUPP:
-               case EPROTONOSUPPORT:
-                       perror("Internal error");
-                       break;
-               case EADDRINUSE:
-                       fprintf(stderr, "Interface must be detached to set MAC address\n");
-                       break;
-               case EINVAL:
-                       fprintf(stderr, "Invalid parameter\n");
-                       break;
-               case ENOMEM:
-                       fprintf(stderr, "Kernel memory exhausted\n");
-                       break;
-               case ENETDOWN:
-                       fprintf(stderr, "ATM network is inoperable\n");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use set subcommand\n");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("Ioctl (AIOCSET) MAC address");
-                       break;
-               }
-               exit(1);
-       }
-
-       close(s);
-}
-
-
-/*
- * Process network interface set command
- *
- * Command format:
- *     atm set netif <interface_name> <prefix_name> <count>
- *
- * Arguments:
- *     argc    number of arguments to command
- *     argv    pointer to argument strings
- *     cmdp    pointer to command description
- *
- * Returns:
- *     none
- *
- */
-void
-set_netif(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       struct atmsetreq        anr;
-       char                    str[16];
-       char                    *cp;
-       int                     nifs, s;
-
-       /*
-        * Set IOCTL opcode
-        */
-       anr.asr_opcode = AIOCS_SET_NIF;
-
-       /*
-        * Validate interface name
-        */
-       if (strlen(argv[0]) > sizeof(anr.asr_nif_intf) - 1) {
-               fprintf(stderr, "%s: Illegal interface name\n", prog);
-               exit(1);
-       }
-       strcpy(anr.asr_nif_intf, argv[0]);
-       argc--; argv++;
-
-       /*
-        * Validate network interface name prefix
-        */
-       if ((strlen(argv[0]) > sizeof(anr.asr_nif_pref) - 1) ||
-                       (strpbrk(argv[0], "0123456789"))) {
-               fprintf(stderr, "%s: Illegal network interface prefix\n", prog);
-               exit(1);
-       }
-       strcpy(anr.asr_nif_pref, argv[0]);
-       argc--; argv++;
-
-       /*
-        * Validate interface count
-        */
-       nifs = (int) strtol(argv[0], &cp, 0);
-       if ((*cp != '\0') || (nifs < 0) || (nifs > MAX_NIFS)) {
-               fprintf(stderr, "%s: Invalid interface count\n", prog);
-               exit(1);
-       }
-       anr.asr_nif_cnt = nifs;
-
-       /*
-        * Make sure the resulting name won't be too long
-        */
-       sprintf(str, "%d", nifs - 1);
-       if ((strlen(str) + strlen(anr.asr_nif_pref)) >
-                       sizeof(anr.asr_nif_intf) - 1) {
-               fprintf(stderr, "%s: Network interface prefix too long\n", prog);
-               exit(1);
-       }
-
-       /*
-        * Tell the kernel to do it
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCSET, (caddr_t)&anr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               perror("ioctl (AIOCSET) set NIF");
-               exit(1);
-       }
-       close(s);
-}
-
-
-/*
- * Process set NSAP prefix command
- *
- * Command format:
- *     atm set nsap <interface_name> <NSAP prefix>
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description
- *
- * Returns:
- *     none
- *
- */
-void
-set_prefix(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int                     s;
-       char                    *intf;
-       u_char                  pfix[13];
-       struct atmsetreq        asr;
-
-       /*
-        * Validate interface name
-        */
-       if (strlen(argv[0]) > sizeof(asr.asr_prf_intf) - 1) {
-               fprintf(stderr, "%s: Illegal interface name\n", prog);
-               exit(1);
-       }
-       intf = argv[0];
-       argc--; argv++;
-
-       /*
-        * Get the prefix provided by the user
-        */
-       if (get_hex_atm_addr(argv[0], pfix, sizeof(pfix)) !=
-                       sizeof(pfix)) {
-               fprintf(stderr, "%s: Invalid NSAP prefix\n", prog);
-               exit(1);
-       }
-
-       /*
-        * Build ioctl request
-        */
-       asr.asr_opcode = AIOCS_SET_PRF;
-       strncpy(asr.asr_prf_intf, intf, sizeof(asr.asr_prf_intf));
-       UM_COPY(pfix, asr.asr_prf_pref, sizeof(asr.asr_prf_pref));
-
-       /*
-        * Pass the new prefix to the kernel
-        */
-       s = socket(AF_ATM, SOCK_DGRAM, 0);
-       if (s < 0) {
-               sock_error(errno);
-       }
-       if (ioctl(s, AIOCSET, (caddr_t)&asr) < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case EOPNOTSUPP:
-               case EPROTONOSUPPORT:
-                       perror("Internal error");
-                       break;
-               case EALREADY:
-                       fprintf(stderr, "NSAP prefix is already set\n");
-                       break;
-               case EINVAL:
-                       fprintf(stderr, "Invalid parameter\n");
-                       break;
-               case ENOMEM:
-                       fprintf(stderr, "Kernel memory exhausted\n");
-                       break;
-               case ENETDOWN:
-                       fprintf(stderr, "ATM network is inoperable\n");
-                       break;
-               case EPERM:
-                       fprintf(stderr, "Must be super user to use set subcommand\n");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("Ioctl (AIOCSET) NSAP prefix");
-                       break;
-               }
-               exit(1);
-       }
-
-       close(s);
-}
diff --git a/sbin/atm/atm/atm_show.c b/sbin/atm/atm/atm_show.c
deleted file mode 100644 (file)
index c183649..0000000
+++ /dev/null
@@ -1,1149 +0,0 @@
-/*
- *
- * ===================================
- * HARP  |  Host ATM Research Platform
- * ===================================
- *
- *
- * This Host ATM Research Platform ("HARP") file (the "Software") is
- * made available by Network Computing Services, Inc. ("NetworkCS")
- * "AS IS".  NetworkCS does not provide maintenance, improvements or
- * support of any kind.
- *
- * NETWORKCS MAKES NO WARRANTIES OR REPRESENTATIONS, EXPRESS OR IMPLIED,
- * INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE, AS TO ANY ELEMENT OF THE
- * SOFTWARE OR ANY SUPPORT PROVIDED IN CONNECTION WITH THIS SOFTWARE.
- * In no event shall NetworkCS be responsible for any damages, including
- * but not limited to consequential damages, arising from or relating to
- * any use of the Software or related support.
- *
- * Copyright 1994-1998 Network Computing Services, Inc.
- *
- * Copies of this Software may be made, however, the above copyright
- * notice must be reproduced on all copies.
- *
- *     @(#) $FreeBSD: src/sbin/atm/atm/atm_show.c,v 1.3.2.1 2000/07/01 06:02:14 ps Exp $
- *     @(#) $DragonFly: src/sbin/atm/atm/atm_show.c,v 1.5 2006/10/16 00:15:35 pavalos Exp $
- */
-
-/*
- * User configuration and display program
- * --------------------------------------
- *
- * Routines for "show" subcommand
- *
- */
-
-#include <sys/param.h>  
-#include <sys/socket.h> 
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netatm/port.h>
-#include <netatm/atm.h>
-#include <netatm/atm_if.h> 
-#include <netatm/atm_sap.h>
-#include <netatm/atm_sys.h>
-#include <netatm/atm_vc.h>
-#include <netatm/atm_ioctl.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "atm.h"
-
-/*
- * Local functions
- */
-static int     vcc_compare(const void *, const void *);
-static int     ip_vcc_compare(const void *, const void *);
-static int     arp_compare(const void *, const void *);
-
-
-/*
- * Process show ARP command
- * 
- * Command format: 
- *     atm show ARP [<ip-addr>]
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-void
-show_arp(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int                     buf_len, arp_info_len;
-       struct atminfreq        air;
-       struct air_arp_rsp      *arp_info, *arp_info_base;
-       struct sockaddr_in      *sin;
-       union {
-               struct sockaddr_in      sin;
-               struct sockaddr         sa;
-       } host_addr;
-
-       /*
-        * Get IP address of specified host name
-        */
-       UM_ZERO(&host_addr, sizeof(host_addr));
-       host_addr.sa.sa_family = AF_INET;
-       if (argc) {
-               sin = get_ip_addr(argv[0]);
-               if (!sin) {
-                       fprintf(stderr, "%s: host \'%s\' not found\n",
-                                       prog, argv[0]);
-                       exit(1);
-               }
-               host_addr.sin.sin_addr.s_addr = sin->sin_addr.s_addr;
-       } else {
-               host_addr.sin.sin_addr.s_addr = INADDR_ANY;
-       }
-
-       /*
-        * Get ARP information from the kernel
-        */
-       UM_ZERO(&air, sizeof(air));
-       buf_len = sizeof(struct air_arp_rsp) * 10;
-       air.air_opcode = AIOCS_INF_ARP;
-       air.air_arp_addr = host_addr.sa;
-       arp_info_len = do_info_ioctl(&air, buf_len);
-       if (arp_info_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "not an ATM device\n");
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-       arp_info_base = arp_info =
-                       (struct air_arp_rsp *) air.air_buf_addr;
-
-       /*
-        * Sort the ARP table
-        */
-       qsort((void *) arp_info,
-                       arp_info_len / sizeof(struct air_arp_rsp),
-                       sizeof(struct air_arp_rsp),
-                       arp_compare);
-
-       /*
-        * Print the relevant information
-        */
-       while (arp_info_len > 0) {
-               print_arp_info(arp_info);
-               arp_info++;
-               arp_info_len -= sizeof(struct air_arp_rsp);
-       }
-
-       /*
-        * Release the information from the kernel
-        */
-       UM_FREE(arp_info_base);
-}
-
-
-/*
- * Process show ATM ARP server command
- * 
- * Command format: 
- *     atm show arpserver [<interface-name>]
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-void
-show_arpserv(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int     asrv_info_len, buf_len = sizeof(struct air_asrv_rsp) * 3;
-       struct atminfreq        air;
-       struct air_asrv_rsp     *asrv_info, *asrv_info_base;
-
-       /*
-        * Validate interface name
-        */
-       UM_ZERO(air.air_int_intf, sizeof(air.air_int_intf));
-       if (argc) {
-               if (strlen(argv[0]) > IFNAMSIZ - 1) {
-                       fprintf(stderr, "%s: Illegal interface name\n",
-                                       prog);
-                       exit(1);
-               }
-               strcpy(air.air_int_intf, argv[0]);
-               argc--; argv++;
-       }
-
-       /*
-        * Get interface information from the kernel
-        */
-       air.air_opcode = AIOCS_INF_ASV;
-       buf_len = do_info_ioctl(&air, buf_len);
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-
-       /*
-        * Print the interface information
-        */
-       asrv_info_base = asrv_info =
-                       (struct air_asrv_rsp *) air.air_buf_addr;
-       for (; (size_t)buf_len >= sizeof(struct air_asrv_rsp);
-                       asrv_info = (struct air_asrv_rsp *)
-                               ((u_long)asrv_info + asrv_info_len),
-                       buf_len -= asrv_info_len) {
-               print_asrv_info(asrv_info);
-               asrv_info_len = sizeof(struct air_asrv_rsp) +
-                               asrv_info->asp_nprefix *
-                               sizeof(struct in_addr) * 2;
-       }
-       UM_FREE(asrv_info_base);
-}
-
-
-/*
- * Process show ATM adapter configuration command
- * 
- * Command format: 
- *     atm show config [<interface-name>]
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-void
-show_config(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int     buf_len = sizeof(struct air_asrv_rsp) * 3;
-       struct atminfreq        air;
-       struct air_cfg_rsp      *cfg_info, *cfg_info_base;
-
-       /*
-        * Validate interface name
-        */
-       UM_ZERO(air.air_cfg_intf, sizeof(air.air_cfg_intf));
-       if (argc) {
-               if (strlen(argv[0]) > IFNAMSIZ - 1) {
-                       fprintf(stderr, "%s: Illegal interface name\n",
-                                       prog);
-                       exit(1);
-               }
-               strcpy(air.air_cfg_intf, argv[0]);
-               argc--; argv++;
-       }
-
-       /*
-        * Get configuration information from the kernel
-        */
-       air.air_opcode = AIOCS_INF_CFG;
-       buf_len = do_info_ioctl(&air, buf_len);
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-
-       /*
-        * Print the interface information
-        */
-       cfg_info_base = cfg_info =
-                       (struct air_cfg_rsp *) air.air_buf_addr;
-       for (; (size_t)buf_len >= sizeof(struct air_cfg_rsp); cfg_info++,
-                       buf_len -= sizeof(struct air_cfg_rsp)) {
-               print_cfg_info(cfg_info);
-       }
-       UM_FREE(cfg_info_base);
-}
-
-
-/*
- * Process show interface command
- * 
- * Command format: 
- *     atm show interface [<interface-name>]
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-void
-show_intf(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int     buf_len = sizeof(struct air_int_rsp) * 3;
-       struct atminfreq        air;
-       struct air_int_rsp      *int_info, *int_info_base;
-
-       /*
-        * Validate interface name
-        */
-       UM_ZERO(&air, sizeof(air));
-       if (argc) {
-               if (strlen(argv[0]) > IFNAMSIZ - 1) {
-                       fprintf(stderr, "%s: Illegal interface name\n",
-                                       prog);
-                       exit(1);
-               }
-               strcpy(air.air_int_intf, argv[0]);
-               argc--; argv++;
-       }
-
-       /*
-        * Get interface information from the kernel
-        */
-       air.air_opcode = AIOCS_INF_INT;
-       buf_len = do_info_ioctl(&air, buf_len);
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-
-       /*
-        * Print the interface information
-        */
-       int_info_base = int_info =
-                       (struct air_int_rsp *) air.air_buf_addr;
-       for (; (size_t)buf_len >= sizeof(struct air_int_rsp); int_info++,
-                       buf_len -= sizeof(struct air_int_rsp)) {
-               print_intf_info(int_info);
-       }
-       UM_FREE(int_info_base);
-}
-
-
-/*
- * Process show IP VCCs command
- * 
- * Command format: 
- *     atm show ipvcc [<ip-addr>]
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-void
-show_ip_vcc(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int                     buf_len, ip_info_len, rc;
-       char                    *if_name = NULL;
-       struct atminfreq        air;
-       struct air_ip_vcc_rsp   *ip_info, *ip_info_base;
-       struct sockaddr_in      *sin;
-       union {
-               struct sockaddr_in      sin;
-               struct sockaddr         sa;
-       } host_addr;
-
-       /*
-        * First parameter can be a netif name, an IP host name, or
-        * an IP address.  Figure out which it is.
-        */
-       UM_ZERO(&host_addr, sizeof(host_addr));
-       host_addr.sa.sa_family = AF_INET;
-       if (argc) {
-               rc = verify_nif_name(argv[0]);
-               if (rc < 0) {
-                       /*
-                        * Error occured
-                        */
-                       fprintf(stderr, "%s: ", prog);
-                       switch (errno) {
-                       case ENOPROTOOPT:
-                       case EOPNOTSUPP:
-                               perror("Internal error");
-                               break;
-                       case ENXIO:
-                               fprintf(stderr, "%s is not an ATM device\n",
-                                               argv[0]);
-                               break;
-                       default:
-                               perror("ioctl (AIOCINFO)");
-                               break;
-                       }
-                       exit(1);
-               } else if (rc > 0) {
-                       /*
-                        * Parameter is a valid netif name
-                        */
-                       if_name = argv[0];
-               } else {
-                       /*
-                        * Get IP address of specified host name
-                        */
-                       sin = get_ip_addr(argv[0]);
-                       host_addr.sin.sin_addr.s_addr =
-                                       sin->sin_addr.s_addr;
-               }
-       } else {
-               host_addr.sin.sin_addr.s_addr = INADDR_ANY;
-       }
-
-       /*
-        * Get IP map information from the kernel
-        */
-       buf_len = sizeof(struct air_ip_vcc_rsp) * 10;
-       air.air_opcode = AIOCS_INF_IPM;
-       air.air_ip_addr = host_addr.sa;
-       ip_info_len = do_info_ioctl(&air, buf_len);
-       if (ip_info_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "not an ATM device\n");
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-       ip_info_base = ip_info =
-                       (struct air_ip_vcc_rsp *) air.air_buf_addr;
-
-       /*
-        * Sort the information
-        */
-       qsort((void *) ip_info,
-                       ip_info_len / sizeof(struct air_ip_vcc_rsp),
-                       sizeof(struct air_ip_vcc_rsp),
-                       ip_vcc_compare);
-
-       /*
-        * Print the relevant information
-        */
-       while (ip_info_len>0) {
-               if (!if_name || !strcmp(if_name, ip_info->aip_intf)) {
-                       print_ip_vcc_info(ip_info);
-               }
-               ip_info++;
-               ip_info_len -= sizeof(struct air_ip_vcc_rsp);
-       }
-
-       /*
-        * Release the information from the kernel
-        */
-       UM_FREE(ip_info_base);
-
-}
-
-
-/*
- * Process show network interface command
- * 
- * Command format: 
- *     atm show netif [<netif>]
- *
- * Arguments:
- *     argc    number of remaining arguments to command
- *     argv    pointer to remaining argument strings
- *     cmdp    pointer to command description 
- *
- * Returns:
- *     none
- *
- */
-void
-show_netif(int argc, char **argv, __unused const struct cmd *cmdp)
-{
-       int     buf_len = sizeof(struct air_netif_rsp) * 3;
-       struct atminfreq        air;
-       struct air_netif_rsp    *int_info, *int_info_base;
-
-       /*
-        * Validate network interface name
-        */
-       UM_ZERO(air.air_int_intf, sizeof(air.air_int_intf));
-       if (argc) {
-               if (strlen(argv[0]) > IFNAMSIZ - 1) {
-                       fprintf(stderr, "%s: Illegal interface name\n", prog);
-                       exit(1);
-               }
-               strcpy(air.air_int_intf, argv[0]);
-               argc--; argv++;
-       }
-
-       /*
-        * Get network interface information from the kernel
-        */
-       air.air_opcode = AIOCS_INF_NIF;
-       buf_len = do_info_ioctl(&air, buf_len);
-       if (buf_len < 0) {
-               fprintf(stderr, "%s: ", prog);
-               switch (errno) {
-               case ENOPROTOOPT:
-               case EOPNOTSUPP:
-                       perror("Internal error");
-                       break;
-               case ENXIO:
-                       fprintf(stderr, "%s is not an ATM device\n",
-                                       argv[0]);
-                       break;
-               default:
-                       perror("ioctl (AIOCINFO)");
-                       break;
-               }
-               exit(1);
-       }
-
-       /*
-        * Print the network interface information
-        */
-       int_info_base = int_info =
-                       (struct air_netif_rsp *) air.air_buf_addr;
-       for (; (size_t)buf_len >= sizeof(struct air_netif_rsp);&nbs