From d6fb98dc451080d8516b824d9264bdc0540c30ca Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 29 Apr 2002 05:32:44 +0000 Subject: Move us yet closer to IFM_* definitions in NetBSD. --- sys/net/if_media.h | 84 +++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'sys/net/if_media.h') diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 6f05a28..03941d8 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -121,7 +121,7 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, /* * Ethernet */ -#define IFM_ETHER 0x00000020 +#define IFM_ETHER 0x00000020 #define IFM_10_T 3 /* 10BaseT - RJ45 */ #define IFM_10_2 4 /* 10Base2 - Thinnet */ #define IFM_10_5 5 /* 10Base5 - AUI */ @@ -130,16 +130,17 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, #define IFM_100_T4 8 /* 100BaseT4 - 4 pair cat 3 */ #define IFM_100_VG 9 /* 100VG-AnyLAN */ #define IFM_100_T2 10 /* 100BaseT2 */ -#define IFM_1000_FX 11 /* 1000BaseFX - gigabit over fiber */ -#define IFM_10_STP 12 /* 10BaseT over shielded TP */ -#define IFM_10_FL 13 /* 10baseFL - Fiber */ -#define IFM_1000_SX 14 /* 1000BaseSX Multi-mode Fiber */ -#define IFM_1000_LX 15 /* 1000BaseLX Single-mode Fiber */ -#define IFM_1000_CX 16 /* 1000BaseCX 150ohm STP */ -#define IFM_1000_T 17 /* 1000BaseTX 4 pair cat 5 */ -#define IFM_homePNA 18 /* HomePNA media for ethernet frames */ +#define IFM_1000_SX 11 /* 1000BaseSX - multi-mode fiber */ +#define IFM_10_STP 12 /* 10BaseT over shielded TP */ +#define IFM_10_FL 13 /* 10BaseFL - Fiber */ +#define IFM_1000_LX 14 /* 1000baseLX - single-mode fiber */ +#define IFM_1000_CX 15 /* 1000baseCX - 150ohm STP */ +#define IFM_1000_T 16 /* 1000baseT - 4 pair cat 5 */ +#define IFM_HPNA_1 17 /* HomePNA 1.0 (1Mb/s) */ /* note 31 is the max! */ +#define IFM_ETH_MASTER 0x00000100 /* master mode (1000baseT) */ + /* * Token ring */ @@ -148,14 +149,14 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, #define IFM_TOK_STP16 4 /* Shielded twisted pair 16m - DB9 */ #define IFM_TOK_UTP4 5 /* Unshielded twisted pair 4m - RJ45 */ #define IFM_TOK_UTP16 6 /* Unshielded twisted pair 16m - RJ45 */ -#define IFM_TOK_STP100 7 /* Shielded twisted pair 100m - DB9 */ -#define IFM_TOK_UTP100 8 /* Unshielded twisted pair 100m - RJ45 */ +#define IFM_TOK_STP100 7 /* Shielded twisted pair 100m - DB9 */ +#define IFM_TOK_UTP100 8 /* Unshielded twisted pair 100m - RJ45 */ #define IFM_TOK_ETR 0x00000200 /* Early token release */ #define IFM_TOK_SRCRT 0x00000400 /* Enable source routing features */ #define IFM_TOK_ALLR 0x00000800 /* All routes / Single route bcast */ -#define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */ -#define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */ -#define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic token ring */ +#define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */ +#define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */ +#define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic token ring */ /* * FDDI @@ -163,22 +164,22 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, #define IFM_FDDI 0x00000060 #define IFM_FDDI_SMF 3 /* Single-mode fiber */ #define IFM_FDDI_MMF 4 /* Multi-mode fiber */ -#define IFM_FDDI_UTP 5 /* CDDI / UTP */ -#define IFM_FDDI_DA 0x00000100 /* Dual attach / single attach */ +#define IFM_FDDI_UTP 5 /* CDDI / UTP */ +#define IFM_FDDI_DA 0x00000100 /* Dual attach / single attach */ /* * IEEE 802.11 Wireless */ -#define IFM_IEEE80211 0x00000080 -#define IFM_IEEE80211_FH1 3 /* Frequency Hopping 1Mbps */ -#define IFM_IEEE80211_FH2 4 /* Frequency Hopping 2Mbps */ -#define IFM_IEEE80211_DS1 5 /* Direct Sequence 1Mbps */ -#define IFM_IEEE80211_DS2 6 /* Direct Sequence 2Mbps */ -#define IFM_IEEE80211_DS5 7 /* Direct Sequence 5.5Mbps */ -#define IFM_IEEE80211_DS11 8 /* Direct Sequence 11Mbps */ -#define IFM_IEEE80211_DS22 9 /* Direct Sequence 22Mbps */ -#define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc mode */ -#define IFM_IEEE80211_HOSTAP 0x00000200 /* Operate in Host AP mode */ +#define IFM_IEEE80211 0x00000080 +#define IFM_IEEE80211_FH1 3 /* Frequency Hopping 1Mbps */ +#define IFM_IEEE80211_FH2 4 /* Frequency Hopping 2Mbps */ +#define IFM_IEEE80211_DS1 5 /* Direct Sequence 1Mbps */ +#define IFM_IEEE80211_DS2 6 /* Direct Sequence 2Mbps */ +#define IFM_IEEE80211_DS5 7 /* Direct Sequence 5.5Mbps */ +#define IFM_IEEE80211_DS11 8 /* Direct Sequence 11Mbps */ +#define IFM_IEEE80211_DS22 9 /* Direct Sequence 22Mbps */ +#define IFM_IEEE80211_ADHOC 0x00000100 /* Operate in Adhoc mode */ +#define IFM_IEEE80211_HOSTAP 0x00000200 /* Operate in Host AP mode */ /* * Shared media sub-types @@ -190,11 +191,11 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, /* * Shared options */ -#define IFM_FDX 0x00100000 /* Force full duplex */ +#define IFM_FDX 0x00100000 /* Force full duplex */ #define IFM_HDX 0x00200000 /* Force half duplex */ -#define IFM_FLAG0 0x01000000 /* Driver defined flag */ -#define IFM_FLAG1 0x02000000 /* Driver defined flag */ -#define IFM_FLAG2 0x04000000 /* Driver defined flag */ +#define IFM_FLAG0 0x01000000 /* Driver defined flag */ +#define IFM_FLAG1 0x02000000 /* Driver defined flag */ +#define IFM_FLAG2 0x04000000 /* Driver defined flag */ #define IFM_LOOP 0x08000000 /* Put hardware in loopback */ /* @@ -218,16 +219,16 @@ int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, */ #define IFM_TYPE(x) ((x) & IFM_NMASK) #define IFM_SUBTYPE(x) ((x) & IFM_TMASK) -#define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK) +#define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK) #define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT) -#define IFM_OPTIONS(x) ((x) & (IFM_OMASK|IFM_GMASK)) +#define IFM_OPTIONS(x) ((x) & (IFM_OMASK|IFM_GMASK)) -#define IFM_INST_MAX IFM_INST(IFM_IMASK) +#define IFM_INST_MAX IFM_INST(IFM_IMASK) /* * Macro to create a media word. */ -#define IFM_MAKEWORD(type, subtype, options, instance) \ +#define IFM_MAKEWORD(type, subtype, options, instance) \ ((type) | (subtype) | (options) | ((instance) << IFM_ISHIFT)) /* @@ -259,14 +260,14 @@ struct ifmedia_description { { IFM_100_T4, "100baseT4" }, \ { IFM_100_VG, "100baseVG" }, \ { IFM_100_T2, "100baseT2" }, \ - { IFM_1000_FX, "1000baseFX" }, \ { IFM_10_STP, "10baseSTP" }, \ { IFM_10_FL, "10baseFL" }, \ { IFM_1000_SX, "1000baseSX" }, \ { IFM_1000_LX, "1000baseLX" }, \ { IFM_1000_CX, "1000baseCX" }, \ { IFM_1000_T, "1000baseTX" }, \ - { IFM_homePNA, "homePNA" }, \ + { IFM_1000_T, "1000baseT" }, \ + { IFM_HPNA_1, "homePNA" }, \ { 0, NULL }, \ } @@ -278,17 +279,16 @@ struct ifmedia_description { { IFM_10_5, "AUI" }, \ { IFM_10_5, "10AUI" }, \ { IFM_100_TX, "100TX" }, \ - { IFM_100_FX, "100FX" }, \ { IFM_100_T4, "100T4" }, \ { IFM_100_VG, "100VG" }, \ { IFM_100_T2, "100T2" }, \ - { IFM_1000_FX, "1000FX" }, \ { IFM_10_STP, "10STP" }, \ { IFM_10_FL, "10FL" }, \ - { IFM_1000_FX, "1000SX" }, \ - { IFM_1000_FX, "1000LX" }, \ - { IFM_1000_FX, "1000CX" }, \ - { IFM_1000_FX, "1000TX" }, \ + { IFM_1000_SX, "1000SX" }, \ + { IFM_1000_LX, "1000LX" }, \ + { IFM_1000_CX, "1000CX" }, \ + { IFM_1000_T, "1000TX" }, \ + { IFM_1000_T, "1000T" }, \ { 0, NULL }, \ } -- cgit v1.1