Check the back message traffic - Sean and I discussed this in a FreeBSD
thread last week...

http://listmanager.unipi.it/pipermail/ntop/2002-February/001213.html

We never reached a resolution. It looks like adding an ifdef for FreeBSD4
would be safe...

Something like this should be safe, although I don't know the specifics of
each version:

#if defined(WIN32)
      addr.s_addr = (unsigned long)atol(data_data.dptr);
#elif defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
    || defined(FREEBSD5) \
    || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
    || defined(OPENBSD2) || defined(OPENBSD3) || defined(NETBSD1)
      addr.s_addr = (unsigned long)atol(data_data.dptr);
#else
      addr.s_addr = (unsigned long)atoll(data_data.dptr);
#endif

Or, according to some doc I've read, atoll is actually new in C99 and yet
obsolete, and should be replaced by

strtoll(data_data.dptr, NULL, 10);

It compiles for me... can you test both and let me know...

Thanks!

-----Burton





-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Robert Myles
Sent: Tuesday, February 19, 2002 5:51 AM
To: [EMAIL PROTECTED]
Subject: [Ntop] Bug Report - IPX traffic mis-classified as OSI


Hello to Luca and everyone else

I am running ntop 2.0 on FreeBSD 4.4-Release.

I am monitoring a network on which the traffic is TCP/IP (mostly
Netbios over TCP/IP) and IPX (802.3).

On ntop 1.1 the IPX traffic was correctly listed by the ntop web server
as IPX on the "Data Sent" and "Data Rcvd" pages, however on version
2.0 it is listed as OSI.
intop ver. 2.0 appears to list it as 'Other'.

I built the latest version of ntop (2.0.1 - 18 Feb 2002) and it behaves in
the same way.

In building 2.0.1 on FreeBSD 4.4-Release, I came across a problem in
address.c

The call to atoll in address.c:

#ifndef WIN32
      addr.s_addr = (unsigned long)atoll(data_data.dptr);
#else
          addr.s_addr = (unsigned long)atol(data_data.dptr);
#endif

prevents it building. I get:

lots of normal output...

.libs/libntopreport.so: warning: tmpnam() possibly used unsafely;
consider using mkstemp()
/usr/lib/libc.so: WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so: warning: mktemp() possibly used unsafely; consider
using mkstemp()
/usr/lib/libc.so: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc.so: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc.so: warning: this program uses f_prealloc(), which is not
recommended.
/usr/lib/libc.so: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc.so: warning: tempnam() possibly used unsafely; consider
using mkstemp()
.libs/libntop.so: undefined reference to `atoll'
gmake[2]: *** [ntop] Error 1
gmake[2]: Leaving directory `/usr/ports/net/ntop201/work/ntop'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/net/ntop201/work/ntop'
gmake: *** [all-recursive-am] Error 2

I changed the atoll to atol in address.c and it compiled fine. That's not a
good solution because I am sure atoll was used for a good reason. Any
ideas for a better solution?

Thanks for a great utility.

Robert Myles

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listmanager.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listmanager.unipi.it/mailman/listinfo/ntop

Reply via email to