IFMEDIA(4)

πŸ“¦
version 11.0 Β· 2 versions
, in nixpkgs unstable

🌸 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. aka Ethernet, ether.
  • IFM_TOKEN β€” Token Ring. aka TokenRing, token.
  • IFM_FDDI β€” FDDI. aka FDDI.
  • IFM_IEEE80211 β€” IEEE802.11 Wireless LAN. aka IEEE802.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. aka autoselect, auto.
  • IFM_MANUAL β€” Jumper or switch on device selects media. aka manual.
  • IFM_NONE β€” Deselect all media. aka none.

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. aka full-duplex, fdx.
  • IFM_HDX β€” Place the device into half-duplex mode. This option only has meaning if the device is normally not half-duplex. aka half-duplex, hdx.
  • IFM_FLOW β€” Hardware flow control support. aka flowcontrol, flow.
  • IFM_FLAG0 β€” Driver-defined flag. aka flag0.
  • IFM_FLAG1 β€” Driver-defined flag. aka flag1.
  • IFM_FLAG2 β€” Driver-defined flag. aka flag2.
  • IFM_LOOP β€” Place the device into hardware loopback mode. aka loopback, 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. aka HomePNA1, HPNA1.
  • IFM_10_T β€” 10BASE-T, 10 Mb/s over unshielded twisted pair, RJ45 connector. aka 10baseT, UTP, 10UTP.
  • IFM_10_2 β€” 10BASE2, 10 Mb/s over coaxial cable, BNC connector, also called Thinnet. aka 10base2, BNC, 10BNC.
  • IFM_10_5 β€” 10BASE5, 10 Mb/s over 15-wire cables, DB15 connector, also called AUI. aka 10base5, AUI, 10AUI.
  • IFM_10_STP β€” 10BASE-STP, 10 Mb/s over shielded twisted pair, DB9 connector. aka 10baseSTP, STP, 10STP.
  • IFM_10_FL β€” 10BASE-FL, 10 Mb/s over fiber optic cables. aka 10baseFL, FL, 10FL.
  • IFM_100_TX β€” 100BASE-TX, 100 Mb/s over unshielded twisted pair, RJ45 connector. aka 100baseTX, 100TX.
  • IFM_100_FX β€” 100BASE-FX, 100 Mb/s over fiber optic cables. aka 100baseFX, 100FX.
  • IFM_100_T4 β€” 100BASE-T4, 100 Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45 connector. aka 100baseT4, 100T4.
  • IFM_100_T2 β€” 100BASE-T2. aka 100baseT2, 100T2.
  • IFM_100_VG β€” 100VG-AnyLAN. aka 100baseVG, 100VG.
  • IFM_1000_SX β€” 1000BASE-SX, 1 Gb/s over multi-mode fiber optic cables. (short waves) aka 1000baseSX, 1000SX.
  • IFM_1000_LX β€” 1000BASE-LX, 1 Gb/s over single-mode fiber or multi-mode fiber optic cables. (long waves) aka 1000baseLX, 1000LX.
  • IFM_1000_BX10 β€” 1000BASE-BX10, 1 Gb/s over bidirectional fiber optic cables. (long waves) aka 1000BASE-BX10.
  • IFM_1000_CX β€” 1000BASE-CX, 1 Gb/s over shielded twisted pair. (twinax) aka 1000baseCX, 1000CX.
  • IFM_1000_T β€” 1000BASE-T, 1 Gb/s over category 5 unshielded twisted pair, 802.3ab, RJ45 connector. aka 1000baseT, 1000T.
  • IFM_1000_KX β€” 1000BASE-KX, 1 Gb/s backplane. aka 1000BASE-KX, 1000baseKX.
  • IFM_2500_SX β€” 2500BASE-SX, 2.5 Gb/s over multi-mode fiber optic cables. aka 2500baseSX, 2500SX.
  • IFM_2500_T β€” 2.5GBASE-T, 2.5 Gb/s over category 5e. aka 2.5GBASE-T, 2500baseT.
  • IFM_2500_KX β€” 2500BASE-KX, 2.5 Gb/s backplane. aka 2500BASE-KX, 2500baseKX.
  • IFM_5000_T β€” 5GBASE-T, 5 Gb/s over category 6. aka 5GBASE-T, 5GbaseT.
  • IFM_10G_CX4 β€” 10GBASE-CX4, 10 Gb/s over XAUI 4-lane PCS and copper cables. aka 10GbaseCX4, 10GCX4, 10GBASE-CX4.
  • IFM_10G_LR β€” 10GBASE-LR, 10 Gb/s over single-mode fiber optic cables. aka 10GbaseLR, 10GLR.
  • IFM_10G_LRM β€” 10GBASE-LR, 10 Gb/s over single-mode fiber optic cables. aka 10GbaseLRM.
  • IFM_10G_SR β€” 10GBASE-SR, 10 Gb/s over multi-mode fiber optic cables. aka 10GbaseSR, 10GSR, 10GBASE-SR.
  • IFM_10G_T β€” 10GBASE-T, 10 Gb/s over unshielded twisted pair, RJ45 connector. aka 10Gbase-T.
  • IFM_10G_TWINAX β€” SFP+ direct attach, 10 Gb/s over twinaxial cable. aka 10Gbase-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 is IFM_AUTO. aka master.
  • IFM_ETH_TXPAUSE β€” Configure the device to send PAUSE (flow control) frames. This option has no effect (shows current status only) if the media is IFM_AUTO. aka txpause.
  • IFM_ETH_RXPAUSE β€” Configure the device to receive PAUSE (flow control) frames. This option has no effect (shows current status only) if the media is IFM_AUTO. aka rxpause.

