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_ETHER
Ethernet
,
ether
]IFM_TOKEN
TokenRing
,
token
]IFM_FDDI
FDDI
]IFM_IEEE80211
IEEE802.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_AUTO
autoselect
,
auto
]IFM_MANUAL
manual
]IFM_NONE
none
]The following media options
(mediaopt
) are shared by all link types:
IFM_FDX
full-duplex
, fdx
]IFM_HDX
half-duplex
, hdx
]IFM_FLOW
flowcontrol
,
flow
]IFM_FLAG0
flag0
]IFM_FLAG1
flag1
]IFM_FLAG2
flag2
]IFM_LOOP
loopback
, hw-loopback
,
loop
]The following media types are defined for Ethernet:
IFM_HPNA_1
HomePNA1
,
HPNA1
]IFM_10_T
10baseT
, UTP
,
10UTP
]IFM_10_2
10base2
, BNC
,
10BNC
]IFM_10_5
10base5
, AUI
,
10AUI
]IFM_10_STP
10baseSTP
, STP
,
10STP
]IFM_10_FL
10baseFL
, FL
,
10FL
]IFM_100_TX
100baseTX
, 100TX
]IFM_100_FX
100baseFX
, 100FX
]IFM_100_T4
100baseT4
,
100T4
]IFM_100_T2
100baseT2
,
100T2
]IFM_100_VG
100baseVG
,
100VG
]IFM_1000_SX
1000baseSX
,
1000SX
]IFM_1000_LX
1000baseLX
,
1000LX
]IFM_1000_BX10
1000BASE-BX10
]IFM_1000_CX
1000baseCX
, 1000CX
]IFM_1000_T
1000baseT
,
1000T
]IFM_1000_KX
1000BASE-KX
,
1000baseKX
]IFM_2500_SX
2500baseSX
, 2500SX
]IFM_2500_T
2.5GBASE-T
,
2500baseT
]IFM_2500_KX
2500BASE-KX
,
2500baseKX
]IFM_5000_T
5GBASE-T
, 5GbaseT
]IFM_10G_CX4
10GbaseCX4
, 10GCX4
,
10GBASE-CX4
]IFM_10G_LR
10GbaseLR
, 10GLR
]IFM_10G_LRM
10GbaseLRM
]IFM_10G_SR
10GbaseSR
, 10GSR
,
10GBASE-SR
]IFM_10G_T
10Gbase-T
]IFM_10G_TWINAX
10Gbase-Twinax
]The following media options are defined for Ethernet:
IFM_ETH_MASTER
IFM_AUTO
. [master
]IFM_ETH_TXPAUSE
IFM_AUTO
. [txpause
]IFM_ETH_RXPAUSE
IFM_AUTO
. [rxpause
]The following media types are defined for Token Ring:
IFM_TOK_STP4
DB9/4Mbit
, 4STP
]IFM_TOK_STP16
DB9/16Mbit
, 16STP
]IFM_TOK_UTP4
UTP/4Mbit
, 4UTP
]IFM_TOK_UTP16
UTP/16Mbit
, 16UTP
]The following media options are defined for Token Ring:
IFM_TOK_ETR
EarlyTokenRelease
,
ETR
]IFM_TOK_SRCRT
SourceRouting
,
SRCRT
]IFM_TOK_ALLR
AllRoutes
,
ALLR
]The following media types are defined for FDDI:
IFM_FDDI_SMF
Single-mode
,
SMF
]IFM_FDDI_MMF
Multi-mode
,
MMF
]IFM_FDDI_UTP
UTP,
CDDI
]The following media options are defined for FDDI:
IFM_FDDI_DA
dual-attach
, das
]The following media types are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_FH1
FH1
]IFM_IEEE80211_FH2
FH2
]IFM_IEEE80211_DS1
DS1
]IFM_IEEE80211_DS2
DS2
]IFM_IEEE80211_DS5
DS5
]IFM_IEEE80211_DS11
DS11
]IFM_IEEE80211_DS22
DS22
]IFM_IEEE80211_OFDM6
OFDM6
]IFM_IEEE80211_OFDM9
OFDM9
]IFM_IEEE80211_OFDM12
OFDM12
]IFM_IEEE80211_OFDM18
OFDM18
]IFM_IEEE80211_OFDM24
OFDM24
]IFM_IEEE80211_OFDM36
OFDM36
]IFM_IEEE80211_OFDM48
OFDM48
]IFM_IEEE80211_OFDM54
OFDM54
]IFM_IEEE80211_OFDM72
OFDM72
]The following media options are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_ADHOC
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
hostap
]IFM_IEEE80211_MONITOR
monitor
]IFM_IEEE80211_TURBO
turbo
]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 10.99 |