Date: Thu, 26 Feb 2015 22:11:29 -0600 From: Mike Karels <mike@karels.net> To: Hans Petter Selasky <hps@selasky.org> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, Eric Joyner <ricera10@gmail.com>, Gleb Smirnoff <glebius@FreeBSD.org>, Jack Vogel <jfvogel@gmail.com>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: Adding new media types to if_media.h Message-ID: <201502270411.t1R4BTee058023@mail.karels.net> In-Reply-To: Your message of Thu, 26 Feb 2015 15:51:37 %2B0100. <54EF32F9.1020009@selasky.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Hi, > > > > There are 6 token ring bits, which I presume are available when token > > ring is not selected. > > > > #define IFM_TOK_ETR 0x00000200 /* Early token release */ > > #define IFM_TOK_SRCRT 0x00000400 /* Enable source routing > > features */ > > #define IFM_TOK_ALLR 0x00000800 /* All routes / Single route > > bcast */ > > #define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */ > > #define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */ > > #define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic > > token ring */ > > > > Maybe these can be used for other purposes when the type is equal to > > ethernet? These are the "type-specific options". Ethernet uses three of these (see IFM_ETH_*). I hadn't thought about it, but some of the remaining five bits could be used for extended Ethernet subtypes. > Hi Mike, > My proposal is, convert: > > #define IFM_TOK_DTR 0x00002000 /* Dedicated token ring */ > > #define IFM_TOK_CLASSIC 0x00004000 /* Classic token ring */ > > #define IFM_TOK_AUTO 0x00008000 /* Automatic Dedicate/Classic > Into different network types: > #define IFM_TOKEN_NONE > #define IFM_TOKEN_DTR > #define IFM_TOKEN_CLASSIC > #define IFM_TOKEN_AUTO > and extend the IFM_NMASK like this: > #define IFM_NMASK 0x0000e0e0 /* Network type */ I don't think any change is required for token ring. Finding hardware to test would be a challenge in any case. Simply using some of the options bits for subtype would be simpler. I could outline this if anyone wants. Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502270411.t1R4BTee058023>