diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-03-06 17:17:57 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-03-06 17:17:57 +0000 |
commit | d0af2b19f26eab51b475fe5eca6cc0ec29095ba4 (patch) | |
tree | 5605fc5d5fa3c336e445c3fe2f1523f069c9e551 /sys/net | |
parent | 1b7889bbfd715c3ad257833a40c58f8ffda8b8fd (diff) | |
download | FreeBSD-src-d0af2b19f26eab51b475fe5eca6cc0ec29095ba4.zip FreeBSD-src-d0af2b19f26eab51b475fe5eca6cc0ec29095ba4.tar.gz |
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.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_media.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/net/if_media.h b/sys/net/if_media.h index 23b2b0a..dcab815 100644 --- a/sys/net/if_media.h +++ b/sys/net/if_media.h @@ -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 }, \ } |