πŸ’ 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. aka DB9/4Mbit, 4STP.
  • IFM_TOK_STP16 β€” 16 Mb/s, shielded twisted pair, DB9 connector. aka DB9/16Mbit, 16STP.
  • IFM_TOK_UTP4 β€” 4 Mb/s, unshielded twisted pair, RJ45 connector. aka UTP/4Mbit, 4UTP.
  • IFM_TOK_UTP16 β€” 16 Mb/s, unshielded twisted pair, RJ45 connector. aka UTP/16Mbit, 16UTP.

The following media options are defined for Token Ring:

  • IFM_TOK_ETR β€” Early token release. aka EarlyTokenRelease, ETR.
  • IFM_TOK_SRCRT β€” Enable source routing features. aka SourceRouting, SRCRT.
  • IFM_TOK_ALLR β€” All routes vs. single route broadcast. aka AllRoutes, ALLR.

πŸ¦‹ Media Types and Options for FDDI πŸ¦‹

The following media types are defined for FDDI:

  • IFM_FDDI_SMF β€” Single-mode fiber. aka Single-mode, SMF.
  • IFM_FDDI_MMF β€” Multi-mode fiber. aka Multi-mode, MMF.
  • IFM_FDDI_UTP β€” Unshielded twisted pair, RJ45 connector. aka UTP, CDDI.

The following media options are defined for FDDI:

  • IFM_FDDI_DA β€” Dual-attached station vs. Single-attached station. aka dual-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. aka FH1.
  • IFM_IEEE80211_FH2 β€” Frequency Hopping 2 Mbps. aka FH2.
  • IFM_IEEE80211_DS1 β€” Direct Sequence 1 Mbps. aka DS1.
  • IFM_IEEE80211_DS2 β€” Direct Sequence 2 Mbps. aka DS2.
  • IFM_IEEE80211_DS5 β€” Direct Sequence 5 Mbps. aka DS5.
  • IFM_IEEE80211_DS11 β€” Direct Sequence 11 Mbps. aka DS11.
  • IFM_IEEE80211_DS22 β€” Direct Sequence 22 Mbps. aka DS22.
  • IFM_IEEE80211_OFDM6 β€” Orthogonal Frequency Division Multiplexing 6 Mbps. aka OFDM6.
  • IFM_IEEE80211_OFDM9 β€” Orthogonal Frequency Division Multiplexing 9 Mbps. aka OFDM9.
  • IFM_IEEE80211_OFDM12 β€” Orthogonal Frequency Division Multiplexing 12 Mbps. aka OFDM12.
  • IFM_IEEE80211_OFDM18 β€” Orthogonal Frequency Division Multiplexing 18 Mbps. aka OFDM18.
  • IFM_IEEE80211_OFDM24 β€” Orthogonal Frequency Division Multiplexing 24 Mbps. aka OFDM24.
  • IFM_IEEE80211_OFDM36 β€” Orthogonal Frequency Division Multiplexing 36 Mbps. aka OFDM36.
  • IFM_IEEE80211_OFDM48 β€” Orthogonal Frequency Division Multiplexing 48 Mbps. aka OFDM48.
  • IFM_IEEE80211_OFDM54 β€” Orthogonal Frequency Division Multiplexing 54 Mbps. aka OFDM54.
  • IFM_IEEE80211_OFDM72 β€” Orthogonal Frequency Division Multiplexing 72 Mbps. aka OFDM72.

The following media options are defined for IEEE802.11 Wireless LAN:

  • IFM_IEEE80211_ADHOC β€” Ad-hoc (IBSS) mode. aka adhoc, 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_HOSTAP β€” Access Point mode. aka hostap.
  • IFM_IEEE80211_MONITOR β€” Monitor mode. aka monitor.
  • IFM_IEEE80211_TURBO β€” Turbo mode. aka turbo.

πŸ”₯ 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
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms