home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume26
/
sysinfo-1.0
/
part01
/
info-ultrix.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-10
|
8KB
|
361 lines
/*
* Copyright (c) 1992 Michael A. Cooper.
* This software may be freely distributed provided it is not sold for
* profit and the author is credited appropriately.
*/
#ifndef lint
static char *RCSid = "$Header: /src/common/usc/bin/sysinfo/RCS/info-ultrix.c,v 1.8 1992/04/26 23:32:06 mcooper Exp $";
#endif
/*
* $Log: info-ultrix.c,v $
* Revision 1.8 1992/04/26 23:32:06 mcooper
* Add Copyright notice
*
* Revision 1.7 1992/04/17 01:10:11 mcooper
* Moved DEVICE *() function declares to defs.h.
*
* Revision 1.6 1992/03/28 21:29:24 mcooper
* Move NetifNL to netif.c.
*
* Revision 1.5 1992/03/22 00:20:10 mcooper
* Major cleanup and re-org.
*
* Revision 1.4 1992/03/09 01:07:50 mcooper
* Add support for determining system model type.
*
* Revision 1.3 1992/03/08 23:08:18 mcooper
* Make things safe with #ifdef's.
*
* Revision 1.2 1992/03/08 04:56:52 mcooper
* Add network interface devices.
*
* Revision 1.1 1992/03/06 18:35:31 mcooper
* Initial revision
*
*/
/*
* Ultrix related information
*/
#include <stdio.h>
#include "system.h"
#include "defs.h"
#include <machine/cpuconf.h>
#if defined(HAVE_PACKETFILTER)
#include <sys/time.h>
#include <net/pfilt.h>
#endif /* HAVE_PACKETFILTER */
#include <nlist.h>
#include <sys/devio.h>
/*
* CPU Switch symbol
*/
struct nlist CpuSwNL[] = {
#if defined(COFF)
{ "cpusw" },
#else
{ "_cpusw" },
#endif /* COFF */
{ 0 },
};
#if defined(HAVE_UBA)
/*
* UniBus name list
*/
struct nlist UniBusNL[] = {
#if defined(COFF)
{ "ubdinit" },
#else
{ "_ubdinit" },
#endif /* COFF */
{ 0 },
};
#endif /* HAVE_UBA */
/*
* Device Data Table
*
* Compares are done by the length of the string appearing in
* the first columns. Therefore, longer names must appear before
* any shorter names that are not unique. e.g. "lebuffer" needs to
* be before "le".
*/
DEVDATATAB DevDataTab[] = {
/*
* Disk Drives
*/
{ "fd", 0, NULL, NULL, ProbeDiskDrive },
{ "ra", 0, NULL, NULL, ProbeDiskDrive },
{ "rz", 0, NULL, NULL, ProbeDiskDrive },
/*
* Tape Drives
*/
{ "mu", 0, NULL, NULL, ProbeTapeDrive },
{ "stc", 0, NULL, NULL, ProbeTapeDrive },
{ "tms", 0, NULL, NULL, ProbeTapeDrive },
{ "ts", 0, NULL, NULL, ProbeTapeDrive },
{ "tu", 0, NULL, NULL, ProbeTapeDrive },
{ "tz", 0, NULL, NULL, ProbeTapeDrive },
/*
* Network Interfaces
*/
{ "ln", 0, "LANCE Ethernet",
"10Mb/sec Ethernet", ProbeNetif },
{ "de", 0, "DEC Ethernet",
"10Mb/sec Ethernet", ProbeNetif },
{ "ni", 0, "DEC Ethernet",
"10Mb/sec Ethernet", ProbeNetif },
{ "qe", 0, "DEQNA/DELQA Ethernet",
"10Mb/sec Ethernet", ProbeNetif },
{ "ne", 0, "Second Generation Ethernet",
"10Mb/sec Ethernet", ProbeNetif },
{ "xna", 0, "DEBNI/DEMNA Ethernet",
"10Mb/sec Ethernet", ProbeNetif },
{ "fza", 0, "DEFZA FDDI",
"100Mb/sec FDDI", ProbeNetif },
/*
* I don't know anything about Ultrix frame buffers
*/
{ "cfb", 0, NULL,
"Color Frame Buffer", ProbeGeneric },
{ "pm", 0, NULL,
"Graphics Device", ProbeGeneric },
{ "px", 0, NULL,
"Graphics Device", ProbeGeneric },
{ "ga", 0, NULL,
"Graphics Device", ProbeGeneric },
{ "gq", 0, NULL,
"Graphics Device", ProbeGeneric },
{ "fb", 0, NULL,
"Graphics Device", ProbeGeneric },
/*
* PrestoServe card (untested).
*/
{ "presto", DT_GENERIC,
"PrestoServe",
"NFS accelerator card", ProbeGeneric },
/*
* Serial line controllers
*/
{ "dc", DT_GENERIC,
NULL,
"4-port serial line controller", ProbeGeneric },
{ "mdc", DT_GENERIC,
"DS5100",
"4-port serial line controller", ProbeGeneric },
{ "scc", DT_GENERIC,
"SCC",
"2-port serial line controller", ProbeGeneric },
{ "cxa", DT_GENERIC,
"CXA16",
"16-line serial communications interface", ProbeGeneric },
{ "cxy", DT_GENERIC,
"CXY08",
"8-line serial communications interface", ProbeGeneric },
{ "dhv", DT_GENERIC,
"DHV11",
"8-line serial communications interface", ProbeGeneric },
{ "dmb", DT_GENERIC,
"DMB32",
"8-line serial communications interface", ProbeGeneric },
{ "dhq", DT_GENERIC,
"DHQ11",
"8-line serial communications interface", ProbeGeneric },
{ 0 },
};
/*
* Models of DEC machines as defined in <machine/cpuconf.h>
*/
NAMETAB ModelTab[] = {
#ifdef VAX_780
{ VAX_780, "VAX-11/780" },
#endif
#ifdef VAX_750
{ VAX_750, "VAX-11/750" },
#endif
#ifdef VAX_730
{ VAX_730, "VAX-11/730" },
#endif
#ifdef VAX_8600
{ VAX_8600, "VAX-8600" },
#endif
#ifdef VAX_8200
{ VAX_8200, "VAX-8200" },
#endif
#ifdef VAX_8800
{ VAX_8800, "VAX-8800" },
#endif
#ifdef MVAX_I
{ MVAX_I, "MicroVAX-I" },
#endif
#ifdef MVAX_II
{ MVAX_II, "MicroVAX-II" },
#endif
#ifdef V_VAX
{ V_VAX, "Virtual VAX" }, /* This can't be real */
#endif
#ifdef VAX_3600
{ VAX_3600, "VAX-3600" }, /* Mayfair I */
#endif
#ifdef VAX_6200
{ VAX_6200, "VAX-6200" }, /* CVAX/Calypso */
#endif
#ifdef VAX_3400
{ VAX_3400, "VAX-3400" }, /* Mayfair II */
#endif
#ifdef C_VAXSTAR
{ C_VAXSTAR, "VAX-3100" }, /* PVAX */
#endif
#ifdef VAX_60
{ VAX_60, "VAX-60" }, /* Firefox */
#endif
#ifdef VAX_3900
{ VAX_3900, "VAX-3900" }, /* Mayfair III */
#endif
#ifdef DS_3100
{ DS_3100, "DECsystem-3100" }, /* PMAX */
#endif
#ifdef VAX_8820
{ VAX_8820, "VAX-8820" }, /* SID for Polarstar */
#endif
#ifdef DS_5400
{ DS_5400, "DECsystem-5400" }, /* MIPSfair */
#endif
#ifdef DS_5800
{ DS_5800, "DECsystem-5800" }, /* ISIS */
#endif
#ifdef DS_5000
{ DS_5000, "DECsystem-5000" },
#endif
#ifdef DS_CMAX
{ DS_CMAX, "DECsystem-CMAX" },
#endif
#ifdef VAX_6400
{ VAX_6400, "VAX-6400" }, /* RIGEL/Calypso */
#endif
#ifdef VAXSTAR
{ VAXSTAR, "VAXSTAR" },
#endif
#ifdef DS_5500
{ DS_5500, "DECsystem-5500" }, /* MIPSFAIR-2 */
#endif
#ifdef DS_5100
{ DS_5100, "DECsystem-5100" }, /* MIPSMATE */
#endif
#ifdef VAX_9000
{ VAX_9000, "VAX-9000" }, /* VAX9000 */
#endif
#ifdef DS_5000_100
{ DS_5000_100, "DECsystem-5000/100" }, /* 3MIN */
#endif
#ifdef DS_5000_300
{ DS_5000_300, "DECsystem-5000/300" }, /* 3MAX+ */
#endif
#ifdef DS_MAXINE
{ DS_MAXINE, "DECsystem-MAXINE" }, /* MAXine */
#endif
{ 0 },
};
/*
* Tape info as defined in <sys/devio.h>.
*/
NAMETAB TapeInfo[] = {
#ifdef DEV_800BPI
{ DEV_800BPI, "800 bpi density" },
#endif
#ifdef DEV_1600BPI
{ DEV_1600BPI, "1600 bpi density" },
#endif
#ifdef DEV_6250BPI
{ DEV_6250BPI, "6250 bpi density" },
#endif
#ifdef DEV_6666BPI
{ DEV_6666BPI, "6666 bpi density" },
#endif
#ifdef DEV_10240BPI
{ DEV_10240BPI, "10240 bpi density" },
#endif
#ifdef DEV_38000BPI
{ DEV_38000BPI, "38000 bpi density" },
#endif
#ifdef DEV_LOADER
{ DEV_LOADER, "media loader present" },
#endif
#ifdef DEV_38000_CP
{ DEV_38000_CP, "38000 bpi compacted density" },
#endif
#ifdef DEV_76000BPI
{ DEV_76000BPI, "76000 bpi density" },
#endif
#ifdef DEV_76000_CP
{ DEV_76000_CP, "76000 bpi compacted density" },
#endif
#ifdef DEV_8000_BPI
{ DEV_8000_BPI, "QIC-24 9 track" },
#endif
#ifdef DEV_10000_BPI
{ DEV_10000_BPI, "QIC-120 15trk and QIC-150 18trk" },
#endif
#ifdef DEV_16000_BPI
{ DEV_16000_BPI, "QIC-320/525 26 track" },
#endif
#ifdef DEV_61000_BPI
{ DEV_61000_BPI, "4mm tape cartridge" },
#endif
#ifdef DEV_54000_BPI
{ DEV_54000_BPI, "8mm tape cartridge" },
#endif
{ 0 },
};
/*
* Category types as defined in <sys/devio.h>
*/
NAMETAB Categorys[] = {
#ifdef DEV_TAPE
{ DEV_TAPE, "Tape drive" },
#endif
#ifdef DEV_DISK
{ DEV_DISK, "Disk drive" },
#endif
#ifdef DEV_TERMINAL
{ DEV_TERMINAL, "Terminal" },
#endif
#ifdef DEV_PRINTER
{ DEV_PRINTER, "Printer" },
#endif
#ifdef DEV_SPECIAL
{ DEV_SPECIAL, "Special" },
#endif
{ 0 },
};
/*
* Network types table as defined in <net/pfilt.h>
*/
NAMETAB NetTypes[] = {
#ifdef ENDT_3MB
{ ENDT_3MB, "3Mb/sec Ethernet" },
#endif
#ifdef ENDT_BS3MB
{ ENDT_BS3MB, "Byte Swapped 3Mb/sec Ethernet" },
#endif
#ifdef ENDT_10MB
{ ENDT_10MB, "10Mb/sec Ethernet" },
#endif
#ifdef ENDT_FDDI
{ ENDT_FDDI, "100Mb/sec FDDI" },
#endif
{ 0 },
};