From owner-freebsd-current@FreeBSD.ORG Tue Jul 29 22:43:18 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C0B037B401; Tue, 29 Jul 2003 22:43:18 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6359243F93; Tue, 29 Jul 2003 22:43:17 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc09u.dialup.mindspring.com ([209.86.1.62] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19hjk3-0006Ic-00; Tue, 29 Jul 2003 22:43:16 -0700 Message-ID: <3F275AB9.C7614E22@mindspring.com> Date: Tue, 29 Jul 2003 22:42:17 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Robert Watson References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a47e21d6eaa93d4e4a75093f068d1ce9d9548b785378294e88350badd9bab72f9c350badd9bab72f9c cc: Martin Blapp cc: current@freebsd.org Subject: Re: STEP 2, fixing dhclient behaviour with multiple interfaces X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 30 Jul 2003 05:43:18 -0000 Robert Watson wrote: > On Tue, 29 Jul 2003, Daniel C. Sobral wrote: > > > You could add kevents for interface arrival and departure, and > > > add a kqueue to the dhcpd to catch the arrival/departure events, > > > and then just act on them. > > > > Instead of just adding the stuff to devd? > > Currently, devd is in the business of dealing with attachment and removal > from the hardware management subsystem. Network subsystem events, such as > "interface has arrived" are semantically different, but "close enough" in > many cases. In the past, routing sockets have been the means by which > topology-relevant changes are announced to the user processes. More > recently, kqueue has permitted monitoring of a plethora of event types. I > think there's a decent argument for a neteventd, perhaps integrated as a > thread into devd, listening on network events rather than device > attach/detach events. The only real problem is that it would be very nice > if the DHCP client code were available in a library so it could be linked > into a network event manager. This is part of the problem. The other parts are that this is really networking code, and should be a separate thing, if possible, and, as Martin just pointed out, the OMAPI stuff is not really cooked yet. It's really a lot easier the process a small list of events in dhacpd as a result of a kqueue or kqueue/select combo, if you want to avoid rewriting as much code as humanly possible, and still be able to pull this feature out of the project. I still haven't been able to repeat your test; are you sure you are listening on a routing socket for the configuration change events? Maybe I'm doing something silly with my dumb little test program that you aren't doing with yours? I'm not seeing my Linksys my 3COM interfaces showing up and disappearing as kevents, but they are definitely still being seen by the laptop. Maybe it's my local hacks to make it work at all (it's an older Sony VAIO PCG-XG29). -- Terry