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