On 2008-Dec-22 18:05:34 -0600, Gerry Weaver <ger...@compvia.com> wrote:
>I am working on a driver that collects various network statistics via
>pfil. I have a simple array of structures that I use to store the
>statistics. I also have a user space process that needs to collect
>these statistics every second or so.

The easiest (and hackiest) approach would be to kldsym(2) to locate
the symbol in KVM and then mmap(2) the relevant part of /dev/kmem.
The biggest downside is that the userland process needs to be group
kmem.

The other approach would be for your kernel driver to grow a character
device node and directly support mmap.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.

Attachment: pgpRmxXhQAlnw.pgp
Description: PGP signature

Reply via email to