Hi-- On Apr 6, 2010, at 8:32 AM, serena zanetta wrote: > But first of all, I don't know how I can convert the IP_REMOTE, which is > currently IP_REMOTE = "10.0.0.90", into a in_addr structure...
To convert a string to an IP address kept as an in_addr, you want inet_aton(), used like so: const char *ipstr = "127.0.0.1"; struct in_addr ip; if (!inet_aton(ipstr, &ip)) errx(1, "can't parse IP address %s", ipstr); [ Example borrowed from "man gethostbyaddr" ] Regards, -- -Chuck _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"