From owner-freebsd-net Tue Nov 5 15:40:20 2002 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 D564A37B401; Tue, 5 Nov 2002 15:40:18 -0800 (PST) Received: from InterJet.elischer.org (12-232-206-8.client.attbi.com [12.232.206.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2916343E88; Tue, 5 Nov 2002 15:40:17 -0800 (PST) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA71162; Tue, 5 Nov 2002 15:30:02 -0800 (PST) Date: Tue, 5 Nov 2002 15:30:01 -0800 (PST) From: Julian Elischer To: Maksim Yevmenkin Cc: Archie Cobbs , current@FreeBSD.ORG, net@FreeBSD.ORG Subject: Re: Netgraph and KQUEUE(2) In-Reply-To: <3DC84F87.D5CB9C1C@exodus.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, 5 Nov 2002, Maksim Yevmenkin wrote: > Archie Cobbs wrote: > > > > Maksim Yevmenkin writes: > > > I would like to get some feedback on the idea i have. > > > Basically i would like Netgraph system to send kevents > > > whenever something happens. For example: > > > > > > 1) node X of type Y was created/destroyed > > > 2) hook X was connected/disconnected to/from node Y > > > 3) Data passed via hook X > > > 4) Node X got message Y > > > > This would be nice, but what does kqueue() really have to do with it? > > > > I.e., why not just allow the creation of a ng_monitor(4) (or whatever you > > want to call it) node, which would send out event report messages to > > whomever connected to it. > > common interface? reusing existing functionality? just open a > Netgraph socket, register for events and away you go. > > and you are right ng_monitor (or whatever) is another way to > do the same thing. A program would only have to look for one kind of event with kqueue. otherwise it's have to check with kqueue NAD teh ng_monitor node. Its possible BOTH approaches could be combined.. Most of teh event catching code would be shared. > thanks, > max > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message