summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-12-07 08:04:05 +0000
committerimp <imp@FreeBSD.org>2003-12-07 08:04:05 +0000
commit09b6a11a99f071c586da7d3a3021dca782ac069a (patch)
tree0c9962aa95e18010ae2909d5d4d10ab567c2bebb
parent5a38247aabdddcbeca638a34cf7d7becaf0b8761 (diff)
downloadFreeBSD-src-09b6a11a99f071c586da7d3a3021dca782ac069a.zip
FreeBSD-src-09b6a11a99f071c586da7d3a3021dca782ac069a.tar.gz
Update to reflect eni removal
-rw-r--r--sbin/atm/atm/Makefile2
-rw-r--r--sbin/atm/atm/atm_eni.c437
-rw-r--r--sbin/atm/atm/atm_show.c3
-rw-r--r--sbin/atm/ilmid/ilmid.c1
4 files changed, 1 insertions, 442 deletions
diff --git a/sbin/atm/atm/Makefile b/sbin/atm/atm/Makefile
index a29e54d..df5db86 100644
--- a/sbin/atm/atm/Makefile
+++ b/sbin/atm/atm/Makefile
@@ -24,7 +24,7 @@
# $FreeBSD$
PROG= atm
-SRCS= atm.c atm_fore200.c atm_eni.c atm_inet.c atm_print.c \
+SRCS= atm.c atm_fore200.c atm_inet.c atm_print.c \
atm_set.c atm_show.c atm_subr.c
MAN= atm.8
diff --git a/sbin/atm/atm/atm_eni.c b/sbin/atm/atm/atm_eni.c
deleted file mode 100644
index 8907aa4..0000000
--- a/sbin/atm/atm/atm_eni.c
+++ /dev/null
@@ -1,437 +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$
- *
- */
-
-/*
- * 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/hea/eni_stats.h>
-
-#include <errno.h>
-#include <libatm.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <err.h>
-
-#include "atm.h"
-
-#ifndef lint
-__RCSID("@(#) $FreeBSD$");
-#endif
-
-
-/*
- * 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(intf, argc, argv)
- char *intf;
- int argc;
- char **argv;
-{
- int stats_type;
- ssize_t buf_len;
- 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 {
- errx(1, "Illegal or unsupported statistics type");
- }
- argc--;
- argv++;
-
- /*
- * Get vendor-specific statistics from the kernel
- */
- bzero(&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 == -1) {
- switch (errno) {
- case ENOPROTOOPT:
- case EOPNOTSUPP:
- err(1, "Internal error");
- case ENXIO:
- errx(1, "%s is not an ATM device", intf);
- default:
- err(1, "ioctl (AIOCINFO)");
- }
- }
- stats = (struct air_vinfo_rsp *)(void *)air.air_buf_addr;
-
- /*
- * Print the statistics
- */
- if ((size_t)buf_len < sizeof(struct air_vinfo_rsp) +
- sizeof(Eni_stats)) {
- 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;
- }
-
- free(stats);
-}
-
-
-/*
- * Print ENI OC-3c statistics
- *
- * Arguments:
- * vi pointer to vendor-specific statistics to print
- *
- * Returns:
- * none
- *
- */
-void
-print_eni_oc3(vi)
- 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
- *
- */
-void
-print_eni_atm(vi)
- 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
- *
- */
-void
-print_eni_aal0(vi)
- 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
- *
- */
-void
-print_eni_aal5(vi)
- 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
- *
- */
-void
-print_eni_driver(vi)
- 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_show.c b/sbin/atm/atm/atm_show.c
index 5daf214..1ae38fd 100644
--- a/sbin/atm/atm/atm_show.c
+++ b/sbin/atm/atm/atm_show.c
@@ -652,9 +652,6 @@ show_intf_stats(int argc, char **argv, const struct cmd *cmdp __unused)
case VENDOR_FORE:
show_fore200_stats(intf, argc, argv);
break;
- case VENDOR_ENI:
- show_eni_stats(intf, argc, argv);
- break;
default:
fprintf(stderr, "%s: Unknown adapter vendor\n",
prog);
diff --git a/sbin/atm/ilmid/ilmid.c b/sbin/atm/ilmid/ilmid.c
index 257f1a0..bc11f9f 100644
--- a/sbin/atm/ilmid/ilmid.c
+++ b/sbin/atm/ilmid/ilmid.c
@@ -57,7 +57,6 @@
#include <netatm/atm_sap.h>
#include <netatm/atm_sys.h>
#include <netatm/atm_ioctl.h>
-#include <dev/hea/eni_stats.h>
#include <dev/hfa/fore_aali.h>
#include <dev/hfa/fore_slave.h>
#include <dev/hfa/fore_stats.h>
OpenPOWER on IntegriCloud