IFMEDIA(4)
πΈ NAME πΈ
okay bestie, meet IFMEDIA(4) β the manual page for ifmedia, aka network interface media settings. This is the whole vibe for querying and setting your network interface's media situation. π
π SYNOPSIS π
#include <sys/socket.h>
#include <net/if.h>
#include <net/if_media.h>
β¨ DESCRIPTION β¨
Okay so the ifmedia interface gives you 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 give you 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_ETHERβ Ethernet. akaEthernet,ether.IFM_TOKENβ Token Ring. akaTokenRing,token.IFM_FDDIβ FDDI. akaFDDI.IFM_IEEE80211β IEEE802.11 Wireless LAN. akaIEEE802.11.
The following sections describe the possible media settings for each link type.
bestie, not all of these are supported by every device β refer to your device's manual page for more info. π«Ά
π Common Media Types and Options π
The following media types (media) are shared by all link types:
IFM_AUTOβ Autoselect the best media. akaautoselect,auto.IFM_MANUALβ Jumper or switch on device selects media. akamanual.IFM_NONEβ Deselect all media. akanone.
The following media options (mediaopt) are shared by all link types:
IFM_FDXβ Place the device into full-duplex mode. This option only has meaning if the device is normally not full-duplex. akafull-duplex,fdx.IFM_HDXβ Place the device into half-duplex mode. This option only has meaning if the device is normally not half-duplex. akahalf-duplex,hdx.IFM_FLOWβ Hardware flow control support. akaflowcontrol,flow.IFM_FLAG0β Driver-defined flag. akaflag0.IFM_FLAG1β Driver-defined flag. akaflag1.IFM_FLAG2β Driver-defined flag. akaflag2.IFM_LOOPβ Place the device into hardware loopback mode. akaloopback,hw-loopback,loop.
π Media Types and Options for Ethernet π
The following media types are defined for Ethernet:
IFM_HPNA_1β HomePNA 1.0, 1 Mb/s. akaHomePNA1,HPNA1.IFM_10_Tβ 10BASE-T, 10 Mb/s over unshielded twisted pair, RJ45 connector. aka10baseT,UTP,10UTP.IFM_10_2β 10BASE2, 10 Mb/s over coaxial cable, BNC connector, also called Thinnet. aka10base2,BNC,10BNC.IFM_10_5β 10BASE5, 10 Mb/s over 15-wire cables, DB15 connector, also called AUI. aka10base5,AUI,10AUI.IFM_10_STPβ 10BASE-STP, 10 Mb/s over shielded twisted pair, DB9 connector. aka10baseSTP,STP,10STP.IFM_10_FLβ 10BASE-FL, 10 Mb/s over fiber optic cables. aka10baseFL,FL,10FL.IFM_100_TXβ 100BASE-TX, 100 Mb/s over unshielded twisted pair, RJ45 connector. aka100baseTX,100TX.IFM_100_FXβ 100BASE-FX, 100 Mb/s over fiber optic cables. aka100baseFX,100FX.IFM_100_T4β 100BASE-T4, 100 Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45 connector. aka100baseT4,100T4.IFM_100_T2β 100BASE-T2. aka100baseT2,100T2.IFM_100_VGβ 100VG-AnyLAN. aka100baseVG,100VG.IFM_1000_SXβ 1000BASE-SX, 1 Gb/s over multi-mode fiber optic cables. (short waves) aka1000baseSX,1000SX.IFM_1000_LXβ 1000BASE-LX, 1 Gb/s over single-mode fiber or multi-mode fiber optic cables. (long waves) aka1000baseLX,1000LX.IFM_1000_BX10β 1000BASE-BX10, 1 Gb/s over bidirectional fiber optic cables. (long waves) aka1000BASE-BX10.IFM_1000_CXβ 1000BASE-CX, 1 Gb/s over shielded twisted pair. (twinax) aka1000baseCX,1000CX.IFM_1000_Tβ 1000BASE-T, 1 Gb/s over category 5 unshielded twisted pair, 802.3ab, RJ45 connector. aka1000baseT,1000T.IFM_1000_KXβ 1000BASE-KX, 1 Gb/s backplane. aka1000BASE-KX,1000baseKX.IFM_2500_SXβ 2500BASE-SX, 2.5 Gb/s over multi-mode fiber optic cables. aka2500baseSX,2500SX.IFM_2500_Tβ 2.5GBASE-T, 2.5 Gb/s over category 5e. aka2.5GBASE-T,2500baseT.IFM_2500_KXβ 2500BASE-KX, 2.5 Gb/s backplane. aka2500BASE-KX,2500baseKX.IFM_5000_Tβ 5GBASE-T, 5 Gb/s over category 6. aka5GBASE-T,5GbaseT.IFM_10G_CX4β 10GBASE-CX4, 10 Gb/s over XAUI 4-lane PCS and copper cables. aka10GbaseCX4,10GCX4,10GBASE-CX4.IFM_10G_LRβ 10GBASE-LR, 10 Gb/s over single-mode fiber optic cables. aka10GbaseLR,10GLR.IFM_10G_LRMβ 10GBASE-LR, 10 Gb/s over single-mode fiber optic cables. aka10GbaseLRM.IFM_10G_SRβ 10GBASE-SR, 10 Gb/s over multi-mode fiber optic cables. aka10GbaseSR,10GSR,10GBASE-SR.IFM_10G_Tβ 10GBASE-T, 10 Gb/s over unshielded twisted pair, RJ45 connector. aka10Gbase-T.IFM_10G_TWINAXβ SFP+ direct attach, 10 Gb/s over twinaxial cable. aka10Gbase-Twinax.
The following media options are defined for Ethernet:
IFM_ETH_MASTERβ Configure a 1000BASE-T PHY as the clock master for a 1000BASE-T link. This option has no effect (shows current status only) if the media isIFM_AUTO. akamaster.IFM_ETH_TXPAUSEβ Configure the device to send PAUSE (flow control) frames. This option has no effect (shows current status only) if the media isIFM_AUTO. akatxpause.IFM_ETH_RXPAUSEβ Configure the device to receive PAUSE (flow control) frames. This option has no effect (shows current status only) if the media isIFM_AUTO. akarxpause.
π Media Types and Options for Token Ring π
The following media types are defined for Token Ring:
IFM_TOK_STP4β 4 Mb/s, shielded twisted pair, DB9 connector. akaDB9/4Mbit,4STP.IFM_TOK_STP16β 16 Mb/s, shielded twisted pair, DB9 connector. akaDB9/16Mbit,16STP.IFM_TOK_UTP4β 4 Mb/s, unshielded twisted pair, RJ45 connector. akaUTP/4Mbit,4UTP.IFM_TOK_UTP16β 16 Mb/s, unshielded twisted pair, RJ45 connector. akaUTP/16Mbit,16UTP.
The following media options are defined for Token Ring:
IFM_TOK_ETRβ Early token release. akaEarlyTokenRelease,ETR.IFM_TOK_SRCRTβ Enable source routing features. akaSourceRouting,SRCRT.IFM_TOK_ALLRβ All routes vs. single route broadcast. akaAllRoutes,ALLR.
π¦ Media Types and Options for FDDI π¦
The following media types are defined for FDDI:
IFM_FDDI_SMFβ Single-mode fiber. akaSingle-mode,SMF.IFM_FDDI_MMFβ Multi-mode fiber. akaMulti-mode,MMF.IFM_FDDI_UTPβ Unshielded twisted pair, RJ45 connector. akaUTP,CDDI.
The following media options are defined for FDDI:
IFM_FDDI_DAβ Dual-attached station vs. Single-attached station. akadual-attach,das.
π§ Media Types and Options for IEEE802.11 Wireless LAN π§
The following media types are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_FH1β Frequency Hopping 1 Mbps. akaFH1.IFM_IEEE80211_FH2β Frequency Hopping 2 Mbps. akaFH2.IFM_IEEE80211_DS1β Direct Sequence 1 Mbps. akaDS1.IFM_IEEE80211_DS2β Direct Sequence 2 Mbps. akaDS2.IFM_IEEE80211_DS5β Direct Sequence 5 Mbps. akaDS5.IFM_IEEE80211_DS11β Direct Sequence 11 Mbps. akaDS11.IFM_IEEE80211_DS22β Direct Sequence 22 Mbps. akaDS22.IFM_IEEE80211_OFDM6β Orthogonal Frequency Division Multiplexing 6 Mbps. akaOFDM6.IFM_IEEE80211_OFDM9β Orthogonal Frequency Division Multiplexing 9 Mbps. akaOFDM9.IFM_IEEE80211_OFDM12β Orthogonal Frequency Division Multiplexing 12 Mbps. akaOFDM12.IFM_IEEE80211_OFDM18β Orthogonal Frequency Division Multiplexing 18 Mbps. akaOFDM18.IFM_IEEE80211_OFDM24β Orthogonal Frequency Division Multiplexing 24 Mbps. akaOFDM24.IFM_IEEE80211_OFDM36β Orthogonal Frequency Division Multiplexing 36 Mbps. akaOFDM36.IFM_IEEE80211_OFDM48β Orthogonal Frequency Division Multiplexing 48 Mbps. akaOFDM48.IFM_IEEE80211_OFDM54β Orthogonal Frequency Division Multiplexing 54 Mbps. akaOFDM54.IFM_IEEE80211_OFDM72β Orthogonal Frequency Division Multiplexing 72 Mbps. akaOFDM72.
The following media options are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_ADHOCβ Ad-hoc (IBSS) mode. akaadhoc,ibss.- In some drivers, it may be used with the
IFM_FLAG0(flag0) media option to specify non-standard ad-hoc demo mode.
- In some drivers, it may be used with the
IFM_IEEE80211_HOSTAPβ Access Point mode. akahostap.IFM_IEEE80211_MONITORβ Monitor mode. akamonitor.IFM_IEEE80211_TURBOβ Turbo mode. akaturbo.
π₯ SEE ALSO π₯
π HISTORY π
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.
mwah π β source/version: Debian; date: August 3, 2018; manual: IFMEDIA(4). byeee π«Ά
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 1998, 1999, 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms