Add 1000baseFX, 10baseSTP and 10baseFL media types. The 1000baseFX

type may become necessary soon. :)

Also add a couple of additional macros that NetBSD has which we don't.
Nothing in FreeBSD uses these (yet) so adding them in shouldn't hurt
anything.
This commit is contained in:
wpaul 1999-03-06 17:17:57 +00:00
parent 1b7889bbfd
commit d0af2b19f2

View File

@ -1,5 +1,5 @@
/* $NetBSD: if_media.h,v 1.3 1997/03/26 01:19:27 thorpej Exp $ */
/* $Id: if_media.h,v 1.2 1997/05/03 20:58:10 peter Exp $ */
/* $Id: if_media.h,v 1.3 1999/02/20 11:17:59 julian Exp $ */
/*
* Copyright (c) 1997
@ -128,6 +128,9 @@ int ifmedia_ioctl __P((struct ifnet *ifp, struct ifreq *ifr,
#define IFM_100_T4 8 /* 100BaseT4 - 4 pair cat 3 */
#define IFM_100_VG 9 /* 100VG-AnyLAN */
#define IFM_100_T2 10 /* 100BaseT2 */
#define IFM_1000_FX 11 /* 1000BaseFX - gigabit over fiber */
#define IFM_10_STP 12 /* 10BaseT over shielded TP */
#define IFM_10_FL 13 /* 10baseFL - Fiber */
/*
* Token ring
@ -195,6 +198,15 @@ int ifmedia_ioctl __P((struct ifnet *ifp, struct ifreq *ifr,
#define IFM_SUBTYPE(x) ((x) & IFM_TMASK)
#define IFM_TYPE_OPTIONS(x) ((x) & IFM_OMASK)
#define IFM_INST(x) (((x) & IFM_IMASK) >> IFM_ISHIFT)
#define IFM_OPTIONS(x) ((x) & (IFM_OMASK|IFM_GMASK))
#define IFM_INST_MAX IFM_INST(IFM_IMASK)
/*
* Macro to create a media word.
*/
#define IFM_MAKEWORD(type, subtype, options, instance) \
((type) | (subtype) | (options) | ((instance) << IFM_ISHIFT))
/*
* NetBSD extension not defined in the BSDI API. This is used in various
@ -224,6 +236,9 @@ struct ifmedia_description {
{ IFM_100_T4, "100baseT4" }, \
{ IFM_100_VG, "100baseVG" }, \
{ IFM_100_T2, "100baseT2" }, \
{ IFM_1000_FX, "1000baseFX" }, \
{ IFM_10_STP, "10baseSTP" }, \
{ IFM_10_FL, "10baseFL" }, \
{ 0, NULL }, \
}
@ -239,6 +254,9 @@ struct ifmedia_description {
{ IFM_100_T4, "100T4" }, \
{ IFM_100_VG, "100VG" }, \
{ IFM_100_T2, "100T2" }, \
{ IFM_1000_FX, "1000FX" }, \
{ IFM_10_STP, "10STP" }, \
{ IFM_10_FL, "10FL" }, \
{ 0, NULL }, \
}