Deleted Added
full compact
if_media.h (25431) if_media.h (44165)
1/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */
1/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */
2/* $Id$ */
2/* $Id: if_media.h,v 1.2 1997/05/03 20:58:10 peter Exp $ */
3
4/*
5 * Copyright (c) 1997
6 * Jonathan Stone and Jason R. Thorpe. All rights reserved.
7 *
8 * This software is derived from information provided by Matt Thomas.
9 *
10 * Redistribution and use in source and binary forms, with or without

--- 121 unchanged lines hidden (view full) ---

132/*
133 * Token ring
134 */
135#define IFM_TOKEN 0x00000040
136#define IFM_TOK_STP4 3 /* Shielded twisted pair 4m - DB9 */
137#define IFM_TOK_STP16 4 /* Shielded twisted pair 16m - DB9 */
138#define IFM_TOK_UTP4 5 /* Unshielded twisted pair 4m - RJ45 */
139#define IFM_TOK_UTP16 6 /* Unshielded twisted pair 16m - RJ45 */
3
4/*
5 * Copyright (c) 1997
6 * Jonathan Stone and Jason R. Thorpe. All rights reserved.
7 *
8 * This software is derived from information provided by Matt Thomas.
9 *
10 * Redistribution and use in source and binary forms, with or without

--- 121 unchanged lines hidden (view full) ---

132/*
133 * Token ring
134 */
135#define IFM_TOKEN 0x00000040
136#define IFM_TOK_STP4 3 /* Shielded twisted pair 4m - DB9 */
137#define IFM_TOK_STP16 4 /* Shielded twisted pair 16m - DB9 */
138#define IFM_TOK_UTP4 5 /* Unshielded twisted pair 4m - RJ45 */
139#define IFM_TOK_UTP16 6 /* Unshielded twisted pair 16m - RJ45 */
140#define IFM_TOK_STP100 7 /* Shielded twisted pair 100m - DB9 */
141#define IFM_TOK_UTP100 8 /* Unshielded twisted pair 100m - RJ45 */
140#define IFM_TOK_ETR 0x00000200 /* Early token release */
141#define IFM_TOK_SRCRT 0x00000400 /* Enable source routing features */
142#define IFM_TOK_ALLR 0x00000800 /* All routes / Single route bcast */
142#define IFM_TOK_ETR 0x00000200 /* Early token release */
143#define IFM_TOK_SRCRT 0x00000400 /* Enable source routing features */
144#define IFM_TOK_ALLR 0x00000800 /* All routes / Single route bcast */
145#define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */
146#define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */
147#define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic token ring */
143
144/*
145 * FDDI
146 */
147#define IFM_FDDI 0x00000060
148#define IFM_FDDI_SMF 3 /* Single-mode fiber */
149#define IFM_FDDI_MMF 4 /* Multi-mode fiber */
150#define IFM_FDDI_UTP 5 /* CDDI / UTP */

--- 30 unchanged lines hidden (view full) ---

181 * Status bits
182 */
183#define IFM_AVALID 0x00000001 /* Active bit valid */
184#define IFM_ACTIVE 0x00000002 /* Interface attached to working net */
185
186/*
187 * Macros to extract various bits of information from the media word.
188 */
148
149/*
150 * FDDI
151 */
152#define IFM_FDDI 0x00000060
153#define IFM_FDDI_SMF 3 /* Single-mode fiber */
154#define IFM_FDDI_MMF 4 /* Multi-mode fiber */
155#define IFM_FDDI_UTP 5 /* CDDI / UTP */

--- 30 unchanged lines hidden (view full) ---

186 * Status bits
187 */
188#define IFM_AVALID 0x00000001 /* Active bit valid */
189#define IFM_ACTIVE 0x00000002 /* Interface attached to working net */
190
191/*
192 * Macros to extract various bits of information from the media word.
193 */
189#define IFM_TYPE(x) ((x) & IFM_NMASK)
190#define IFM_SUBTYPE(x) ((x) & IFM_TMASK)
191#define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT)
194#define IFM_TYPE(x) ((x) & IFM_NMASK)
195#define IFM_SUBTYPE(x) ((x) & IFM_TMASK)
196#define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK)
197#define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT)
192
193/*
194 * NetBSD extension not defined in the BSDI API. This is used in various
195 * places to get the canonical description for a given type/subtype.
196 *
197 * NOTE: all but the top-level type descriptions must contain NO whitespace!
198 * Otherwise, parsing these in ifconfig(8) would be a nightmare.
199 */

--- 40 unchanged lines hidden (view full) ---

240 { 0, NULL }, \
241}
242
243#define IFM_SUBTYPE_TOKENRING_DESCRIPTIONS { \
244 { IFM_TOK_STP4, "DB9/4Mbit" }, \
245 { IFM_TOK_STP16, "DB9/16Mbit" }, \
246 { IFM_TOK_UTP4, "UTP/4Mbit" }, \
247 { IFM_TOK_UTP16, "UTP/16Mbit" }, \
198
199/*
200 * NetBSD extension not defined in the BSDI API. This is used in various
201 * places to get the canonical description for a given type/subtype.
202 *
203 * NOTE: all but the top-level type descriptions must contain NO whitespace!
204 * Otherwise, parsing these in ifconfig(8) would be a nightmare.
205 */

--- 40 unchanged lines hidden (view full) ---

246 { 0, NULL }, \
247}
248
249#define IFM_SUBTYPE_TOKENRING_DESCRIPTIONS { \
250 { IFM_TOK_STP4, "DB9/4Mbit" }, \
251 { IFM_TOK_STP16, "DB9/16Mbit" }, \
252 { IFM_TOK_UTP4, "UTP/4Mbit" }, \
253 { IFM_TOK_UTP16, "UTP/16Mbit" }, \
254 { IFM_TOK_STP100, "STP/100Mbit" }, \
255 { IFM_TOK_UTP100, "UTP/100Mbit" }, \
248 { 0, NULL }, \
249}
250
251#define IFM_SUBTYPE_TOKENRING_ALIASES { \
252 { IFM_TOK_STP4, "4STP" }, \
253 { IFM_TOK_STP16, "16STP" }, \
254 { IFM_TOK_UTP4, "4UTP" }, \
255 { IFM_TOK_UTP16, "16UTP" }, \
256 { 0, NULL }, \
257}
258
259#define IFM_SUBTYPE_TOKENRING_ALIASES { \
260 { IFM_TOK_STP4, "4STP" }, \
261 { IFM_TOK_STP16, "16STP" }, \
262 { IFM_TOK_UTP4, "4UTP" }, \
263 { IFM_TOK_UTP16, "16UTP" }, \
264 { IFM_TOK_STP100, "100STP" }, \
265 { IFM_TOK_UTP100, "100UTP" }, \
256 { 0, NULL }, \
257}
258
259#define IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS { \
260 { IFM_TOK_ETR, "EarlyTokenRelease" }, \
261 { IFM_TOK_SRCRT, "SourceRouting" }, \
262 { IFM_TOK_ALLR, "AllRoutes" }, \
266 { 0, NULL }, \
267}
268
269#define IFM_SUBTYPE_TOKENRING_OPTION_DESCRIPTIONS { \
270 { IFM_TOK_ETR, "EarlyTokenRelease" }, \
271 { IFM_TOK_SRCRT, "SourceRouting" }, \
272 { IFM_TOK_ALLR, "AllRoutes" }, \
273 { IFM_TOK_DTR, "Dedicated" }, \
274 { IFM_TOK_CLASSIC,"Classic" }, \
275 { IFM_TOK_AUTO, " " }, \
263 { 0, NULL }, \
264}
265
266#define IFM_SUBTYPE_FDDI_DESCRIPTIONS { \
267 { IFM_FDDI_SMF, "Single-mode" }, \
268 { IFM_FDDI_MMF, "Multi-mode" }, \
269 { IFM_FDDI_UTP, "UTP" }, \
270 { 0, NULL }, \

--- 37 unchanged lines hidden ---
276 { 0, NULL }, \
277}
278
279#define IFM_SUBTYPE_FDDI_DESCRIPTIONS { \
280 { IFM_FDDI_SMF, "Single-mode" }, \
281 { IFM_FDDI_MMF, "Multi-mode" }, \
282 { IFM_FDDI_UTP, "UTP" }, \
283 { 0, NULL }, \

--- 37 unchanged lines hidden ---