Deleted Added
sdiff udiff text old ( 25431 ) new ( 44165 )
full compact
1/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */
2/* $Id$ */
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_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 */
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 */
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)
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" }, \
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_OPTION_DESCRIPTIONS { \
260 { IFM_TOK_ETR, "EarlyTokenRelease" }, \
261 { IFM_TOK_SRCRT, "SourceRouting" }, \
262 { IFM_TOK_ALLR, "AllRoutes" }, \
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 ---