NAME
ifmedia
—
network interface media
settings
SYNOPSIS
#include
<sys/socket.h>
#include <net/if.h>
#include <net/if_media.h>
DESCRIPTION
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.
There are currently four link types supported by
ifmedia
:
IFM_ATM
- Asynchronous Transfer Mode
IFM_CARP
- Common Address Redundancy Protocol
IFM_ETHER
- Ethernet
IFM_IEEE80211
- IEEE802.11 Wireless LAN
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 lists below provide the possible names of each media type or option. The first name in the list is the canonical name of the media type or option. Additional names are acceptable aliases for the media type or option.
COMMON MEDIA TYPES AND OPTIONS
The following media types are shared by all link types:
IFM_AUTO
- Autoselect the best media. [autoselect, auto]
IFM_MANUAL
- Jumper or switch on device selects media. [manual]
IFM_NONE
- Deselect all media. [none]
The following media options 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. [full-duplex]
IFM_HDX
- Place the device into half-duplex mode. This option only has meaning if the device is normally not half-duplex. [half-duplex]
IFM_FLAG0
- Driver-defined flag. [flag0]
IFM_FLAG1
- Driver-defined flag. [flag1]
IFM_FLAG2
- Driver-defined flag. [flag2]
IFM_LOOP
- Place the device into hardware loopback mode. [hw-loopback]
MEDIA TYPES AND OPTIONS FOR ASYNCHRONOUS TRANSFER MODE
The following media types are defined for Asynchronous Transfer Mode:
IFM_ATM_UNKNOWN
- Unknown media type. [Unknown, UNKNOWN]
IFM_ATM_UTP_25
- 25Mb/s over unshielded twisted pair. [UTP/25.6MBit, UTP-25]
IFM_ATM_TAXI_100
- AMD TAXI, 100Mb/s over multi-mode fiber optic cables. [Taxi/100MBit, TAXI-100]
IFM_ATM_TAXI_140
- AMD TAXI, 140Mb/s over multi-node fiber optic cables. [Taxi/140MBit, TAXI-140]
IFM_ATM_MM_155
- 155Mb/s over multi-mode fiber optic cables. [Multi-mode/155MBit, MM-155]
IFM_ATM_SM_155
- 155Mb/s over single-mode fiber optic cables. [Single-mode/155MBit, SM-155]
IFM_ATM_UTP_155
- 155Mb/s over unshielded twisted pair. [UTP/155Mbit, UTP-155]
IFM_ATM_MM_622
- 622Mb/s over multi-mode fiber optic cables. [Multi-mode/622MBit, MM-622]
IFM_ATM_SM_622
- 622Mb/s over single-mode fiber optic cables. [Single-mode/622MBit, SM-622]
MEDIA TYPES AND OPTIONS FOR ETHERNET
The following media types are defined for Ethernet:
IFM_HPNA_1
- HomePNA 1.0, 1Mb/s. [homePNA]
IFM_10_T
- 10BASE-T, 10Mb/s over unshielded twisted pair, RJ45 connector. [10baseT/UTP, UTP, 10UTP]
IFM_10_2
- 10BASE2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet. [10base2/BNC, BNC, 10BNC]
IFM_10_5
- 10BASE5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI. [10base5/AUI, AUI, 10AUI]
IFM_10_STP
- 10BASE-STP, 10Mb/s over shielded twisted pair, DB9 connector. [10baseSTP, 10STP]
IFM_10_FL
- 10BASE-FL, 10Mb/s over fiber optic cables. [10baseFL, 10FL]
IFM_100_TX
- 100BASE-TX, 100Mb/s over unshielded twisted pair, RJ45 connector. [100baseTX, 100TX]
IFM_100_FX
- 100BASE-FX, 100Mb/s over fiber optic cables. [100baseFX, 100FX]
IFM_100_T4
- 100BASE-T4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45 connector. [100baseT4, 100T4]
IFM_100_T2
- 100BASE-T2. [100baseT2, 100T2]
IFM_100_VG
- 100VG-AnyLAN. [100baseVG, 100VG]
IFM_1000_SX
- 1000BASE-SX, 1Gb/s over multi-mode fiber optic cables. (short waves) [1000baseSX, 1000SX]
IFM_1000_LX
- 1000BASE-LX, 1Gb/s over single-mode fiber optic cables. (long waves) [1000baseLX, 1000LX]
IFM_1000_CX
- 1000BASE-CX, 1Gb/s over shielded twisted pair. (twinax) [1000baseCX, 1000CX]
IFM_1000_T
- 1000BASE-T, 1Gb/s over category 5 unshielded twisted pair, 802.3ab, RJ45 connector. [1000baseT, 1000T]
IFM_10G_LR
- 10GBASE-LR, 10Gb/s over single-mode fiber optic cables. [10Gbase-LR]
IFM_10G_SR
- 10GBASE-SR, 10Gb/s over multi-mode fiber optic cables. [10Gbase-SR]
IFM_10G_CX4
- 10GBASE-CX4, 10Gb/s over XAUI 4-lane PCS and copper cables. [10Gbase-CX4]
IFM_2500_SX
- 2500BASE-SX, 2.5Gb/s over multi-mode fiber optic cables. [2500BaseSX, 2500SX]
IFM_10G_T
- 10GBASE-T, 10Gb/s over unshielded twisted pair, RJ45 connector. [10Gbase-T]
IFM_40G_CR4
- 40GBASE-CR4, 40Gb/s over twin-ax copper cable. [40GBASE-CR4]
IFM_40G_SR4
- 40GBASE-SR4, 40Gb/s over multi-mode fiber optic cables. [40GBASE-SR4]
IFM_40G_LR4
- 40GBASE-LR4, 40Gb/s over single-mode fiber optic cables. [40GBASE-LR4]
The following media options 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
. 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
. 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
.
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 1Mbps. [FH/1Mbps, FH1, FrequencyHopping/1Mbps]
IFM_IEEE80211_FH2
- Frequency Hopping 2Mbps. [FH/2Mbps, FH2, FrequencyHopping/2Mbps]
IFM_IEEE80211_DS354k
- Direct Sequence 354Kbps. [DS/354Kbps, DS354K, DirectSequence/354Kbps]
IFM_IEEE80211_DS512k
- Direct Sequence 512Kbps. [DS/512Kbps, DS512K, DirectSequence/512Kbps]
IFM_IEEE80211_DS1
- Direct Sequence 1Mbps. [DS/1Mbps, DS1, DirectSequence/1Mbps, CCK1]
IFM_IEEE80211_DS2
- Direct Sequence 2Mbps. [DS/2Mbps, DS2, DirectSequence/2Mbps, CCK2]
IFM_IEEE80211_DS5
- Direct Sequence 5Mbps. [DS/5.5Mbps, DS5, DirectSequence/5.5Mbps, CCK5.5]
IFM_IEEE80211_DS11
- Direct Sequence 11Mbps. [DS/11Mbps, DS11, DirectSequence/11Mbps, CCK11]
IFM_IEEE80211_DS22
- Direct Sequence 22Mbps. [DS/22Mbps, DS22, DirectSequence/22Mbps]
IFM_IEEE80211_OFDM3
- Orthogonal Frequency Division Multiplexing 3Mbps. [OFDM/3Mbps OFDM3]
IFM_IEEE80211_OFDM4
- Orthogonal Frequency Division Multiplexing 4.5Mbps. [OFDM/4.5Mbps OFDM4.5]
IFM_IEEE80211_OFDM6
- Orthogonal Frequency Division Multiplexing 6Mbps. [OFDM/6Mbps, OFDM6]
IFM_IEEE80211_OFDM9
- Orthogonal Frequency Division Multiplexing 9Mbps. [OFDM/9Mbps, OFDM9]
IFM_IEEE80211_OFDM12
- Orthogonal Frequency Division Multiplexing 12Mbps. [OFDM/12Mbps, OFDM12]
IFM_IEEE80211_OFDM18
- Orthogonal Frequency Division Multiplexing 18Mbps. [OFDM/18Mbps, OFDM18]
IFM_IEEE80211_OFDM24
- Orthogonal Frequency Division Multiplexing 24Mbps. [OFDM/24Mbps, OFDM24]
IFM_IEEE80211_OFDM27
- Orthogonal Frequency Division Multiplexing 27Mbps. [OFDM/27Mbps, OFDM27]
IFM_IEEE80211_OFDM36
- Orthogonal Frequency Division Multiplexing 36Mbps. [OFDM/36Mbps, OFDM36]
IFM_IEEE80211_OFDM48
- Orthogonal Frequency Division Multiplexing 48Mbps. [OFDM/48Mbps, OFDM48]
IFM_IEEE80211_OFDM54
- Orthogonal Frequency Division Multiplexing 54Mbps. [OFDM/54Mbps, OFDM54]
IFM_IEEE80211_OFDM72
- Orthogonal Frequency Division Multiplexing 72Mbps. [OFDM/72Mbps, OFDM72]
The following media options are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_ADHOC
- Ad-hoc mode. [adhoc]
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. [hostap]
IFM_IEEE80211_IBSS
- IBSS mode. [ibss]
IFM_IEEE80211_MBSS
- MBSS mode. [mesh]
IFM_IEEE80211_MONITOR
- Monitor mode. [monitor]
IFM_IEEE80211_TURBO
- Turbo mode. [turbo]
IFM_IEEE80211_WDS
- WDS mode. [wds]
The following operating modes are defined for IEEE802.11 Wireless LAN:
IFM_AUTO
- Autoselect the best mode. [autoselect, auto]
IFM_IEEE80211_11A
- Orthogonal Frequency Division Multiplexing, 5GHz. [11a]
IFM_IEEE80211_11NA
- High Throughput, 5GHz. [11na]
IFM_IEEE80211_11B
- Direct Sequence mode. [11b]
IFM_IEEE80211_11G
- Complementary Code Keying, 2GHz. [11g]
IFM_IEEE80211_11NG
- High Throughput, 2GHz. [11ng]
IFM_IEEE80211_FH
- Gaussian Frequency Shift Keying, 2GHz. [fh]