Let me try and expand - I suspect Luca was tired or rushed as his English is
usually better and more coherent than mine (and *he's* not the native
speaker of English!).
Some options work under Win32, some don't.
A lot of this is historical, such as libraries that weren't ported to MinGW.
Although some of these libraries may subsequently have been ported, unless
it's trivial or somebody is willing to $ponsor the work, ntop's Win32
implementation doesn't get updated.
Some of it is simply based on available features. For example, -u. Windows
9x doesn't really have the concept of different users running
simultaneously. Under NT/2K/XP, where ntop runs as a service, the service
control panel is where you indicate what user to run as. So ntop doesn't
implement -u.
Other limitations are because MinGW really is a very limited subset of the
full Unix/Posix libraries. ntop does NOT use the richer (albeit more
complex) Cygwin environment. Under cygwin, all of the gnu tools are
available and most of the functionality exists or is reasonably simulated.
MinGW is MUCH, MUCH, more limited. It's enough to run a console application
and self-compile, and that's pretty much it. What MinGW has going for it is
that it uses the Microsoft DLLs instead of a compatibility/simulation layer.
So, that's a long about way of saying that many options described in the
ntop man page aren't available under Win32. It should be pretty accurate in
differentiating Win32-only and Unix-only options. Unfortunately the man
page sometimes gets out of date - the code, specifically the switch() case:
construct in main.c is really the final authority.
If you can't read c, well, you can still read this. Open main.c and look
for:
switch (opt) {
case 'a': /* ntop access log path */
stringSanityCheck(optarg);
myGlobals.accessLogPath = strdup(optarg);
break;
That's how ntop handles the -a option (it does a sanity check and stores the
value).
Stuff that's not supported under Win32 will have an #ifdef or #ifndef
#endif wrapped around it:
#ifndef WIN32
case 'd':
myGlobals.daemonMode = 1;
break;
#endif
If WIN32 is NOT DEFINED (i.e. it's Unix not Windows), then this code exists,
which supports the -d option...
Of course, it's not quite that simple. The mySQL stuff is disabled not
because of Win32, but because the appropriate headers and libraries can't be
found:
#ifdef HAVE_MYSQL
case 'v': /* username:password:dbname:host */
stringSanityCheck(optarg);
handlemySQLSupport(optarg, &enableDBsupport);
break;
#endif
How is HAVE_MYSQL set? This test from configure.in:
dnl> OPTIONAL MySQL
if test ".$ac_disable_mysql" = ".no"; then
AC_CHECK_HEADERS(mysql/mysql.h,
MORELIBS="$MORELIBS -L/usr/lib/mysql -lmysqlclient" &&
AC_DEFINE(HAVE_MYSQL))
fi
Still, blame Win32 - there isn't enough functionality under MinGW to port
mySQL...
If you're compiling ntop, after running ./configure, read the messages - it
will tell you that it couldn't be found. You can also look in config.h for
a HAVE_MYSQL line. It will be /* #undef HAVE_MYSQL */, meaning that the
libraries couldn't be found and so ntop will not be compiled with the
supporting logic.
With all of that said, in the development version (2.1.50+) Luca has removed
all database support. It was a hack, never really worked well, bloated the
code, etc. So it was removed pending some form of re-development. When he
says "DB support is not available on Unix too", he means the development
tip. It's still in 2.1.x, but we're not planning on supporting it. If it
works for you, that's great, if it doesn't, well, sorry...
Luca is working on a new technology base, using rrd for database support,
and I've got an XML export ready to drop in soon.
I suppose I should stick this into the FAQ.
-----Burton
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Colin
J Franco
Sent: Friday, September 27, 2002 6:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [Ntop] Ntop/Win2k db and user issues
Hi Luca
Thanks for your response :-)
I agree that the -u didn't make a lot of sense in my environment.
Anxious not to screw up any more than absolutely necessary I was trying
it anyway in accordance with the 1st run instructions.
I don't understand why ntop being a service on Win2K makes -b unnecessary.
> DB support is not available on Unix too. If you need it export NetFlow
> flows towards a collector such as the one I have written and that
> saves flows into a DB.
Those two answers have me even more confused. I thought ntop was the
collector and that I needed to use -b to ask Ntop to forward info to
/databases/ODBCServer.java. I also understood that Ntop can collect
Netflows from my router or create it's own flows (acting as a probe) and
forward those to the db.
I've just reread everything I've been reading on www.ntop.org and
include in the ntop distribution and can't see anything to correct my
thinking or help me progress.
Regards
Colin
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop