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.
Currently these link types are supported by
ifmedia
:
IFM_ETHER
IFM_FDDI
IFM_IEEE80211
IFM_TDM
IFM_CARP
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.
The following media types are shared by all link types:
IFM_AUTO
IFM_MANUAL
IFM_NONE
The following media options are shared by all link types:
IFM_FDX
IFM_HDX
IFM_FLOW
IFM_FLAG0
IFM_FLAG1
IFM_FLAG2
IFM_LOOP
The following media types are defined for Ethernet:
IFM_10_T
IFM_10_2
IFM_10_5
IFM_10_STP
IFM_10_FL
IFM_100_TX
IFM_100_FX
IFM_100_T4
IFM_100_T2
IFM_100_VG
IFM_1000_SX
IFM_1000_LX
IFM_1000_CX
IFM_1000_T
IFM_1000_TX
IFM_2500_SX
IFM_10G_CX4
IFM_10G_LR
IFM_10G_SFP_CU
IFM_10G_SR
IFM_10G_T
IFM_HPNA_1
The following media options are defined for Ethernet:
IFM_ETH_MASTER
IFM_ETH_RXPAUSE
IFM_ETH_TXPAUSE
The following media types are defined for FDDI:
IFM_FDDI_SMF
IFM_FDDI_MMF
IFM_FDDI_UTP
The following media options are defined for FDDI:
IFM_FDDI_DA
The following media types are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_FH1
IFM_IEEE80211_FH2
IFM_IEEE80211_DS1
IFM_IEEE80211_DS2
IFM_IEEE80211_DS5
IFM_IEEE80211_DS11
IFM_IEEE80211_DS22
IFM_IEEE80211_OFDM6
IFM_IEEE80211_OFDM9
IFM_IEEE80211_OFDM12
IFM_IEEE80211_OFDM18
IFM_IEEE80211_OFDM24
IFM_IEEE80211_OFDM36
IFM_IEEE80211_OFDM48
IFM_IEEE80211_OFDM54
IFM_IEEE80211_OFDM72
The following media options are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_ADHOC
IFM_IEEE80211_HOSTAP
IFM_IEEE80211_IBSS
IFM_IEEE80211_IBSSMASTER
IFM_IEEE80211_MONITOR
IFM_IEEE80211_TURBO
The following media modes are defined for IEEE802.11 Wireless LAN:
IFM_IEEE80211_11A
IFM_IEEE80211_11B
IFM_IEEE80211_11G
IFM_IEEE80211_FH
The channels detailed below are defined for IEEE802.11 Wireless LAN. The list of available frequencies is dependent on radio regulations specified by regional authorities. Recognized regulatory authorities include the FCC (United States), ETSI (Europe), France, and Japan. Frequencies in the table are specified in MHz.
Channel | FCC | ETSI | France | Japan |
1 | 2412 | 2412 | - | 2412 |
2 | 2417 | 2417 | - | 2417 |
3 | 2422 | 2422 | - | 2422 |
4 | 2427 | 2427 | - | 2427 |
5 | 2432 | 2432 | - | 2432 |
6 | 2437 | 2437 | - | 2437 |
7 | 2442 | 2442 | - | 2442 |
8 | 2447 | 2447 | - | 2447 |
9 | 2452 | 2452 | - | 2452 |
10 | 2457 | 2457 | 2457 | 2457 |
11 | 2462 | 2462 | 2462 | 2462 |
12 | - | 2467 | 2467 | 2467 |
13 | - | 2472 | 2472 | 2472 |
14 | - | - | - | 2484 |
Note that the channels do overlap; the bandwidth required for each channel is about 20MHz. When using multiple channels in close proximity it is suggested that channels be separated by at least 25MHz. In the US, this means that only channels 1, 6, and 11 may be used simultaneously without interference.
The following media types are defined for TDM:
IFM_TDM_E1
IFM_TDM_E1_AMI
IFM_TDM_E1_AMI_G704
IFM_TDM_E1_G704
IFM_TDM_E1_G704_CRC4
IFM_TDM_E3
IFM_TDM_E3_G751
IFM_TDM_E3_G832
IFM_TDM_T1
IFM_TDM_T1_AMI
IFM_TDM_T3
IFM_TDM_T3_M13
The following media options are defined for TDM:
IFM_TDM_HDLC_CRC16
IFM_TDM_FR_ANSI
IFM_TDM_FR_CISCO
IFM_TDM_PPP
By default TDM interfaces will use Cisco HDLC encoding with a 32-bit CRC checksum.
The following media modes are defined for TDM:
IFM_TDM_MASTER
carp(4) does not support any media types or options.
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.
Host AP mode was added in OpenBSD 3.1.
September 3, 2011 | OpenBSD-5.3 |