Update of /export/home/ntop/ntop
In directory jabber:/tmp/cvs-serv5917
Added Files:
xmldump.c
Log Message:
Full data XML dump (preliminary)
This change is part 1 of introducing a new, optional xml dump feature
into ntop. Ultimately, it is planned that this will become a full dump
of the entire internal structures of ntop. Although all the hooks are
in place with this commit, the full dump is *not* available.
This change uses an awk script to process structured comments in the
globals-structtypes.h file to produce the xml dump code. It's a process
very much like JavaDoc, except the output is C language .inc files which
are #include(d) into a new module, xmldump.c.
Right now, all that is dumped is the headers (version.c), the execution/
invocation environment and a decent portion of the per-interface data.
A dump control page is included, dumpxml.html - but this is not pointed to
from the menu tree. It probably won't be - the XML dump is big and takes
a lot of time and should probably not be used via a browser, but rather
via a text-based process such as wget of lynx or to a snapshot file.
The XML dump uses the Gnome routines, gdome2. These are available from
gdome - http://gdome2.cs.unibo.it/
Gdome itself requires libxml2 and glib, which are available from
libxml2 - http://xmlsoft.org/
glib - http://www.gtk.org/download/
ftp://ftp.gtk.org/pub/gtk/v1.2
(RedHat RPMs are available, at least in 7.3/8.0, for all of these).
There are FOUR new --with-xxxx-root parameters and an --enable required:
(basically because the pieces and parts are scatterned all over the blasted
system)
Under RedHat:
./configure --prefix=... \
--enable-xmldump \
--with-xml2-root=/usr/include/libxml2/libxml \
--with-glib-root=/usr/include/glib-1.2 \
--with-glibconfig-root=/usr/lib/glib \
--with-gdome-root=/opt/gdome
Under FreeBSD:
./configure --prefix=... \
--enable-xmldump \
--with-xml2-root=/usr/local/include/libxml2/libxml \
--with-glib-root=/usr/local \
--with-glibconfig-root=/usr/local/include/glib-2.0 \
--with-gdome-root=/usr/local/include/libgdome
(All the libraries are in ports ... textproc/libxml2, textproc/gdome2 and
devel/glib20)
New run time parameters:
--xmlfileout
File name for saving internal data during shutdown
--xmlfilesnap
File name for snapshot internal data save
--xmlfilein **FUTURE ONLY**
The dump is accessed via the pseudo-page dump.xml with parameters as follows:
tofile=yes (send output to the snapshot file, IF specified)
tofile=no (send output to the requestor browser)
version=yes (generate version_c header info in the xml output) - DEFAULT
version=no (no version_c header info)
invoke=yes (gernerate invocation/environment info in the xml output) - DEFAULT
invoke=no (no invocation/environment info)
interface=yes (generate per-interface info in the xml output)
interface=no (no per-interface info) - DEFAULT
A html page, dumpxml.html handles this automatically.
Note: This page may take a long time to generate - enough to timeout on some
browsers. The WARNINGS on dumpxml.html are not a joke.
Note: The dtd, ntopdump.dtd, has not been extensively reviewed.
-----Burton (ref 146)
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev