| IFMEDIA(4) | Device Drivers Manual | IFMEDIA(4) |
ifmedia — network
interface media settings
#include
<sys/socket.h>
#include <net/if.h>
#include <net/if_media.h>
The ifmedia interface provides a
consistent method for querying and setting network interface media and media
options. The media is typically set using the
ifconfig(8) command.
The lists below provide the possible names of each link type, media type, or option. The first name in the list is the canonical name. Additional names are accepted aliases.
There are currently four link types supported by
ifmedia:
IFM_ETHEREthernet,
ether]IFM_TOKENTokenRing,
token]IFM_FDDIFDDI]IFM_IEEE80211IEEE802.11]The following sections describe the possible media settings for each link type. Not all of these are supported by every device; refer to your device's manual page for more information.
The following media types
(media) are shared by all link types:
IFM_AUTOautoselect,
auto]IFM_MANUALmanual]IFM_NONEnone]The following media options
(mediaopt) are shared by all link types:
IFM_FDXfull-duplex, fdx]IFM_HDXhalf-duplex, hdx]IFM_FLOWflowcontrol,
flow]IFM_FLAG0flag0]IFM_FLAG1flag1]IFM_FLAG2flag2]IFM_LOOPloopback, hw-loopback,
loop]The following media types are defined for Ethernet:
IFM_HPNA_1HomePNA1,
HPNA1]IFM_10_T10baseT, UTP,
10UTP]IFM_10_210base2, BNC,
10BNC]IFM_10_510base5, AUI,
10AUI]IFM_10_STP10baseSTP, STP,
10STP]IFM_10_FL10baseFL, FL,
10FL]IFM_100_TX100baseTX, 100TX]IFM_100_FX100baseFX, 100FX]IFM_100_T4100baseT4,
100T4]IFM_100_T2100baseT2,
100T2]IFM_100_VG100baseVG,
100VG]IFM_1000_SX1000baseSX,
1000SX]IFM_1000_LX1000baseLX,
1000LX]IFM_1000_BX101000BASE-BX10]IFM_1000_CX1000baseCX, 1000CX]IFM_1000_T1000baseT,
1000T]IFM_1000_KX1000BASE-KX,
1000baseKX]IFM_2500_SX2500baseSX, 2500SX]IFM_2500_T2.5GBASE-T,
2500baseT]IFM_2500_KX2500BASE-KX,
2500baseKX]IFM_5000_T5GBASE-T, 5GbaseT]IFM_10G_CX410GbaseCX4, 10GCX4,
10GBASE-CX4]IFM_10G_LR10GbaseLR, 10GLR]IFM_10G_LRM10GbaseLRM]IFM_10G_SR10GbaseSR, 10GSR,
10GBASE-SR]IFM_10G_T10Gbase-T]IFM_10G_TWINAX10Gbase-Twinax]The following media options are defined for Ethernet:
IFM_ETH_MASTERIFM_AUTO. [master]IFM_ETH_TXPAUSEIFM_AUTO. [txpause]IFM_ETH_RXPAUSEIFM_AUTO. [rxpause]The following media types are defined for Token Ring:
IFM_TOK_STP4DB9/4Mbit, 4STP]IFM_TOK_STP16DB9/16Mbit, 16STP]IFM_TOK_UTP4UTP/4Mbit, 4UTP]IFM_TOK_UTP16UTP/16Mbit, 16UTP]The following media options are defined for Token Ring:
IFM_TOK_ETREarlyTokenRelease,
ETR]IFM_TOK_SRCRTSourceRouting,
SRCRT]IFM_TOK_ALLRAllRoutes,
ALLR]The following media types are defined for FDDI:
IFM_FDDI_SMFSingle-mode,
SMF]IFM_FDDI_MMFMulti-mode,
MMF]IFM_FDDI_UTPUTP,
CDDI]The following media options are defined for FDDI:
IFM_FDDI_DAdual-attach, das]The following media types are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_FH1FH1]IFM_IEEE80211_FH2FH2]IFM_IEEE80211_DS1DS1]IFM_IEEE80211_DS2DS2]IFM_IEEE80211_DS5DS5]IFM_IEEE80211_DS11DS11]IFM_IEEE80211_DS22DS22]IFM_IEEE80211_OFDM6OFDM6]IFM_IEEE80211_OFDM9OFDM9]IFM_IEEE80211_OFDM12OFDM12]IFM_IEEE80211_OFDM18OFDM18]IFM_IEEE80211_OFDM24OFDM24]IFM_IEEE80211_OFDM36OFDM36]IFM_IEEE80211_OFDM48OFDM48]IFM_IEEE80211_OFDM54OFDM54]IFM_IEEE80211_OFDM72OFDM72]The following media options are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_ADHOCadhoc,
ibss]
In some drivers, it may be used with the
IFM_FLAG0 [flag0] media
option to specify non-standard ad-hoc demo mode.
IFM_IEEE80211_HOSTAPhostap]IFM_IEEE80211_MONITORmonitor]IFM_IEEE80211_TURBOturbo]The ifmedia interface first appeared in
BSD/OS 3.0. The implementation that appeared in
NetBSD 1.3 was written by Jonathan Stone and Jason
R. Thorpe to be compatible with the BSDI API. It has since gone through
several revisions which have extended the API while maintaining backwards
compatibility with the original API.
Support for the IEEE802.11 Wireless LAN link type was added in NetBSD 1.5.
| August 3, 2018 | NetBSD 11.0 |