Thanks. I'll look to include this soon.

--- Hai <[EMAIL PROTECTED]> wrote:
> With this patch, you can use hostname for supernode.
> 
> 
> Index: edge.c
> ===================================================================
> --- edge.c      (revision 3484)
> +++ edge.c      (working copy)
> @@ -995,10 +995,10 @@
>         char *supernode_host = strtok(optarg, ":");
>         if(supernode_host) {
>           char *supernode_port = strtok(NULL, ":");
> -
> -         if(supernode_port) {
> +         struct hostent *h = gethostbyname(supernode_host);
> +         if(h && supernode_port) {
>             supernode.port = htons(atoi(supernode_port));
> -           supernode.addr_type.v4_addr = inet_addr(supernode_host);
> +           supernode.addr_type.v4_addr = *((u_int32_t *)(h->h_addr));
>           } else
>             traceEvent(TRACE_WARNING, "Wrong supernode parameter (-l)");
>         } else



      Get the name you always wanted with the new y7mail email address. 
www.yahoo7.com.au/y7mail

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

Reply via email to