From owner-freebsd-net@FreeBSD.ORG Mon May 16 12:30:42 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4902D16A4CE for ; Mon, 16 May 2005 12:30:42 +0000 (GMT) Received: from smtp.hispeed.ch (mxout.hispeed.ch [62.2.95.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3728743DF5 for ; Mon, 16 May 2005 12:30:40 +0000 (GMT) (envelope-from spe@phear.org) Received: from localhost (80-218-34-172.dclient.hispeed.ch [80.218.34.172]) j4GCUSMp009885; Mon, 16 May 2005 14:30:29 +0200 Date: Mon, 16 May 2005 14:31:36 +0200 From: Sebastien Petit To: freebsd-net@freebsd.org Message-Id: <20050516143136.4dea9cb9.spe@phear.org> In-Reply-To: <20050516094309.GD777@obiwan.tataz.chchile.org> References: <20050513111013.41905e73.spe@phear.org> <20050513191705.61d2b742.spe@phear.org> <20050516094309.GD777@obiwan.tataz.chchile.org> Organization: Phear / B0l X-Mailer: Sylpheed version 1.0.1 (GTK+ 1.2.10; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on smtp-07.tornado.cablecom.ch X-Virus-Status: Clean X-DCC-spamcheck-02.tornado.cablecom.ch-Metrics: smtp-07.tornado.cablecom.ch 32701; Body=2 Fuz1=2 Fuz2=2 cc: jeremie@le-hen.org Subject: Re: SIOCGIFMEDIA problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.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: Mon, 16 May 2005 12:30:42 -0000 On Mon, 16 May 2005 11:43:09 +0200 Jeremie Le Hen wrote: > Hi Sebastien, > > On Fri, May 13, 2005 at 07:17:05PM +0200, Sebastien Petit wrote: > > [...] > > as a side note, you may wish to use the kqueue(2) framework to watch > at link stat changes. The main advantage is that it will change the > way it works from a polling model to a notification model. One major > drawback in your situation (portable software) is that kqueue(2) only > exists in BSD world, not in Linux. > Hi Jeremie, As I can see in kqueue man, I can only monitor events by file descriptor (read/write), a process id, a signal or a timer (under NetBSD 2) How I can use it for monitoring link status change on a network card ? Regards, Sebastien. -- spe@b0l.org