From owner-freebsd-net Tue Mar 27 3:43:25 2001 Delivered-To: freebsd-net@freebsd.org Received: from hetnet.nl (net013s.hetnet.nl [194.151.104.153]) by hub.freebsd.org (Postfix) with ESMTP id 48C8A37B718 for ; Tue, 27 Mar 2001 03:43:23 -0800 (PST) (envelope-from wilbertdg@hetnet.nl) Received: from spingdialer ([213.75.84.125]) by hetnet.nl with Microsoft SMTPSVC(5.5.1877.647.64); Tue, 27 Mar 2001 13:42:38 +0200 Message-ID: <005101c0b6b2$6465c900$16983f8b@research.kpn.com> From: "Wilbert de Graaf" To: Cc: References: Subject: Re: How to see kernel in userland ? Date: Tue, 27 Mar 2001 13:38:06 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I need some help with kernel programming. I'm trying to find out how to get > my application to see kernel variables. I've tried to used sysctl_struct > calls on my variable but I couldn't get sysctl command to see it... how do > allow application to observer and maybe modify a variable inside a kernel ? > > Please suggest the best way to do this... All I want to do is to be able to > monitor IP activity in my kernel. I've been trying to add stuff to the > kernel as I'm playing around with experiemental code trying to monitor > network activity under IP Did you implement the variable yourself ? If you do a sysctl -A on the commandline you should see them. If it's only about ip traffic maybe link-layer access (using libpcap) is enough (look at the tcpdump code). But if you really need raw access, kvm (libkvm) is probably a good tool. Try 'man kvm_read'. Wilbert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message