1*42e22086SApple OSS Distributions /* 2*42e22086SApple OSS Distributions * Copyright (c) 2000-2019 Apple Inc. All rights reserved. 3*42e22086SApple OSS Distributions * 4*42e22086SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5*42e22086SApple OSS Distributions * 6*42e22086SApple OSS Distributions * This file contains Original Code and/or Modifications of Original Code 7*42e22086SApple OSS Distributions * as defined in and that are subject to the Apple Public Source License 8*42e22086SApple OSS Distributions * Version 2.0 (the 'License'). You may not use this file except in 9*42e22086SApple OSS Distributions * compliance with the License. The rights granted to you under the License 10*42e22086SApple OSS Distributions * may not be used to create, or enable the creation or redistribution of, 11*42e22086SApple OSS Distributions * unlawful or unlicensed copies of an Apple operating system, or to 12*42e22086SApple OSS Distributions * circumvent, violate, or enable the circumvention or violation of, any 13*42e22086SApple OSS Distributions * terms of an Apple operating system software license agreement. 14*42e22086SApple OSS Distributions * 15*42e22086SApple OSS Distributions * Please obtain a copy of the License at 16*42e22086SApple OSS Distributions * http://www.opensource.apple.com/apsl/ and read it before using this file. 17*42e22086SApple OSS Distributions * 18*42e22086SApple OSS Distributions * The Original Code and all software distributed under the License are 19*42e22086SApple OSS Distributions * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20*42e22086SApple OSS Distributions * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21*42e22086SApple OSS Distributions * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22*42e22086SApple OSS Distributions * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23*42e22086SApple OSS Distributions * Please see the License for the specific language governing rights and 24*42e22086SApple OSS Distributions * limitations under the License. 25*42e22086SApple OSS Distributions * 26*42e22086SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27*42e22086SApple OSS Distributions */ 28*42e22086SApple OSS Distributions /* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */ 29*42e22086SApple OSS Distributions /* $FreeBSD: src/sys/net/if_media.h,v 1.9.2.1 2001/07/04 00:12:38 brooks Exp $ */ 30*42e22086SApple OSS Distributions 31*42e22086SApple OSS Distributions /* 32*42e22086SApple OSS Distributions * Copyright (c) 1997 33*42e22086SApple OSS Distributions * Jonathan Stone and Jason R. Thorpe. All rights reserved. 34*42e22086SApple OSS Distributions * 35*42e22086SApple OSS Distributions * This software is derived from information provided by Matt Thomas. 36*42e22086SApple OSS Distributions * 37*42e22086SApple OSS Distributions * Redistribution and use in source and binary forms, with or without 38*42e22086SApple OSS Distributions * modification, are permitted provided that the following conditions 39*42e22086SApple OSS Distributions * are met: 40*42e22086SApple OSS Distributions * 1. Redistributions of source code must retain the above copyright 41*42e22086SApple OSS Distributions * notice, this list of conditions and the following disclaimer. 42*42e22086SApple OSS Distributions * 2. Redistributions in binary form must reproduce the above copyright 43*42e22086SApple OSS Distributions * notice, this list of conditions and the following disclaimer in the 44*42e22086SApple OSS Distributions * documentation and/or other materials provided with the distribution. 45*42e22086SApple OSS Distributions * 3. All advertising materials mentioning features or use of this software 46*42e22086SApple OSS Distributions * must display the following acknowledgement: 47*42e22086SApple OSS Distributions * This product includes software developed by Jonathan Stone 48*42e22086SApple OSS Distributions * and Jason R. Thorpe for the NetBSD Project. 49*42e22086SApple OSS Distributions * 4. The names of the authors may not be used to endorse or promote products 50*42e22086SApple OSS Distributions * derived from this software without specific prior written permission. 51*42e22086SApple OSS Distributions * 52*42e22086SApple OSS Distributions * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 53*42e22086SApple OSS Distributions * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 54*42e22086SApple OSS Distributions * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 55*42e22086SApple OSS Distributions * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 56*42e22086SApple OSS Distributions * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 57*42e22086SApple OSS Distributions * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 58*42e22086SApple OSS Distributions * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 59*42e22086SApple OSS Distributions * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 60*42e22086SApple OSS Distributions * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 61*42e22086SApple OSS Distributions * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 62*42e22086SApple OSS Distributions * SUCH DAMAGE. 63*42e22086SApple OSS Distributions */ 64*42e22086SApple OSS Distributions 65*42e22086SApple OSS Distributions #ifndef _NET_IF_MEDIA_H_ 66*42e22086SApple OSS Distributions #define _NET_IF_MEDIA_H_ 67*42e22086SApple OSS Distributions #ifndef DRIVERKIT 68*42e22086SApple OSS Distributions #include <sys/appleapiopts.h> 69*42e22086SApple OSS Distributions #endif /* DRIVERKIT */ 70*42e22086SApple OSS Distributions 71*42e22086SApple OSS Distributions /* 72*42e22086SApple OSS Distributions * Prototypes and definitions for BSD/OS-compatible network interface 73*42e22086SApple OSS Distributions * media selection. 74*42e22086SApple OSS Distributions * 75*42e22086SApple OSS Distributions * Where it is safe to do so, this code strays slightly from the BSD/OS 76*42e22086SApple OSS Distributions * design. Software which uses the API (device drivers, basically) 77*42e22086SApple OSS Distributions * shouldn't notice any difference. 78*42e22086SApple OSS Distributions * 79*42e22086SApple OSS Distributions * Many thanks to Matt Thomas for providing the information necessary 80*42e22086SApple OSS Distributions * to implement this interface. 81*42e22086SApple OSS Distributions */ 82*42e22086SApple OSS Distributions 83*42e22086SApple OSS Distributions #ifdef KERNEL_PRIVATE 84*42e22086SApple OSS Distributions /* sigh; some modules are lazy and thus rely on this */ 85*42e22086SApple OSS Distributions #include <sys/queue.h> 86*42e22086SApple OSS Distributions #endif /* KERNEL_PRIVATE */ 87*42e22086SApple OSS Distributions 88*42e22086SApple OSS Distributions /* 89*42e22086SApple OSS Distributions * if_media Options word: 90*42e22086SApple OSS Distributions * Bits Use 91*42e22086SApple OSS Distributions * ---- ------- 92*42e22086SApple OSS Distributions * 0-4 Media variant 93*42e22086SApple OSS Distributions * 5-7 Media type 94*42e22086SApple OSS Distributions * 8-15 Type specific options 95*42e22086SApple OSS Distributions * 16-19 Extended media variant bits 96*42e22086SApple OSS Distributions * 20-27 Shared (global) options 97*42e22086SApple OSS Distributions * 28-31 Instance 98*42e22086SApple OSS Distributions */ 99*42e22086SApple OSS Distributions 100*42e22086SApple OSS Distributions /* 101*42e22086SApple OSS Distributions * Ethernet 102*42e22086SApple OSS Distributions * 103*42e22086SApple OSS Distributions * In order to use more than 31 subtypes, Ethernet uses the extended media 104*42e22086SApple OSS Distributions * variant bits 105*42e22086SApple OSS Distributions * 106*42e22086SApple OSS Distributions * The extended media variant bits are not backward compatible so they 107*42e22086SApple OSS Distributions * must not be used by kernel extensions like ifnet and drivers that 108*42e22086SApple OSS Distributions * are to be deployed on older system versions 109*42e22086SApple OSS Distributions */ 110*42e22086SApple OSS Distributions #define IFM_X(x) IFM_X_SUBTYPE(x) /* internal shorthand */ 111*42e22086SApple OSS Distributions 112*42e22086SApple OSS Distributions #define IFM_ETHER 0x00000020 113*42e22086SApple OSS Distributions #define IFM_10_T 3 /* 10BaseT - RJ45 */ 114*42e22086SApple OSS Distributions #define IFM_10_2 4 /* 10Base2 - Thinnet */ 115*42e22086SApple OSS Distributions #define IFM_10_5 5 /* 10Base5 - AUI */ 116*42e22086SApple OSS Distributions #define IFM_100_TX 6 /* 100BaseTX - RJ45 */ 117*42e22086SApple OSS Distributions #define IFM_100_FX 7 /* 100BaseFX - Fiber */ 118*42e22086SApple OSS Distributions #define IFM_100_T4 8 /* 100BaseT4 - 4 pair cat 3 */ 119*42e22086SApple OSS Distributions #define IFM_100_VG 9 /* 100VG-AnyLAN */ 120*42e22086SApple OSS Distributions #define IFM_100_T2 10 /* 100BaseT2 */ 121*42e22086SApple OSS Distributions #define IFM_1000_SX 11 /* 1000BaseSX - multi-mode fiber */ 122*42e22086SApple OSS Distributions #define IFM_10_STP 12 /* 10BaseT over shielded TP */ 123*42e22086SApple OSS Distributions #define IFM_10_FL 13 /* 10baseFL - Fiber */ 124*42e22086SApple OSS Distributions #define IFM_1000_LX 14 /* 1000baseLX - single-mode fiber */ 125*42e22086SApple OSS Distributions #define IFM_1000_CX 15 /* 1000baseCX - 150ohm STP */ 126*42e22086SApple OSS Distributions #define IFM_1000_T 16 /* 1000baseT - 4 pair cat 5 */ 127*42e22086SApple OSS Distributions #ifdef PRIVATE 128*42e22086SApple OSS Distributions #define IFM_1000_TX IFM_1000_T /* For compatibility */ 129*42e22086SApple OSS Distributions #endif /* PRIVATE */ 130*42e22086SApple OSS Distributions #define IFM_HPNA_1 17 /* HomePNA 1.0 (1Mb/s) */ 131*42e22086SApple OSS Distributions #define IFM_10G_SR 18 /* 10GbaseSR - multi-mode fiber */ 132*42e22086SApple OSS Distributions #define IFM_10G_LR 19 /* 10GbaseLR - single-mode fiber */ 133*42e22086SApple OSS Distributions #define IFM_10G_CX4 20 /* 10GbaseCX4 - copper */ 134*42e22086SApple OSS Distributions #define IFM_10G_T 21 /* 10GbaseT - 4 pair cat 6 */ 135*42e22086SApple OSS Distributions #define IFM_2500_T 22 /* 2500baseT - 4 pair cat 5 */ 136*42e22086SApple OSS Distributions #define IFM_5000_T 23 /* 5000baseT - 4 pair cat 5 */ 137*42e22086SApple OSS Distributions #define IFM_1000_CX_SGMII 24 /* 1000Base-CX-SGMII */ 138*42e22086SApple OSS Distributions #define IFM_1000_KX 25 /* 1000Base-KX backplane */ 139*42e22086SApple OSS Distributions #define IFM_10G_KX4 26 /* 10GBase-KX4 backplane */ 140*42e22086SApple OSS Distributions #define IFM_10G_KR 27 /* 10GBase-KR backplane */ 141*42e22086SApple OSS Distributions #define IFM_10G_CR1 28 /* 10GBase-CR1 Twinax splitter */ 142*42e22086SApple OSS Distributions #define IFM_10G_ER 29 /* 10GBase-ER */ 143*42e22086SApple OSS Distributions #define IFM_20G_KR2 30 /* 20GBase-KR2 backplane */ 144*42e22086SApple OSS Distributions #define IFM_OTHER 31 /* Other: one of the following */ 145*42e22086SApple OSS Distributions 146*42e22086SApple OSS Distributions /* following types are not visible to old binaries using the low bits of IFM_TMASK */ 147*42e22086SApple OSS Distributions #define IFM_2500_SX IFM_X(32) /* 2500BaseSX - multi-mode fiber */ 148*42e22086SApple OSS Distributions #define IFM_10G_TWINAX IFM_X(33) /* 10GBase Twinax copper */ 149*42e22086SApple OSS Distributions #define IFM_10G_TWINAX_LONG IFM_X(34) /* 10GBase Twinax Long copper */ 150*42e22086SApple OSS Distributions #define IFM_10G_LRM IFM_X(35) /* 10GBase-LRM 850nm Multi-mode */ 151*42e22086SApple OSS Distributions #define IFM_2500_KX IFM_X(36) /* 2500Base-KX backplane */ 152*42e22086SApple OSS Distributions #define IFM_40G_CR4 IFM_X(37) /* 40GBase-CR4 */ 153*42e22086SApple OSS Distributions #define IFM_40G_SR4 IFM_X(38) /* 40GBase-SR4 */ 154*42e22086SApple OSS Distributions #define IFM_50G_PCIE IFM_X(39) /* 50G Ethernet over PCIE */ 155*42e22086SApple OSS Distributions #define IFM_25G_PCIE IFM_X(40) /* 25G Ethernet over PCIE */ 156*42e22086SApple OSS Distributions #define IFM_1000_SGMII IFM_X(41) /* 1G media interface */ 157*42e22086SApple OSS Distributions #define IFM_10G_SFI IFM_X(42) /* 10G media interface */ 158*42e22086SApple OSS Distributions #define IFM_40G_XLPPI IFM_X(43) /* 40G media interface */ 159*42e22086SApple OSS Distributions #define IFM_40G_LR4 IFM_X(44) /* 40GBase-LR4 */ 160*42e22086SApple OSS Distributions #define IFM_40G_KR4 IFM_X(45) /* 40GBase-KR4 */ 161*42e22086SApple OSS Distributions #define IFM_100G_CR4 IFM_X(47) /* 100GBase-CR4 */ 162*42e22086SApple OSS Distributions #define IFM_100G_SR4 IFM_X(48) /* 100GBase-SR4 */ 163*42e22086SApple OSS Distributions #define IFM_100G_KR4 IFM_X(49) /* 100GBase-KR4 */ 164*42e22086SApple OSS Distributions #define IFM_100G_LR4 IFM_X(50) /* 100GBase-LR4 */ 165*42e22086SApple OSS Distributions #define IFM_56G_R4 IFM_X(51) /* 56GBase-R4 */ 166*42e22086SApple OSS Distributions #define IFM_100_T IFM_X(52) /* 100BaseT - RJ45 */ 167*42e22086SApple OSS Distributions #define IFM_25G_CR IFM_X(53) /* 25GBase-CR */ 168*42e22086SApple OSS Distributions #define IFM_25G_KR IFM_X(54) /* 25GBase-KR */ 169*42e22086SApple OSS Distributions #define IFM_25G_SR IFM_X(55) /* 25GBase-SR */ 170*42e22086SApple OSS Distributions #define IFM_50G_CR2 IFM_X(56) /* 50GBase-CR2 */ 171*42e22086SApple OSS Distributions #define IFM_50G_KR2 IFM_X(57) /* 50GBase-KR2 */ 172*42e22086SApple OSS Distributions #define IFM_25G_LR IFM_X(58) /* 25GBase-LR */ 173*42e22086SApple OSS Distributions #define IFM_10G_AOC IFM_X(59) /* 10G active optical cable */ 174*42e22086SApple OSS Distributions #define IFM_25G_ACC IFM_X(60) /* 25G active copper cable */ 175*42e22086SApple OSS Distributions #define IFM_25G_AOC IFM_X(61) /* 25G active optical cable */ 176*42e22086SApple OSS Distributions #define IFM_100_SGMII IFM_X(62) /* 100M media interface */ 177*42e22086SApple OSS Distributions #define IFM_2500_X IFM_X(63) /* 2500BaseX */ 178*42e22086SApple OSS Distributions #define IFM_5000_KR IFM_X(64) /* 5GBase-KR backplane */ 179*42e22086SApple OSS Distributions #define IFM_25G_T IFM_X(65) /* 25GBase-T - RJ45 */ 180*42e22086SApple OSS Distributions #define IFM_25G_CR_S IFM_X(66) /* 25GBase-CR (short) */ 181*42e22086SApple OSS Distributions #define IFM_25G_CR1 IFM_X(67) /* 25GBase-CR1 DA cable */ 182*42e22086SApple OSS Distributions #define IFM_25G_KR_S IFM_X(68) /* 25GBase-KR (short) */ 183*42e22086SApple OSS Distributions #define IFM_5000_KR_S IFM_X(69) /* 5GBase-KR backplane (short) */ 184*42e22086SApple OSS Distributions #define IFM_5000_KR1 IFM_X(70) /* 5GBase-KR backplane */ 185*42e22086SApple OSS Distributions #define IFM_25G_AUI IFM_X(71) /* 25G-AUI-C2C (chip to chip) */ 186*42e22086SApple OSS Distributions #define IFM_40G_XLAUI IFM_X(72) /* 40G-XLAUI */ 187*42e22086SApple OSS Distributions #define IFM_40G_XLAUI_AC IFM_X(73) /* 40G active copper/optical */ 188*42e22086SApple OSS Distributions #define IFM_40G_ER4 IFM_X(74) /* 40GBase-ER4 */ 189*42e22086SApple OSS Distributions #define IFM_50G_SR2 IFM_X(75) /* 50GBase-SR2 */ 190*42e22086SApple OSS Distributions #define IFM_50G_LR2 IFM_X(76) /* 50GBase-LR2 */ 191*42e22086SApple OSS Distributions #define IFM_50G_LAUI2_AC IFM_X(77) /* 50G active copper/optical */ 192*42e22086SApple OSS Distributions #define IFM_50G_LAUI2 IFM_X(78) /* 50G-LAUI2 */ 193*42e22086SApple OSS Distributions #define IFM_50G_AUI2_AC IFM_X(79) /* 50G active copper/optical */ 194*42e22086SApple OSS Distributions #define IFM_50G_AUI2 IFM_X(80) /* 50G-AUI2 */ 195*42e22086SApple OSS Distributions #define IFM_50G_CP IFM_X(81) /* 50GBase-CP */ 196*42e22086SApple OSS Distributions #define IFM_50G_SR IFM_X(82) /* 50GBase-SR */ 197*42e22086SApple OSS Distributions #define IFM_50G_LR IFM_X(83) /* 50GBase-LR */ 198*42e22086SApple OSS Distributions #define IFM_50G_FR IFM_X(84) /* 50GBase-FR */ 199*42e22086SApple OSS Distributions #define IFM_50G_KR_PAM4 IFM_X(85) /* 50GBase-KR PAM4 */ 200*42e22086SApple OSS Distributions #define IFM_25G_KR1 IFM_X(86) /* 25GBase-KR1 */ 201*42e22086SApple OSS Distributions #define IFM_50G_AUI1_AC IFM_X(87) /* 50G active copper/optical */ 202*42e22086SApple OSS Distributions #define IFM_50G_AUI1 IFM_X(88) /* 50G-AUI1 */ 203*42e22086SApple OSS Distributions #define IFM_100G_CAUI4_AC IFM_X(89) /* 100G-CAUI4 active copper/optical */ 204*42e22086SApple OSS Distributions #define IFM_100G_CAUI4 IFM_X(90) /* 100G-CAUI4 */ 205*42e22086SApple OSS Distributions #define IFM_100G_AUI4_AC IFM_X(91) /* 100G-AUI4 active copper/optical */ 206*42e22086SApple OSS Distributions #define IFM_100G_AUI4 IFM_X(92) /* 100G-AUI4 */ 207*42e22086SApple OSS Distributions #define IFM_100G_CR_PAM4 IFM_X(93) /* 100GBase-CR PAM4 */ 208*42e22086SApple OSS Distributions #define IFM_100G_KR_PAM4 IFM_X(94) /* 100GBase-CR PAM4 */ 209*42e22086SApple OSS Distributions #define IFM_100G_CP2 IFM_X(95) /* 100GBase-CP2 */ 210*42e22086SApple OSS Distributions #define IFM_100G_SR2 IFM_X(96) /* 100GBase-SR2 */ 211*42e22086SApple OSS Distributions #define IFM_100G_DR IFM_X(97) /* 100GBase-DR */ 212*42e22086SApple OSS Distributions #define IFM_100G_KR2_PAM4 IFM_X(98) /* 100GBase-KR2 PAM4 */ 213*42e22086SApple OSS Distributions #define IFM_100G_CAUI2_AC IFM_X(99) /* 100G-CAUI2 active copper/optical */ 214*42e22086SApple OSS Distributions #define IFM_100G_CAUI2 IFM_X(100) /* 100G-CAUI2 */ 215*42e22086SApple OSS Distributions #define IFM_100G_AUI2_AC IFM_X(101) /* 100G-AUI2 active copper/optical */ 216*42e22086SApple OSS Distributions #define IFM_100G_AUI2 IFM_X(102) /* 100G-AUI2 */ 217*42e22086SApple OSS Distributions #define IFM_200G_CR4_PAM4 IFM_X(103) /* 200GBase-CR4 PAM4 */ 218*42e22086SApple OSS Distributions #define IFM_200G_SR4 IFM_X(104) /* 200GBase-SR4 */ 219*42e22086SApple OSS Distributions #define IFM_200G_FR4 IFM_X(105) /* 200GBase-FR4 */ 220*42e22086SApple OSS Distributions #define IFM_200G_LR4 IFM_X(106) /* 200GBase-LR4 */ 221*42e22086SApple OSS Distributions #define IFM_200G_DR4 IFM_X(107) /* 200GBase-DR4 */ 222*42e22086SApple OSS Distributions #define IFM_200G_KR4_PAM4 IFM_X(108) /* 200GBase-KR4 PAM4 */ 223*42e22086SApple OSS Distributions #define IFM_200G_AUI4_AC IFM_X(109) /* 200G-AUI4 active copper/optical */ 224*42e22086SApple OSS Distributions #define IFM_200G_AUI4 IFM_X(110) /* 200G-AUI4 */ 225*42e22086SApple OSS Distributions #define IFM_200G_AUI8_AC IFM_X(111) /* 200G-AUI8 active copper/optical */ 226*42e22086SApple OSS Distributions #define IFM_200G_AUI8 IFM_X(112) /* 200G-AUI8 */ 227*42e22086SApple OSS Distributions #define IFM_400G_FR8 IFM_X(113) /* 400GBase-FR8 */ 228*42e22086SApple OSS Distributions #define IFM_400G_LR8 IFM_X(114) /* 400GBase-LR8 */ 229*42e22086SApple OSS Distributions #define IFM_400G_DR4 IFM_X(115) /* 400GBase-DR4 */ 230*42e22086SApple OSS Distributions #define IFM_400G_AUI8_AC IFM_X(116) /* 400G-AUI8 active copper/optical */ 231*42e22086SApple OSS Distributions #define IFM_400G_AUI8 IFM_X(117) /* 400G-AUI8 */ 232*42e22086SApple OSS Distributions 233*42e22086SApple OSS Distributions /* 234*42e22086SApple OSS Distributions * Token ring 235*42e22086SApple OSS Distributions */ 236*42e22086SApple OSS Distributions #define IFM_TOKEN 0x00000040 237*42e22086SApple OSS Distributions #define IFM_TOK_STP4 3 /* Shielded twisted pair 4m - DB9 */ 238*42e22086SApple OSS Distributions #define IFM_TOK_STP16 4 /* Shielded twisted pair 16m - DB9 */ 239*42e22086SApple OSS Distributions #define IFM_TOK_UTP4 5 /* Unshielded twisted pair 4m - RJ45 */ 240*42e22086SApple OSS Distributions #define IFM_TOK_UTP16 6 /* Unshielded twisted pair 16m - RJ45 */ 241*42e22086SApple OSS Distributions #define IFM_TOK_STP100 7 /* Shielded twisted pair 100m - DB9 */ 242*42e22086SApple OSS Distributions #define IFM_TOK_UTP100 8 /* Unshielded twisted pair 100m - RJ45 */ 243*42e22086SApple OSS Distributions #define IFM_TOK_ETR 0x00000200 /* Early token release */ 244*42e22086SApple OSS Distributions #define IFM_TOK_SRCRT 0x00000400 /* Enable source routing features */ 245*42e22086SApple OSS Distributions #define IFM_TOK_ALLR 0x00000800 /* All routes / Single route bcast */ 246*42e22086SApple OSS Distributions #define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */ 247*42e22086SApple OSS Distributions #define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */ 248*42e22086SApple OSS Distributions #define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic token ring */ 249*42e22086SApple OSS Distributions 250*42e22086SApple OSS Distributions /* 251*42e22086SApple OSS Distributions * FDDI 252*42e22086SApple OSS Distributions */ 253*42e22086SApple OSS Distributions #define IFM_FDDI 0x00000060 254*42e22086SApple OSS Distributions #define IFM_FDDI_SMF 3 /* Single-mode fiber */ 255*42e22086SApple OSS Distributions #define IFM_FDDI_MMF 4 /* Multi-mode fiber */ 256*42e22086SApple OSS Distributions #define IFM_FDDI_UTP 5 /* CDDI / UTP */ 257*42e22086SApple OSS Distributions #define IFM_FDDI_DA 0x00000100 /* Dual attach / single attach */ 258*42e22086SApple OSS Distributions 259*42e22086SApple OSS Distributions /* 260*42e22086SApple OSS Distributions * IEEE 802.11 Wireless 261*42e22086SApple OSS Distributions */ 262*42e22086SApple OSS Distributions #define IFM_IEEE80211 0x00000080 263*42e22086SApple OSS Distributions #define IFM_IEEE80211_FH1 3 /* Frequency Hopping 1Mbps */ 264*42e22086SApple OSS Distributions #define IFM_IEEE80211_FH2 4 /* Frequency Hopping 2Mbps */ 265*42e22086SApple OSS Distributions #define IFM_IEEE80211_DS2 5 /* Direct Sequence 2Mbps */ 266*42e22086SApple OSS Distributions #define IFM_IEEE80211_DS5 6 /* Direct Sequence 5Mbps*/ 267*42e22086SApple OSS Distributions #define IFM_IEEE80211_DS11 7 /* Direct Sequence 11Mbps*/ 268*42e22086SApple OSS Distributions #define IFM_IEEE80211_DS1 8 /* Direct Sequence 1Mbps */ 269*42e22086SApple OSS Distributions #define IFM_IEEE80211_DS22 9 /* Direct Sequence 22Mbps */ 270*42e22086SApple OSS Distributions #define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc mode */ 271*42e22086SApple OSS Distributions 272*42e22086SApple OSS Distributions /* 273*42e22086SApple OSS Distributions * Shared media sub-types 274*42e22086SApple OSS Distributions */ 275*42e22086SApple OSS Distributions #define IFM_AUTO 0 /* Autoselect best media */ 276*42e22086SApple OSS Distributions #define IFM_MANUAL 1 /* Jumper/dipswitch selects media */ 277*42e22086SApple OSS Distributions #define IFM_NONE 2 /* Deselect all media */ 278*42e22086SApple OSS Distributions 279*42e22086SApple OSS Distributions /* 280*42e22086SApple OSS Distributions * Shared options 281*42e22086SApple OSS Distributions */ 282*42e22086SApple OSS Distributions #define IFM_FDX 0x00100000 /* Force full duplex */ 283*42e22086SApple OSS Distributions #define IFM_HDX 0x00200000 /* Force half duplex */ 284*42e22086SApple OSS Distributions #define IFM_FLOW 0x00400000 /* enable hardware flow control */ 285*42e22086SApple OSS Distributions #define IFM_EEE 0x00800000 /* Support energy efficient ethernet */ 286*42e22086SApple OSS Distributions #define IFM_FLAG0 0x01000000 /* Driver defined flag */ 287*42e22086SApple OSS Distributions #define IFM_FLAG1 0x02000000 /* Driver defined flag */ 288*42e22086SApple OSS Distributions #define IFM_FLAG2 0x04000000 /* Driver defined flag */ 289*42e22086SApple OSS Distributions #define IFM_LOOP 0x08000000 /* Put hardware in loopback */ 290*42e22086SApple OSS Distributions 291*42e22086SApple OSS Distributions /* 292*42e22086SApple OSS Distributions * Macros to access bits of extended media sub-types (media variants) 293*42e22086SApple OSS Distributions */ 294*42e22086SApple OSS Distributions #define IFM_TMASK_COMPAT 0x0000001f /* Lower bits of media sub-type */ 295*42e22086SApple OSS Distributions #define IFM_TMASK_EXT 0x000f0000 /* For extended media sub-type */ 296*42e22086SApple OSS Distributions #define IFM_TMASK_EXT_SHIFT 11 /* to extract high bits */ 297*42e22086SApple OSS Distributions #define IFM_X_SUBTYPE(x) (((x) & IFM_TMASK_COMPAT) | \ 298*42e22086SApple OSS Distributions (((x) & (IFM_TMASK_EXT >> IFM_TMASK_EXT_SHIFT)) << IFM_TMASK_EXT_SHIFT)) 299*42e22086SApple OSS Distributions 300*42e22086SApple OSS Distributions /* 301*42e22086SApple OSS Distributions * Masks 302*42e22086SApple OSS Distributions */ 303*42e22086SApple OSS Distributions #define IFM_NMASK 0x000000e0 /* Network type */ 304*42e22086SApple OSS Distributions #define IFM_TMASK (IFM_TMASK_COMPAT|IFM_TMASK_EXT) /* Media sub-type */ 305*42e22086SApple OSS Distributions #define IFM_IMASK 0xf0000000 /* Instance */ 306*42e22086SApple OSS Distributions #define IFM_ISHIFT 28 /* Instance shift */ 307*42e22086SApple OSS Distributions #define IFM_OMASK 0x0000ff00 /* Type specific options */ 308*42e22086SApple OSS Distributions #define IFM_GMASK 0x0ff00000 /* Global options */ 309*42e22086SApple OSS Distributions 310*42e22086SApple OSS Distributions /* 311*42e22086SApple OSS Distributions * Status bits 312*42e22086SApple OSS Distributions */ 313*42e22086SApple OSS Distributions #define IFM_AVALID 0x00000001 /* Active bit valid */ 314*42e22086SApple OSS Distributions #define IFM_ACTIVE 0x00000002 /* Interface attached to working net */ 315*42e22086SApple OSS Distributions #define IFM_WAKESAMENET 0x00000004 /* No link transition while asleep */ 316*42e22086SApple OSS Distributions 317*42e22086SApple OSS Distributions /* 318*42e22086SApple OSS Distributions * Macros to extract various bits of information from the media word. 319*42e22086SApple OSS Distributions */ 320*42e22086SApple OSS Distributions #define IFM_TYPE(x) ((x) & IFM_NMASK) 321*42e22086SApple OSS Distributions #define IFM_SUBTYPE(x) ((x) & IFM_TMASK) 322*42e22086SApple OSS Distributions #define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK) 323*42e22086SApple OSS Distributions #define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT) 324*42e22086SApple OSS Distributions #define IFM_OPTIONS(x) ((x) & (IFM_OMASK|IFM_GMASK)) 325*42e22086SApple OSS Distributions 326*42e22086SApple OSS Distributions #define IFM_INST_MAX IFM_INST(IFM_IMASK) 327*42e22086SApple OSS Distributions 328*42e22086SApple OSS Distributions /* 329*42e22086SApple OSS Distributions * Macro to create a media word. 330*42e22086SApple OSS Distributions */ 331*42e22086SApple OSS Distributions #define IFM_MAKEWORD(type, subtype, options, instance) \ 332*42e22086SApple OSS Distributions ((type) | (subtype) | (options) | ((instance) << IFM_ISHIFT)) 333*42e22086SApple OSS Distributions 334*42e22086SApple OSS Distributions /* 335*42e22086SApple OSS Distributions * NetBSD extension not defined in the BSDI API. This is used in various 336*42e22086SApple OSS Distributions * places to get the canonical description for a given type/subtype. 337*42e22086SApple OSS Distributions * 338*42e22086SApple OSS Distributions * NOTE: all but the top-level type descriptions must contain NO whitespace! 339*42e22086SApple OSS Distributions * Otherwise, parsing these in ifconfig(8) would be a nightmare. 340*42e22086SApple OSS Distributions */ 341*42e22086SApple OSS Distributions struct ifmedia_description { 342*42e22086SApple OSS Distributions int ifmt_word; /* word value; may be masked */ 343*42e22086SApple OSS Distributions const char *ifmt_string; /* description */ 344*42e22086SApple OSS Distributions }; 345*42e22086SApple OSS Distributions 346*42e22086SApple OSS Distributions #define IFM_TYPE_DESCRIPTIONS { \ 347*42e22086SApple OSS Distributions { IFM_ETHER, "Ethernet" }, \ 348*42e22086SApple OSS Distributions { IFM_TOKEN, "Token ring" }, \ 349*42e22086SApple OSS Distributions { IFM_FDDI, "FDDI" }, \ 350*42e22086SApple OSS Distributions { IFM_IEEE80211, "IEEE802.11" }, \ 351*42e22086SApple OSS Distributions { 0, NULL }, \ 352*42e22086SApple OSS Distributions } 353*42e22086SApple OSS Distributions 354*42e22086SApple OSS Distributions #define IFM_SUBTYPE_ETHERNET_DESCRIPTIONS { \ 355*42e22086SApple OSS Distributions { IFM_10_T, "10baseT/UTP" }, \ 356*42e22086SApple OSS Distributions { IFM_10_2, "10base2/BNC" }, \ 357*42e22086SApple OSS Distributions { IFM_10_5, "10base5/AUI" }, \ 358*42e22086SApple OSS Distributions { IFM_100_TX, "100baseTX" }, \ 359*42e22086SApple OSS Distributions { IFM_100_FX, "100baseFX" }, \ 360*42e22086SApple OSS Distributions { IFM_100_T4, "100baseT4" }, \ 361*42e22086SApple OSS Distributions { IFM_100_VG, "100baseVG" }, \ 362*42e22086SApple OSS Distributions { IFM_100_T2, "100baseT2" }, \ 363*42e22086SApple OSS Distributions { IFM_10_STP, "10baseSTP" }, \ 364*42e22086SApple OSS Distributions { IFM_10_FL, "10baseFL" }, \ 365*42e22086SApple OSS Distributions { IFM_1000_SX, "1000baseSX" }, \ 366*42e22086SApple OSS Distributions { IFM_1000_LX, "1000baseLX" }, \ 367*42e22086SApple OSS Distributions { IFM_1000_CX, "1000baseCX" }, \ 368*42e22086SApple OSS Distributions { IFM_1000_T, "1000baseT" }, \ 369*42e22086SApple OSS Distributions { IFM_HPNA_1, "homePNA" }, \ 370*42e22086SApple OSS Distributions { IFM_10G_LR, "10Gbase-LR" }, \ 371*42e22086SApple OSS Distributions { IFM_10G_SR, "10Gbase-SR" }, \ 372*42e22086SApple OSS Distributions { IFM_10G_CX4, "10Gbase-CX4" }, \ 373*42e22086SApple OSS Distributions { IFM_2500_SX, "2500BaseSX" }, \ 374*42e22086SApple OSS Distributions { IFM_10G_LRM, "10Gbase-LRM" }, \ 375*42e22086SApple OSS Distributions { IFM_10G_TWINAX, "10Gbase-Twinax" }, \ 376*42e22086SApple OSS Distributions { IFM_10G_TWINAX_LONG, "10Gbase-Twinax-Long" }, \ 377*42e22086SApple OSS Distributions { IFM_10G_T, "10Gbase-T" }, \ 378*42e22086SApple OSS Distributions { IFM_40G_CR4, "40Gbase-CR4" }, \ 379*42e22086SApple OSS Distributions { IFM_40G_SR4, "40Gbase-SR4" }, \ 380*42e22086SApple OSS Distributions { IFM_40G_LR4, "40Gbase-LR4" }, \ 381*42e22086SApple OSS Distributions { IFM_1000_KX, "1000Base-KX" }, \ 382*42e22086SApple OSS Distributions { IFM_OTHER, "Other" }, \ 383*42e22086SApple OSS Distributions { IFM_10G_KX4, "10GBase-KX4" }, \ 384*42e22086SApple OSS Distributions { IFM_10G_KR, "10GBase-KR" }, \ 385*42e22086SApple OSS Distributions { IFM_10G_CR1, "10GBase-CR1" }, \ 386*42e22086SApple OSS Distributions { IFM_20G_KR2, "20GBase-KR2" }, \ 387*42e22086SApple OSS Distributions { IFM_2500_KX, "2500Base-KX" }, \ 388*42e22086SApple OSS Distributions { IFM_2500_T, "2500Base-T" }, \ 389*42e22086SApple OSS Distributions { IFM_5000_T, "5000Base-T" }, \ 390*42e22086SApple OSS Distributions { IFM_50G_PCIE, "PCIExpress-50G" }, \ 391*42e22086SApple OSS Distributions { IFM_25G_PCIE, "PCIExpress-25G" }, \ 392*42e22086SApple OSS Distributions { IFM_1000_SGMII, "1000Base-SGMII" }, \ 393*42e22086SApple OSS Distributions { IFM_10G_SFI, "10GBase-SFI" }, \ 394*42e22086SApple OSS Distributions { IFM_40G_XLPPI, "40GBase-XLPPI" }, \ 395*42e22086SApple OSS Distributions { IFM_1000_CX_SGMII, "1000Base-CX-SGMII" }, \ 396*42e22086SApple OSS Distributions { IFM_40G_KR4, "40GBase-KR4" }, \ 397*42e22086SApple OSS Distributions { IFM_10G_ER, "10GBase-ER" }, \ 398*42e22086SApple OSS Distributions { IFM_100G_CR4, "100GBase-CR4" }, \ 399*42e22086SApple OSS Distributions { IFM_100G_SR4, "100GBase-SR4" }, \ 400*42e22086SApple OSS Distributions { IFM_100G_KR4, "100GBase-KR4" }, \ 401*42e22086SApple OSS Distributions { IFM_100G_LR4, "100GBase-LR4" }, \ 402*42e22086SApple OSS Distributions { IFM_56G_R4, "56GBase-R4" }, \ 403*42e22086SApple OSS Distributions { IFM_100_T, "100BaseT" }, \ 404*42e22086SApple OSS Distributions { IFM_25G_CR, "25GBase-CR" }, \ 405*42e22086SApple OSS Distributions { IFM_25G_KR, "25GBase-KR" }, \ 406*42e22086SApple OSS Distributions { IFM_25G_SR, "25GBase-SR" }, \ 407*42e22086SApple OSS Distributions { IFM_50G_CR2, "50GBase-CR2" }, \ 408*42e22086SApple OSS Distributions { IFM_50G_KR2, "50GBase-KR2" }, \ 409*42e22086SApple OSS Distributions { IFM_25G_LR, "25GBase-LR" }, \ 410*42e22086SApple OSS Distributions { IFM_10G_AOC, "10GBase-AOC" }, \ 411*42e22086SApple OSS Distributions { IFM_25G_ACC, "25GBase-ACC" }, \ 412*42e22086SApple OSS Distributions { IFM_25G_AOC, "25GBase-AOC" }, \ 413*42e22086SApple OSS Distributions { IFM_100_SGMII, "100M-SGMII" }, \ 414*42e22086SApple OSS Distributions { IFM_2500_X, "2500Base-X" }, \ 415*42e22086SApple OSS Distributions { IFM_5000_KR, "5000Base-KR" }, \ 416*42e22086SApple OSS Distributions { IFM_25G_T, "25GBase-T" }, \ 417*42e22086SApple OSS Distributions { IFM_25G_CR_S, "25GBase-CR-S" }, \ 418*42e22086SApple OSS Distributions { IFM_25G_CR1, "25GBase-CR1" }, \ 419*42e22086SApple OSS Distributions { IFM_25G_KR_S, "25GBase-KR-S" }, \ 420*42e22086SApple OSS Distributions { IFM_5000_KR_S, "5000Base-KR-S" }, \ 421*42e22086SApple OSS Distributions { IFM_5000_KR1, "5000Base-KR1" }, \ 422*42e22086SApple OSS Distributions { IFM_25G_AUI, "25G-AUI" }, \ 423*42e22086SApple OSS Distributions { IFM_40G_XLAUI, "40G-XLAUI" }, \ 424*42e22086SApple OSS Distributions { IFM_40G_XLAUI_AC, "40G-XLAUI-AC" }, \ 425*42e22086SApple OSS Distributions { IFM_40G_ER4, "40GBase-ER4" }, \ 426*42e22086SApple OSS Distributions { IFM_50G_SR2, "50GBase-SR2" }, \ 427*42e22086SApple OSS Distributions { IFM_50G_LR2, "50GBase-LR2" }, \ 428*42e22086SApple OSS Distributions { IFM_50G_LAUI2_AC, "50G-LAUI2-AC" }, \ 429*42e22086SApple OSS Distributions { IFM_50G_LAUI2, "50G-LAUI2" }, \ 430*42e22086SApple OSS Distributions { IFM_50G_AUI2_AC, "50G-AUI2-AC" }, \ 431*42e22086SApple OSS Distributions { IFM_50G_AUI2, "50G-AUI2" }, \ 432*42e22086SApple OSS Distributions { IFM_50G_CP, "50GBase-CP" }, \ 433*42e22086SApple OSS Distributions { IFM_50G_SR, "50GBase-SR" }, \ 434*42e22086SApple OSS Distributions { IFM_50G_LR, "50GBase-LR" }, \ 435*42e22086SApple OSS Distributions { IFM_50G_FR, "50GBase-FR" }, \ 436*42e22086SApple OSS Distributions { IFM_50G_KR_PAM4, "50GBase-KR-PAM4" }, \ 437*42e22086SApple OSS Distributions { IFM_25G_KR1, "25GBase-KR1" }, \ 438*42e22086SApple OSS Distributions { IFM_50G_AUI1_AC, "50G-AUI1-AC" }, \ 439*42e22086SApple OSS Distributions { IFM_50G_AUI1, "50G-AUI1" }, \ 440*42e22086SApple OSS Distributions { IFM_100G_CAUI4_AC, "100G-CAUI4-AC" }, \ 441*42e22086SApple OSS Distributions { IFM_100G_CAUI4, "100G-CAUI4" }, \ 442*42e22086SApple OSS Distributions { IFM_100G_AUI4_AC, "100G-AUI4-AC" }, \ 443*42e22086SApple OSS Distributions { IFM_100G_AUI4, "100G-AUI4" }, \ 444*42e22086SApple OSS Distributions { IFM_100G_CR_PAM4, "100GBase-CR-PAM4" }, \ 445*42e22086SApple OSS Distributions { IFM_100G_KR_PAM4, "100GBase-KR-PAM4" }, \ 446*42e22086SApple OSS Distributions { IFM_100G_CP2, "100GBase-CP2" }, \ 447*42e22086SApple OSS Distributions { IFM_100G_SR2, "100GBase-SR2" }, \ 448*42e22086SApple OSS Distributions { IFM_100G_DR, "100GBase-DR" }, \ 449*42e22086SApple OSS Distributions { IFM_100G_KR2_PAM4, "100GBase-KR2-PAM4" }, \ 450*42e22086SApple OSS Distributions { IFM_100G_CAUI2_AC, "100G-CAUI2-AC" }, \ 451*42e22086SApple OSS Distributions { IFM_100G_CAUI2, "100G-CAUI2" }, \ 452*42e22086SApple OSS Distributions { IFM_100G_AUI2_AC, "100G-AUI2-AC" }, \ 453*42e22086SApple OSS Distributions { IFM_100G_AUI2, "100G-AUI2" }, \ 454*42e22086SApple OSS Distributions { IFM_200G_CR4_PAM4, "200GBase-CR4-PAM4" }, \ 455*42e22086SApple OSS Distributions { IFM_200G_SR4, "200GBase-SR4" }, \ 456*42e22086SApple OSS Distributions { IFM_200G_FR4, "200GBase-FR4" }, \ 457*42e22086SApple OSS Distributions { IFM_200G_LR4, "200GBase-LR4" }, \ 458*42e22086SApple OSS Distributions { IFM_200G_DR4, "200GBase-DR4" }, \ 459*42e22086SApple OSS Distributions { IFM_200G_KR4_PAM4, "200GBase-KR4-PAM4" }, \ 460*42e22086SApple OSS Distributions { IFM_200G_AUI4_AC, "200G-AUI4-AC" }, \ 461*42e22086SApple OSS Distributions { IFM_200G_AUI4, "200G-AUI4" }, \ 462*42e22086SApple OSS Distributions { IFM_200G_AUI8_AC, "200G-AUI8-AC" }, \ 463*42e22086SApple OSS Distributions { IFM_200G_AUI8, "200G-AUI8" }, \ 464*42e22086SApple OSS Distributions { IFM_400G_FR8, "400GBase-FR8" }, \ 465*42e22086SApple OSS Distributions { IFM_400G_LR8, "400GBase-LR8" }, \ 466*42e22086SApple OSS Distributions { IFM_400G_DR4, "400GBase-DR4" }, \ 467*42e22086SApple OSS Distributions { IFM_400G_AUI8_AC, "400G-AUI8-AC" }, \ 468*42e22086SApple OSS Distributions { IFM_400G_AUI8, "400G-AUI8" }, \ 469*42e22086SApple OSS Distributions { 0, NULL }, \ 470*42e22086SApple OSS Distributions } 471*42e22086SApple OSS Distributions 472*42e22086SApple OSS Distributions #define IFM_SUBTYPE_ETHERNET_ALIASES { \ 473*42e22086SApple OSS Distributions { IFM_10_T, "UTP" }, \ 474*42e22086SApple OSS Distributions { IFM_10_T, "10UTP" }, \ 475*42e22086SApple OSS Distributions { IFM_10_2, "BNC" }, \ 476*42e22086SApple OSS Distributions { IFM_10_2, "10BNC" }, \ 477*42e22086SApple OSS Distributions { IFM_10_5, "AUI" }, \ 478*42e22086SApple OSS Distributions { IFM_10_5, "10AUI" }, \ 479*42e22086SApple OSS Distributions { IFM_100_TX, "100TX" }, \ 480*42e22086SApple OSS Distributions { IFM_100_FX, "100FX" }, \ 481*42e22086SApple OSS Distributions { IFM_100_T4, "100T4" }, \ 482*42e22086SApple OSS Distributions { IFM_100_VG, "100VG" }, \ 483*42e22086SApple OSS Distributions { IFM_100_T2, "100T2" }, \ 484*42e22086SApple OSS Distributions { IFM_1000_SX, "1000SX" }, \ 485*42e22086SApple OSS Distributions { IFM_10_STP, "STP" }, \ 486*42e22086SApple OSS Distributions { IFM_10_STP, "10STP" }, \ 487*42e22086SApple OSS Distributions { IFM_10_FL, "FL" }, \ 488*42e22086SApple OSS Distributions { IFM_10_FL, "10FL" }, \ 489*42e22086SApple OSS Distributions { IFM_1000_LX, "1000LX" }, \ 490*42e22086SApple OSS Distributions { IFM_1000_CX, "1000CX" }, \ 491*42e22086SApple OSS Distributions { IFM_1000_T, "1000T" }, \ 492*42e22086SApple OSS Distributions { IFM_HPNA_1, "HPNA1" }, \ 493*42e22086SApple OSS Distributions { IFM_10G_SR, "10GSR" }, \ 494*42e22086SApple OSS Distributions { IFM_10G_LR, "10GLR" }, \ 495*42e22086SApple OSS Distributions { IFM_10G_CX4, "10GCX4" }, \ 496*42e22086SApple OSS Distributions { IFM_10G_T, "10GT" }, \ 497*42e22086SApple OSS Distributions { 0, NULL }, \ 498*42e22086SApple OSS Distributions } 499*42e22086SApple OSS Distributions 500*42e22086SApple OSS Distributions #define IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS { \ 501*42e22086SApple OSS Distributions { 0, NULL }, \ 502*42e22086SApple OSS Distributions } 503*42e22086SApple OSS Distributions 504*42e22086SApple OSS Distributions #define IFM_SUBTYPE_TOKENRING_DESCRIPTIONS { \ 505*42e22086SApple OSS Distributions { IFM_TOK_STP4, "DB9/4Mbit" }, \ 506*42e22086SApple OSS Distributions { IFM_TOK_STP16, "DB9/16Mbit" }, \ 507*42e22086SApple OSS Distributions { IFM_TOK_UTP4, "UTP/4Mbit" }, \ 508*42e22086SApple OSS Distributions { IFM_TOK_UTP16, "UTP/16Mbit" }, \ 509*42e22086SApple OSS Distributions { 0, NULL }, \ 510*42e22086SApple OSS Distributions } 511*42e22086SApple OSS Distributions 512*42e22086SApple OSS Distributions #define IFM_SUBTYPE_TOKENRING_ALIASES { \ 513*42e22086SApple OSS Distributions { IFM_TOK_STP4, "4STP" }, \ 514*42e22086SApple OSS Distributions { IFM_TOK_STP16, "16STP" }, \ 515*42e22086SApple OSS Distributions { IFM_TOK_UTP4, "4UTP" }, \ 516*42e22086SApple OSS Distributions { IFM_TOK_UTP16, "16UTP" }, \ 517*42e22086SApple OSS Distributions { 0, NULL }, \ 518*42e22086SApple OSS Distributions } 519*42e22086SApple OSS Distributions 520*42e22086SApple OSS Distributions #define IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS { \ 521*42e22086SApple OSS Distributions { IFM_TOK_ETR, "EarlyTokenRelease" }, \ 522*42e22086SApple OSS Distributions { IFM_TOK_SRCRT, "SourceRouting" }, \ 523*42e22086SApple OSS Distributions { IFM_TOK_ALLR, "AllRoutes" }, \ 524*42e22086SApple OSS Distributions { 0, NULL }, \ 525*42e22086SApple OSS Distributions } 526*42e22086SApple OSS Distributions 527*42e22086SApple OSS Distributions #define IFM_SUBTYPE_FDDI_DESCRIPTIONS { \ 528*42e22086SApple OSS Distributions { IFM_FDDI_SMF, "Single-mode" }, \ 529*42e22086SApple OSS Distributions { IFM_FDDI_MMF, "Multi-mode" }, \ 530*42e22086SApple OSS Distributions { IFM_FDDI_UTP, "UTP" }, \ 531*42e22086SApple OSS Distributions { 0, NULL }, \ 532*42e22086SApple OSS Distributions } 533*42e22086SApple OSS Distributions 534*42e22086SApple OSS Distributions #define IFM_SUBTYPE_FDDI_ALIASES { \ 535*42e22086SApple OSS Distributions { IFM_FDDI_SMF, "SMF" }, \ 536*42e22086SApple OSS Distributions { IFM_FDDI_MMF, "MMF" }, \ 537*42e22086SApple OSS Distributions { IFM_FDDI_UTP, "CDDI" }, \ 538*42e22086SApple OSS Distributions { 0, NULL }, \ 539*42e22086SApple OSS Distributions } 540*42e22086SApple OSS Distributions 541*42e22086SApple OSS Distributions #define IFM_SUBTYPE_FDDI_OPTION_DESCRIPTIONS { \ 542*42e22086SApple OSS Distributions { IFM_FDDI_DA, "Dual-attach" }, \ 543*42e22086SApple OSS Distributions { 0, NULL }, \ 544*42e22086SApple OSS Distributions } 545*42e22086SApple OSS Distributions 546*42e22086SApple OSS Distributions #define IFM_SUBTYPE_IEEE80211_DESCRIPTIONS { \ 547*42e22086SApple OSS Distributions { IFM_IEEE80211_FH1, "FH1" }, \ 548*42e22086SApple OSS Distributions { IFM_IEEE80211_FH2, "FH2" }, \ 549*42e22086SApple OSS Distributions { IFM_IEEE80211_DS1, "DS1" }, \ 550*42e22086SApple OSS Distributions { IFM_IEEE80211_DS2, "DS2" }, \ 551*42e22086SApple OSS Distributions { IFM_IEEE80211_DS5, "DS5" }, \ 552*42e22086SApple OSS Distributions { IFM_IEEE80211_DS11, "DS11" }, \ 553*42e22086SApple OSS Distributions { IFM_IEEE80211_DS22, "DS22" }, \ 554*42e22086SApple OSS Distributions { 0, NULL }, \ 555*42e22086SApple OSS Distributions } 556*42e22086SApple OSS Distributions 557*42e22086SApple OSS Distributions #define IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS { \ 558*42e22086SApple OSS Distributions { IFM_IEEE80211_ADHOC, "adhoc" }, \ 559*42e22086SApple OSS Distributions { 0, NULL }, \ 560*42e22086SApple OSS Distributions } 561*42e22086SApple OSS Distributions 562*42e22086SApple OSS Distributions #define IFM_SUBTYPE_SHARED_DESCRIPTIONS { \ 563*42e22086SApple OSS Distributions { IFM_AUTO, "autoselect" }, \ 564*42e22086SApple OSS Distributions { IFM_MANUAL, "manual" }, \ 565*42e22086SApple OSS Distributions { IFM_NONE, "none" }, \ 566*42e22086SApple OSS Distributions { 0, NULL }, \ 567*42e22086SApple OSS Distributions } 568*42e22086SApple OSS Distributions 569*42e22086SApple OSS Distributions #define IFM_SUBTYPE_SHARED_ALIASES { \ 570*42e22086SApple OSS Distributions { IFM_AUTO, "auto" }, \ 571*42e22086SApple OSS Distributions { 0, NULL }, \ 572*42e22086SApple OSS Distributions } 573*42e22086SApple OSS Distributions 574*42e22086SApple OSS Distributions #define IFM_SHARED_OPTION_DESCRIPTIONS { \ 575*42e22086SApple OSS Distributions { IFM_FDX, "full-duplex" }, \ 576*42e22086SApple OSS Distributions { IFM_HDX, "half-duplex" }, \ 577*42e22086SApple OSS Distributions { IFM_FLOW, "flow-control" }, \ 578*42e22086SApple OSS Distributions { IFM_EEE, "energy-efficient-ethernet" }, \ 579*42e22086SApple OSS Distributions { IFM_FLAG0, "flag0" }, \ 580*42e22086SApple OSS Distributions { IFM_FLAG1, "flag1" }, \ 581*42e22086SApple OSS Distributions { IFM_FLAG2, "flag2" }, \ 582*42e22086SApple OSS Distributions { IFM_LOOP, "hw-loopback" }, \ 583*42e22086SApple OSS Distributions { 0, NULL }, \ 584*42e22086SApple OSS Distributions } 585*42e22086SApple OSS Distributions 586*42e22086SApple OSS Distributions #endif /* _NET_IF_MEDIA_H_ */ 587