Burton M. Strauss III wrote:

<snip/>

(First off, I wonder why the important value, ifaddr, isn't shown.  Might
try

# print ifaddr


I also noticed this, and I did try to print it, but gdb basically tells me that that variable does not exist? Weird.

But as to your thought... Hummmmmm.

The ntop test is whether you gave --disable-ipv6 during ./configure. If you
didn't, we build with the calls. Whether it matters is an interesting
thought (or what happens to the program if the IPv6 functions don't exist,
rather).


I did not configure ntop with that switch. I am grabbing CVS quickly and will then try it out.

Now if you don't have a IPv6 kernel, there shouldn't be anything to set in
myGlobals.device[i].v6Addrs... and so you should be skipping the failing
section totally. But since you're feeding an IPv6 file in (right?) to a non
IPv6 host I guess that could be the issue.


Right.

I don't have a spare FreeBSD box, nor really want to build a custom kernel.
Try this little cheesey test program:

----------------------------------------------
      #include <sys/types.h>
      #include <sys/socket.h>
      #include <arpa/inet.h>

char* _intop(struct in6_addr *addr, char *buf, u_short buflen) {
 return (char *)inet_ntop(AF_INET6, addr, buf, buflen);
}

int main(int argc, char *argv[]) {

 char* r;
 struct  in6_addr a;
 char d[INET6_ADDRSTRLEN];
 int i;

 memset(&d, 0, sizeof(d));
 for(i=0;i<16;i++)
   a.in6_u.u6_addr8[i]=15-i;

 printf("call to inet_ntop...");
 r = _intop(&a, d, sizeof(d));
 printf("returned %s\n", d);
}
----------------------------------------------

$ gcc -o inetntoptest inetntoptest.c
$ ./inetntoptest
call to inet_ntop...returned f0e:d0c:b0a:908:706:504:302:100

And let me know what happens...



This will not compile on my FreeBSD 5.2.1-RC machine with gcc 3.3.3.
The messages I get is the following:
mainframe# gcc -o inetntoptest inetntoptest.c
inetntoptest.c:5: warning: `struct in6_addr' declared inside parameter list
inetntoptest.c:5: warning: its scope is only this definition or declaration, which is probably not what you want
inetntoptest.c: In function `main':
inetntoptest.c:12: error: storage size of `a' isn't known


-----Burton


Jaco

--
Jaco van Tonder
Software Developer
Direct: +27 11 312 2122 :: Fax: +27 11 312 2122 :: Mobile: +27 83 417 5424
Email: [EMAIL PROTECTED] :: Web: http://www.coocoo.za.net/

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

Reply via email to