Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jun 2009 13:31:26 +0200
From:      Gabor PALI <pgj@FreeBSD.org>
To:        soc-status@freebsd.org
Cc:        Oleksandr Tymoshenko <gonzo@freebsd.org>, Robert Watson <rwatson@freebsd.org>
Subject:   libstat status 4
Message-ID:  <685a6ef80906290431n6c44810ene697821058e4b6e4@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello,

In the last week, I mainly worked on how to pass information from
kernel space to user space in a less ABI-sensitive way.  I
experimented with the previously established abstractions for
representing (unix domain, inet) sockets, and adapted the technique
that libmemstat(3) uses for vm.zone_stats.  To achieve this, the
following things have been done:

- Standardize width of properties (by using u_intXX_t types) in
libnetstat, adjust applications.
- Create an initial version of the streamed pcblists (for both
net.local and net.inet) as "spcblist" sysctl(8) nodes.  Note that
pcblist nodes still exist (for compatbility and for running the
originial tools).
- Modify libnetstat to use spcblist structures for monitoring connections.

The model, as it has been implemented so far, seems to be working
fine.  Note that the streamed structures contain less information than
their pcblist counterparts since many of the structure members are not
used in the library, however there can be added more easily when
needed.  This decision also resulted a more compact transmission from
kernel to userland.

I see some further options for enhancements, so I would like to work
on them in this week.  My mentor suggested to think about the
different possible usage patterns of the libnetstat API, so it would
be also fruitful to "group" accessor functions.  In the meanwhile, I
will be working on an ABI-independent solution for extracting
information from kvm images, however, I will need to consult Robert
Watson regarding this to see how libmemstat(3) tries to solve this
problem (or it solves at all).

Cheers,
:g



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?685a6ef80906290431n6c44810ene697821058e4b6e4>