From owner-freebsd-net@FreeBSD.ORG Fri Feb 27 04:11:33 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54977946; Fri, 27 Feb 2015 04:11:33 +0000 (UTC) Received: from mail.karels.net (mail.karels.net [63.231.190.5]) by mx1.freebsd.org (Postfix) with ESMTP id E0E49BC5; Fri, 27 Feb 2015 04:11:32 +0000 (UTC) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.14.7/8.14.7) with ESMTP id t1R4BTee058023; Thu, 26 Feb 2015 22:11:30 -0600 (CST) (envelope-from mike@karels.net) Message-Id: <201502270411.t1R4BTee058023@mail.karels.net> To: Hans Petter Selasky From: Mike Karels Reply-to: mike@karels.net Subject: Re: Adding new media types to if_media.h In-reply-to: Your message of Thu, 26 Feb 2015 15:51:37 +0100. <54EF32F9.1020009@selasky.org> Date: Thu, 26 Feb 2015 22:11:29 -0600 Cc: "freebsd-net@freebsd.org" , Eric Joyner , Jack Vogel , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2015 04:11:33 -0000 > > 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