On Mon, Mar 16, 2009 at 5:36 PM, Tim Kientzle <kient...@freebsd.org> wrote: > Many people consider top-posting to be rude. FYI. > My comments below, where they belong. > > Cipta H wrote: >> >> Thanks for the reply, Xin. I'm aware of something called sysctl, and if >> I am accepted to work on this project, my main task is to ensure all live >> network data will come from sysctl, but the only XML I know of is the >> markup language. Perhaps someone more knowledgeable can point me >> to the right resource? Thanks in advance. >> >> Cipta >> >> On Mon, Mar 16, 2009 at 3:04 PM, Xin LI <delp...@delphij.net> wrote: >> >>> I'm not very sure but I think Rui is referring XML like the GEOM >>> subsystem has used (perhaps to have the kernel expose the statistics >>> data with XML and the userland part of the library parse and return the >>> result)? > > There are two different issues: > * Kernel <-> userland communications > * library <-> client program communications > > There is ample precedent for the former to use sysctl > interfaces that return XML from the kernel that is then > parsed in userland. In particular, this makes it much > easier to extend in the future, as long as the proposed > libnetstat library ignores data it doesn't understand. > (In the past, many tools parsed in-kernel data > structures to obtain this kind of information, which is > prone to breakage whenever the kernel changes. Making > this so that kernel and tools can evolve more independently > is a major goal here.) > > For the latter, some kind of opaque C structure > makes sense, since that simplifies the client programs. > > So really this breaks down into two very different > tasks: > * Designing and implementing a sysctl that returns > network statistics as an XML blob > * Designing and implementing a C library that knows > how to fetch the XML blob, parse it, and return > data to client programs. > > Does this make more sense now? > > Tim >
Yes, it does, Tim, thank you so much. I'll be sure to look into sysctl.h and study its ability to return XML. I will also contact Robert about this project once I finish gathering more info. Thank you all for answering my questions. Cipta P.S. Sorry about top-posting. I'll be sure to remember it from now on. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"