11590Srgrimes/*- 21590Srgrimes * Copyright (c) 1980, 1992, 1993 31590Srgrimes * The Regents of the University of California. All rights reserved. 41590Srgrimes * 51590Srgrimes * Redistribution and use in source and binary forms, with or without 61590Srgrimes * modification, are permitted provided that the following conditions 71590Srgrimes * are met: 81590Srgrimes * 1. Redistributions of source code must retain the above copyright 91590Srgrimes * notice, this list of conditions and the following disclaimer. 101590Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 111590Srgrimes * notice, this list of conditions and the following disclaimer in the 121590Srgrimes * documentation and/or other materials provided with the distribution. 131590Srgrimes * 4. Neither the name of the University nor the names of its contributors 141590Srgrimes * may be used to endorse or promote products derived from this software 151590Srgrimes * without specific prior written permission. 161590Srgrimes * 171590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 181590Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 191590Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201590Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 211590Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 221590Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 231590Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 241590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 251590Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 261590Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 271590Srgrimes * SUCH DAMAGE. 281590Srgrimes */ 291590Srgrimes 3087715Smarkm#include <sys/cdefs.h> 311590Srgrimes 3287715Smarkm__FBSDID("$FreeBSD$"); 3387715Smarkm 3487715Smarkm#ifdef lint 3587715Smarkmstatic const char sccsid[] = "@(#)cmdtab.c 8.1 (Berkeley) 6/6/93"; 3687715Smarkm#endif 3787715Smarkm 381590Srgrimes#include "systat.h" 391590Srgrimes#include "extern.h" 4029759Swollman#include "mode.h" 411590Srgrimes 421590Srgrimesstruct cmdtab cmdtab[] = { 43226396Sed { "pigs", showpigs, fetchpigs, labelpigs, 441590Srgrimes initpigs, openpigs, closepigs, 0, 4529759Swollman 0, CF_LOADAV }, 46226396Sed { "swap", showswap, fetchswap, labelswap, 471590Srgrimes initswap, openswap, closeswap, 0, 4829759Swollman 0, CF_LOADAV }, 49226396Sed { "iostat", showiostat, fetchiostat, labeliostat, 501590Srgrimes initiostat, openiostat, closeiostat, cmdiostat, 5129759Swollman 0, CF_LOADAV }, 52226396Sed { "vmstat", showkre, fetchkre, labelkre, 531590Srgrimes initkre, openkre, closekre, cmdkre, 5429759Swollman 0, 0 }, 55226396Sed { "netstat", shownetstat, fetchnetstat, labelnetstat, 561590Srgrimes initnetstat, opennetstat, closenetstat, cmdnetstat, 5729759Swollman 0, CF_LOADAV }, 5829759Swollman { "icmp", showicmp, fetchicmp, labelicmp, 5929759Swollman initicmp, openicmp, closeicmp, cmdmode, 6029759Swollman reseticmp, CF_LOADAV }, 6129839Swollman { "ip", showip, fetchip, labelip, 6229839Swollman initip, openip, closeip, cmdmode, 6329839Swollman resetip, CF_LOADAV }, 64118318Sdwmalone#ifdef INET6 65118318Sdwmalone { "icmp6", showicmp6, fetchicmp6, labelicmp6, 66118318Sdwmalone initicmp6, openicmp6, closeicmp6, cmdmode, 67118318Sdwmalone reseticmp6, CF_LOADAV }, 68118318Sdwmalone { "ip6", showip6, fetchip6, labelip6, 69118318Sdwmalone initip6, openip6, closeip6, cmdmode, 70118318Sdwmalone resetip6, CF_LOADAV }, 71118318Sdwmalone#endif 7229881Swollman { "tcp", showtcp, fetchtcp, labeltcp, 7329881Swollman inittcp, opentcp, closetcp, cmdmode, 74158160Sbde resettcp, CF_LOADAV }, 75108684Sphk { "ifstat", showifstat, fetchifstat, labelifstat, 76108684Sphk initifstat, openifstat, closeifstat, cmdifstat, 77108684Sphk 0, CF_LOADAV }, 78226396Sed { NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0 } 791590Srgrimes}; 801590Srgrimesstruct cmdtab *curcmd = &cmdtab[0]; 81