Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2001 13:38:06 +0200
From:      "Wilbert de Graaf" <wilbertdg@hetnet.nl>
To:        <s2209866@cse.unsw.edu.au>
Cc:        <freebsd-net@freeBSD.ORG>
Subject:   Re: How to see kernel in userland ?
Message-ID:  <005101c0b6b2$6465c900$16983f8b@research.kpn.com>
References:  <NDBBJCEECLLLJHEBJOGDAEJAEMAA.s2209866@cse.unsw.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005101c0b6b2$6465c900$16983f8b>