1 /* $NetBSD: nma.c,v 1.3 1997/10/16 23:24:48 lukem Exp $ */ 2 3 /* 4 * Copyright (c) 1995 Mats O Jansson. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed by Mats O Jansson. 17 * 4. The name of the author may not be used to endorse or promote products 18 * derived from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 #include <sys/cdefs.h> 33 #ifndef lint 34 __RCSID("$NetBSD: nma.c,v 1.3 1997/10/16 23:24:48 lukem Exp $"); 35 #endif 36 37 #include "os.h" 38 #include "nma.h" 39 #include "nmadef.h" 40 41 struct commDev { 42 int val; 43 char *sname; 44 char *name; 45 }; 46 47 struct commDev nmaCommDev[] = { 48 { NMA_C_SOFD_DP , "DP ", "DP11-DA" }, 49 { NMA_C_SOFD_UNA, "UNA", "DEUNA" }, 50 { NMA_C_SOFD_DU , "DU ", "DU11-DA" }, 51 { NMA_C_SOFD_CNA, "CNA", "DECNA" }, 52 { NMA_C_SOFD_DL , "DL ", "DL11-C, -E, or -WA" }, 53 { NMA_C_SOFD_QNA, "QNA", "DEQNA" }, 54 { NMA_C_SOFD_DQ , "DQ ", "DQ11-DA" }, 55 { NMA_C_SOFD_CI , "CI ", "Computer Interconnect" }, 56 { NMA_C_SOFD_DA , "DA ", "DA11-B or -AL" }, 57 { NMA_C_SOFD_PCL, "PCL", "PCL11-B" }, 58 { NMA_C_SOFD_DUP, "DUP", "DUP11-DA" }, 59 { NMA_C_SOFD_LUA, "LUA", "DELUA" }, 60 { NMA_C_SOFD_DMC, "DMC", "DMC11-DA/AR, -FA/AR, -MA/AL or -MD/AL" }, 61 { NMA_C_SOFD_LNA, "LNA", "MicroServer Lance" }, 62 { NMA_C_SOFD_DN , "DN ", "DN11-BA or -AA" }, 63 { NMA_C_SOFD_DLV, "DLV", "DLV11-E, -F, -J, MXV11-A or -B" }, 64 { NMA_C_SOFD_LCS, "LCS", "DECServer 100" }, 65 { NMA_C_SOFD_DMP, "DMP", "DMP11" }, 66 { NMA_C_SOFD_AMB, "AMB", "AMBER" }, 67 { NMA_C_SOFD_DTE, "DTE", "DTE20" }, 68 { NMA_C_SOFD_DBT, "DBT", "DEBET" }, 69 { NMA_C_SOFD_DV , "DV ", "DV11-AA/BA" }, 70 { NMA_C_SOFD_BNA, "BNA", "DEBNA" }, 71 { NMA_C_SOFD_BNT, "BNT", "DEBNT" }, 72 { NMA_C_SOFD_DZ , "DZ ", "DZ11-A, -B, -C, -D" }, 73 { NMA_C_SOFD_LPC, "LPC", "PCXX" }, 74 { NMA_C_SOFD_DSV, "DSV", "DSV11" }, 75 { NMA_C_SOFD_CEC, "CEC", "3-COM/IBM-PC" }, 76 { NMA_C_SOFD_KDP, "KDP", "KMC11/DUP11-DA" }, 77 { NMA_C_SOFD_IEC, "IEC", "Interlan/IBM-PC" }, 78 { NMA_C_SOFD_KDZ, "KDZ", "KMC11/DZ11-A, -B, -C, or -D" }, 79 { NMA_C_SOFD_UEC, "UEC", "Univation/RAINBOW-100" }, 80 { NMA_C_SOFD_KL8, "KL8", "KL8-J" }, 81 { NMA_C_SOFD_DS2, "DS2", "DECServer 200" }, 82 { NMA_C_SOFD_DMV, "DMV", "DMV11" }, 83 { NMA_C_SOFD_DS5, "DS5", "DECServer 500" }, 84 { NMA_C_SOFD_DPV, "DPV", "DPV11" }, 85 { NMA_C_SOFD_LQA, "LQA", "DELQA" }, 86 { NMA_C_SOFD_DMF, "DMF", "DMF32" }, 87 { NMA_C_SOFD_SVA, "SVA", "DESVA" }, 88 { NMA_C_SOFD_DMR, "DMR", "DMR11-AA, -AB, -AC, or -AE" }, 89 { NMA_C_SOFD_MUX, "MUX", "MUXserver" }, 90 { NMA_C_SOFD_KMY, "KMY", "KMS11-PX" }, 91 { NMA_C_SOFD_DEP, "DEP", "DEPCA PCSG/IBM-PC" }, 92 { NMA_C_SOFD_KMX, "KMX", "KMS11-BD/BE" }, 93 { NMA_C_SOFD_LTM, "LTM", "LTM Ethernet monitor" }, 94 { NMA_C_SOFD_DMB, "DMB", "DMB-32" }, 95 { NMA_C_SOFD_DES, "DES", "DESNC" }, 96 { NMA_C_SOFD_KCP, "KCP", "KCP" }, 97 { NMA_C_SOFD_MX3, "MX3", "MUXServer 300" }, 98 { NMA_C_SOFD_SYN, "SYN", "MicroServer" }, 99 { NMA_C_SOFD_MEB, "MEB", "DEMEB" }, 100 { NMA_C_SOFD_DSB, "DSB", "DSB32" }, 101 { NMA_C_SOFD_BAM, "BAM", "DEBAM LANBridge-200" }, 102 { NMA_C_SOFD_DST, "DST", "DST-32 TEAMmate" }, 103 { NMA_C_SOFD_FAT, "FAT", "DEFAT" }, 104 { NMA_C_SOFD_RSM, "RSM", "DERSM - Remote Segment Monitor" }, 105 { NMA_C_SOFD_RES, "RES", "DERES - Remote Environmental Sensor" }, 106 { NMA_C_SOFD_3C2, "3C2", "3COM Etherlink II (3C503)" }, 107 { NMA_C_SOFD_3CM, "3CM", "3COM Etherlink/MC (3C523)" }, 108 { NMA_C_SOFD_DS3, "DS3", "DECServer 300" }, 109 { NMA_C_SOFD_MF2, "MF2", "Mayfair-2" }, 110 { NMA_C_SOFD_MMR, "MMR", "DEMMR" }, 111 { NMA_C_SOFD_VIT, "VIT", "Vitalink TransLAN III/IV (NP3A) Bridge " }, 112 { NMA_C_SOFD_VT5, "VT5", "Vitalink TransLAN 350 (NPC25) Bridge " }, 113 { NMA_C_SOFD_BNI, "BNI", "DEBNI" }, 114 { NMA_C_SOFD_MNA, "MNA", "DEMNA" }, 115 { NMA_C_SOFD_PMX, "PMX", "PMAX (KN01)" }, 116 { NMA_C_SOFD_NI5, "NI5", "Interlan NI5210-8" }, 117 { NMA_C_SOFD_NI9, "NI9", "Interlan NI9210" }, 118 { NMA_C_SOFD_KMK, "KMK", "KMS11-K" }, 119 { NMA_C_SOFD_3CP, "3CP", "3COM Etherlink Plus (3C505) " }, 120 { NMA_C_SOFD_DP2, "DP2", "DPNserver-200" }, 121 { NMA_C_SOFD_ISA, "ISA", "SGEC" }, 122 { NMA_C_SOFD_DIV, "DIV", "DIV-32 DEC WAN controller-100" }, 123 { NMA_C_SOFD_QTA, "QTA", "DEQTA" }, 124 { NMA_C_SOFD_B15, "B15", "LANbridge-150" }, 125 { NMA_C_SOFD_WD8, "WD8", "WD8003 Family" }, 126 { NMA_C_SOFD_ILA, "ILA", "BICC ISOLAN 4110-2" }, 127 { NMA_C_SOFD_ILM, "ILM", "BICC ISOLAN 4110-3" }, 128 { NMA_C_SOFD_APR, "APR", "Apricot Xen-S and Qi" }, 129 { NMA_C_SOFD_ASN, "ASN", "AST EtherNode" }, 130 { NMA_C_SOFD_ASE, "ASE", "AST Ethernet" }, 131 { NMA_C_SOFD_TRW, "TRW", "TRW HC-2001" }, 132 { NMA_C_SOFD_EDX, "EDX", "Ethernet-XT/AT" }, 133 { NMA_C_SOFD_EDA, "EDA", "Ethernet-AT" }, 134 { NMA_C_SOFD_DR2, "DR2", "DECrouter-250" }, 135 { NMA_C_SOFD_SCC, "SCC", "DECrouter-250 DUSCC" }, 136 { NMA_C_SOFD_DCA, "DCA", "DCA Series 300" }, 137 { NMA_C_SOFD_TIA, "TIA", "LANcard/E" }, 138 { NMA_C_SOFD_FBN, "FBN", "DEFEB DECbridge-500" }, 139 { NMA_C_SOFD_FEB, "FEB", "DEFEB DECbridge-500 FDDI" }, 140 { NMA_C_SOFD_FCN, "FCN", "DEFCN DECconcentrator-500" }, 141 { NMA_C_SOFD_MFA, "MFA", "DEMFA" }, 142 { NMA_C_SOFD_MXE, "MXE", "MIPS workstation family" }, 143 { NMA_C_SOFD_CED, "CED", "Cabletron Ethernet Desktop" }, 144 { NMA_C_SOFD_C20, "C20", "3Com CS/200" }, 145 { NMA_C_SOFD_CS1, "CS1", "3Com CS/1" }, 146 { NMA_C_SOFD_C2M, "C2M", "3Com CS/210, CS/2000, CS/2100" }, 147 { NMA_C_SOFD_ACA, "ACA", "ACA/32000 system" }, 148 { NMA_C_SOFD_GSM, "GSM", "Gandalf StarMaster" }, 149 { NMA_C_SOFD_DSF, "DSF", "DSF32" }, 150 { NMA_C_SOFD_CS5, "CS5", "3Com CS/50" }, 151 { NMA_C_SOFD_XIR, "XIR", "XIRCOM PE10B2" }, 152 { NMA_C_SOFD_KFE, "KFE", "KFE52" }, 153 { NMA_C_SOFD_RT3, "RT3", "rtVAX-300" }, 154 { NMA_C_SOFD_SPI, "SPI", "Spiderport M250" }, 155 { NMA_C_SOFD_FOR, "FOR", "LAT gateway" }, 156 { NMA_C_SOFD_MER, "MER", "Meridian" }, 157 { NMA_C_SOFD_PER, "PER", "Persoft" }, 158 { NMA_C_SOFD_STR, "STR", "AT&T StarLan-10" }, 159 { NMA_C_SOFD_MPS, "MPS", "MIPSfair" }, 160 { NMA_C_SOFD_L20, "L20", "LPS20 print server" }, 161 { NMA_C_SOFD_VT2, "VT2", "Vitalink TransLAN 320 Bridge" }, 162 { NMA_C_SOFD_DWT, "DWT", "VT-1000" }, 163 { NMA_C_SOFD_WGB, "WGB", "DEWGB" }, 164 { NMA_C_SOFD_ZEN, "ZEN", "Zenith Z-LAN4000, Z-LAN" }, 165 { NMA_C_SOFD_TSS, "TSS", "Thursby Software Systems" }, 166 { NMA_C_SOFD_MNE, "MNE", "3MIN (KN02-BA)" }, 167 { NMA_C_SOFD_FZA, "FZA", "DEFZA" }, 168 { NMA_C_SOFD_90L, "90L", "DS90L" }, 169 { NMA_C_SOFD_CIS, "CIS", "Cisco Systems" }, 170 { NMA_C_SOFD_STC, "STC", "STRTC" }, 171 { NMA_C_SOFD_UBE, "UBE", "Ungermann-Bass PC2030, PC3030" }, 172 { NMA_C_SOFD_DW2, "DW2", "DECwindows terminal II" }, 173 { NMA_C_SOFD_FUE, "FUE", "Fujitsu Etherstar MB86950" }, 174 { NMA_C_SOFD_M38, "M38", "MUXServer 380" }, 175 { NMA_C_SOFD_NTI, "NTI", "NTI Group PC Ethernet Card" }, 176 { NMA_C_SOFD_RAD, "RAD", "RADLINX LAN Gateway" }, 177 { NMA_C_SOFD_INF, "INF", "Infotron Commix" }, 178 { NMA_C_SOFD_XMX, "XMX", "Xyplex MAXserver" }, 179 { NMA_C_SOFD_NDI, "NDI", "NDIS data link driver for MS/DOS systems" }, 180 { NMA_C_SOFD_ND2, "ND2", "NDIS data link driver for OS/2 systems" }, 181 { NMA_C_SOFD_TRN, "TRN", "DEC LANcontroller 520" }, 182 { NMA_C_SOFD_DEV, "DEV", "Develcon Electronics Ltd. LAT gateway" }, 183 { NMA_C_SOFD_ACE, "ACE", "Acer 5220, 5270 adapter" }, 184 { NMA_C_SOFD_PNT, "PNT", "ProNet-4/18 #1390" }, 185 { NMA_C_SOFD_ISE, "ISE", "Network Integration Server 600" }, 186 { NMA_C_SOFD_IST, "IST", "Network Integration Server 600 T1" }, 187 { NMA_C_SOFD_ISH, "ISH", "Network Integration Server 64 kb HDLC" }, 188 { NMA_C_SOFD_ISF, "ISF", "Network Integration Server 600 FDDI" }, 189 { NMA_C_SOFD_DSW, "DSW", "DSW-21" }, 190 { NMA_C_SOFD_DW4, "DW4", "DSW-41/42" }, 191 { NMA_C_SOFD_TRA, "TRA", "DETRA-AA" }, 192 { 0, 0, 0 }, 193 }; 194 195 char * 196 nmaGetShort(devno) 197 int devno; 198 { 199 struct commDev *current; 200 201 current = nmaCommDev; 202 203 while (current->sname != NULL) { 204 if (current->val == devno) 205 break; 206 current++; 207 } 208 209 return(current->sname); 210 } 211 212 char * 213 nmaGetDevice(devno) 214 int devno; 215 { 216 struct commDev *current; 217 218 current = nmaCommDev; 219 220 while (current->name != NULL) { 221 if (current->val == devno) 222 break; 223 current++; 224 } 225 226 return(current->name); 227 } 228