RE: OT: quick apache question - gethostbyname()

2003-08-20 Thread Don Buckley
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 > >

Re: gethostbyname

2002-09-20 Thread Frank Heitmann
> 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 }

Re: gethostbyname

2002-09-19 Thread Jacob Rhoden
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

gethostbyname

2002-09-19 Thread Tony
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