or the OT, but
>
> I changed ISP's (telus.net to shaw) and my
> httpd-error.log is showing and
> error:
>
> mod_unique_id: unable to
> gethostbyname("hostname_from_/etc/rc.conf")
>
> There's a tweak somewhere for this but i forget
> where :P
>
>
> Anyone have a simple example of how to use this function..
This should work (and is really reduced to a minimum)
=
struct hostent *hostentry;
if ( (hostentry = gethostbyname("localhost")) == NULL) {
// Error handling
}
n_addr.s_addr = inet_addr(hstname);
if(sin.sin_addr.s_addr == INADDR_NONE) {
he = gethostbyname(hstname);
if(!he) {
close(s);
errno=0;
return -1;
}
memcpy(&sin.sin_addr, he->h_addr, he->h_length);
}
Jacob RhodenPhone: +61 3 9844 6102
ITS Di
Anyone have a simple example of how to use this function..
I have spent the last couple of evenings trying to get it to work.
Do not refer me to the man page as that is not very helpful.
Thanks
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of