xref: /openbsd-src/share/man/man4/ifmedia.4 (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1.\"	$OpenBSD: ifmedia.4,v 1.6 2001/03/01 16:11:17 aaron Exp $
2.\"	$NetBSD: ifmedia.4,v 1.1 1998/08/09 00:37:17 thorpej Exp $
3.\"
4.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
5.\" All rights reserved.
6.\"
7.\" This code is derived from software contributed to The NetBSD Foundation
8.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9.\" NASA Ames Research Center.
10.\"
11.\" Redistribution and use in source and binary forms, with or without
12.\" modification, are permitted provided that the following conditions
13.\" are met:
14.\" 1. Redistributions of source code must retain the above copyright
15.\"    notice, this list of conditions and the following disclaimer.
16.\" 2. Redistributions in binary form must reproduce the above copyright
17.\"    notice, this list of conditions and the following disclaimer in the
18.\"    documentation and/or other materials provided with the distribution.
19.\" 3. All advertising materials mentioning features or use of this software
20.\"    must display the following acknowledgement:
21.\"        This product includes software developed by the NetBSD
22.\"        Foundation, Inc. and its contributors.
23.\" 4. Neither the name of The NetBSD Foundation nor the names of its
24.\"    contributors may be used to endorse or promote products derived
25.\"    from this software without specific prior written permission.
26.\"
27.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
28.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
31.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37.\" POSSIBILITY OF SUCH DAMAGE.
38.\"
39.Dd August 8, 1998
40.Dt IFMEDIA 4
41.Os
42.Sh NAME
43.Nm ifmedia
44.Nd network interface media settings
45.Sh SYNOPSIS
46.Fd #include <sys/socket.h>
47.Fd #include <net/if.h>
48.Fd #include <net/if_media.h>
49.Sh DESCRIPTION
50The
51.Nm
52interface provides a consistent method for querying and setting
53network interface media and media options.  The media is typically
54set using the
55.Xr ifconfig 8
56command.
57.Pp
58There are currently three link types supported by
59.Nm ifmedia :
60.Pp
61.Bl -tag -offset indent -width IFM_ETHER -compact
62.It Dv IFM_ETHER
63Ethernet
64.It Dv IFM_TOKEN
65Token Ring
66.It Dv IFM_FDDI
67FDDI
68.El
69.Pp
70The following sections describe the possible media settings for each
71link type.  Not all of these are supported by every device; refer to
72your device's manual page for more information.
73.Pp
74The lists below provide the possible names of each media type or option.
75The first name in the list is the canonical name of the media type or
76option.  Additional names are acceptable aliases for the media type or
77option.
78.Sh COMMON MEDIA TYPES AND OPTIONS
79The following media types are shared by all link types:
80.Bl -tag -offset indent -width IFM_MANUAL
81.It Dv IFM_AUTO
82Autoselect the best media.  [autoselect, auto]
83.It Dv IFM_MANUAL
84Jumper or switch on device selects media.  [manual]
85.It Dv IFM_NONE
86Deselect all media.  [none]
87.El
88.Pp
89The following media options are shared by all link types:
90.Bl -tag -offset indent -width IFM_FLAG0
91.It Dv IFM_FDX
92Place the device into full-duplex mode.  This option only has meaning
93if the device is normally not full-duplex.  [full-duplex, fdx]
94.It Dv IFM_HDX
95Place the device into half-duplex mode.  This option only has meaning
96if the device is normally not half-duplex.  [half-duplex, hdx]
97.It Dv IFM_FLAG0
98Driver-defined flag.  [flag0]
99.It Dv IFM_FLAG1
100Driver-defined flag.  [flag1]
101.It Dv IFM_FLAG2
102Driver-defined flag.  [flag2]
103.It Dv IFM_LOOP
104Place the device into hardware loopback mode.  [loopback, hw-loopback, loop]
105.El
106.Sh MEDIA TYPES AND OPTIONS FOR ETHERNET
107The following media types are defined for Ethernet:
108.Bl -tag -offset indent -width IFM_1000_FX
109.It Dv IFM_10_T
11010baseT, 10Mb/s over unshielded twisted pair, RJ45 connector.  [10baseT,
111UTP, 10UTP]
112.It Dv IFM_10_2
11310base2, 10Mb/s over coaxial cable, BNC connector, also called Thinnet.
114[10base2, BNC, 10BNC]
115.It Dv IFM_10_5
11610base5, 10Mb/s over 15-wire cables, DB15 connector, also called AUI.
117[10base5, AUI, 10AUI]
118.It Dv IFM_100_TX
119100baseTX, 100Mb/s over unshielded twisted pair, RJ45 connector.  [100baseTX,
120100TX]
121.It Dv IFM_100_FX
122100baseFX, 100Mb/s over fiber optic cables.  [100baseFX, 100FX]
123.It Dv IFM_100_T4
124100baseT4, 100Mb/s over 4-wire (category 3) unshielded twisted pair, RJ45
125connector.  [100baseT4, 100T4]
126.It Dv IFM_100_VG
127100baseVG AnyLAN.  [100baseVG, 100VG]
128.It Dv IFM_100_T2
129100baseT2.  [100baseT2, 100T2]
130.It Dv IFM_1000_FX
1311000baseFX, 1Gb/s over fiber optic cables.  [1000baseFX, 1000FX]
132.It Dv IFM_10_STP
13310baseSTP, 10Mb/s over shielded twisted pair, DB9 connector.  [10baseSTP,
134STP, 10STP]
135.It Dv IFM_10_FL
13610baseFL, 10Mb/s over fiber optic cables.  [10baseFL, FL, 10FL]
137.El
138.Pp
139There are no link type-specific options defined for Ethernet.
140.Sh MEDIA TYPES AND OPTIONS FOR TOKEN RING
141The following media types are defined for Token Ring:
142.Bl -tag -offset indent -width IFM_TOK_UTP16
143.It Dv IFM_TOK_STP4
1444Mb/s, shielded twisted pair, DB9 connector.  [DB9/4Mbit, 4STP]
145.It Dv IFM_TOK_STP16
14616Mb/s, shielded twisted pair, DB9 connector.  [DB9/16Mbit, 16STP]
147.It Dv IFM_TOK_UTP4
1484Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/4Mbit, 4UTP]
149.It Dv IFM_TOK_UTP16
15016Mb/s, unshielded twisted pair, RJ45 connector.  [UTP/16Mbit, 16UTP]
151.El
152.Pp
153The following media options are defined for Token Ring:
154.Bl -tag -offset indent -width IFM_TOK_SRCRT
155.It Dv IFM_TOK_ETR
156Early token release.  [EarlyTokenRelease, ETR]
157.It Dv IFM_TOK_SRCRT
158Enable source routing features.  [SourceRouting, SRCRT]
159.It Dv IFM_TOK_ALLR
160All routes vs. single route broadcast.  [AllRoutes, ALLR]
161.El
162.Sh MEDIA TYPES AND OPTIONS FOR FDDI
163The following media types are defined for FDDI:
164.Bl -tag -offset indent -width IFM_FDDI_SMF
165.It Dv IFM_FDDI_SMF
166Single-mode fiber.  [Single-mode, SMF]
167.It Dv IFM_FDDI_MMF
168Multi-mode fiber.  [Multi-mode, MMF]
169.It Dv IFM_FDDI_UTP
170Unshielded twisted pair, RJ45 connector.  [UTP, CDDI]
171.El
172.Pp
173The following media options are defined for FDDI:
174.Bl -tag -offset indent -width IFM_FDDI_DA
175.It Dv IFM_FDDI_DA
176Dual-attached station vs. Single-attached station.  [dual-attach, das]
177.El
178.Sh SEE ALSO
179.Xr netintro 4 ,
180.Xr ifconfig 8
181.Sh HISTORY
182The
183.Nm
184interface first appeared in
185.Bsx 3.0 .
186The implementation that appeared in
187.Nx 1.3
188was written by Jonathan Stone and Jason R. Thorpe to be compatible with
189the BSDI API.  It has since gone through several revisions which have
190extended the API while maintaining backwards compatibility with the
191original API.
192