From owner-freebsd-current@FreeBSD.ORG Mon Aug 12 09:24:31 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 61F05DF3; Mon, 12 Aug 2013 09:24:31 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A73927B9; Mon, 12 Aug 2013 09:24:29 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id r7C96CR9045802; Mon, 12 Aug 2013 04:06:12 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.7/8.14.7/Submit) id r7C96BTR045801; Mon, 12 Aug 2013 04:06:11 -0500 (CDT) (envelope-from brooks) Date: Mon, 12 Aug 2013 04:06:11 -0500 From: Brooks Davis To: Willy Offermans Subject: Re: control of order of inet devices Message-ID: <20130812090611.GD4928@lor.one-eyed-alien.net> References: <20130416135621.GE3286@vpn.offrom.nl> <20130416154423.GD98205@lor.one-eyed-alien.net> <20130417091408.GG3480@vpn.offrom.nl> <516E6B10.2080000@gmail.com> <20130417200127.GB30583@lor.one-eyed-alien.net> <20130805091603.GB4557@vpn.offrom.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1LKvkjL3sHcu1TtY" Content-Disposition: inline In-Reply-To: <20130805091603.GB4557@vpn.offrom.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Brooks Davis , freebsd-current@freebsd.org, Joshua Isom X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Aug 2013 09:24:31 -0000 --1LKvkjL3sHcu1TtY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 05, 2013 at 11:16:03AM +0200, Willy Offermans wrote: > Hello Brooks, >=20 > On Wed, Apr 17, 2013 at 03:01:27PM -0500, Brooks Davis wrote: > > On Wed, Apr 17, 2013 at 04:27:44AM -0500, Joshua Isom wrote: > > > On 4/17/2013 4:14 AM, Willy Offermans wrote: > > > > This is what I read in some of the articles or handbook as well. Ca= n I > > > > reorder this linked list? Can I control the order by creating the k= ernel > > > > and reordering the inclusion of the device drivers? > > > > > > > > I am aware that the request sounds silly, but I have a third party = program > > > > which checks its licence against the first inet device. Since I hav= e added > > > > a new inet controller, the sequence has changed. Of course I ask fo= r a new > > > > licence, but they want to charge me for that and I do not see any r= eason > > > > for that. > > >=20 > > > Load old inet devices like normal, in loader.conf. Then load the new= =20 > > > device driver before networking, after rc's started. If it'd because= of=20 > > > probe order, then you might just have to control the probe order the= =20 > > > hard way. If the program's calling ifconfig itself, you could write = a=20 > > > wrapper to resort the output. And call a lawyer, getting a new ether= net=20 > > > card shouldn't void a license. > >=20 > > It wouldn't be particularly hard to influence the sorting of the list if > > you're willing to modify the if_attach_internal() function and always > > insert devices with that name at the beginning. It just doesn't seem > > very general purpose so I'd have a hard time considering including it. > >=20 > > -- Brooks >=20 > I see und subscribe to your point. However it is not clear to me how the > order is established. Maybe if I know that, I can influence the order. Can > you comment on that? The order is simply the order the devices probe in. That's basicaly a black box with the order set by the bus hierarchy. > Where can I find the code for the if_attach_internal() function? Digging > into the code might also elucidate a lot of things, so I need to ask less > :). Maybe I will change the code a bit to suite my wishes. If that is the > case, I will inform the list and show the code. Maybe it is useful. sys/net/if.c around line 586. -- Brooks --1LKvkjL3sHcu1TtY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFSCKWBXY6L6fI4GtQRAlkEAJ9jhY4pLwKgzSnSahUTRrlhPiTERQCbBev/ iPzZbcj6YdBaQSxZouTwrQM= =66nB -----END PGP SIGNATURE----- --1LKvkjL3sHcu1TtY--