From: trustee on 7 Mar 2010 23:00 Ah ok...the function that I posted is *not* the function that gets called. The real gethostbyname is automatically generated by the preprocessor in the files inet/gethstbynm.c, nss/getXXbyYY.c and nss/getXXbyYY_r.c. IP parsing is done in nss/digits_dots.c. I could make it accept IPv6 addresses by changing AF_INET to AF_INET6 in the following code. But after that it won't accept IPv4 addresses. ;-) nss/getXXbyYY.c #ifdef HAVE_AF # define AF_VAL af #else # define AF_VAL AF_INET #endif Bye.
From: Rick Jones on 8 Mar 2010 13:54 You *really* aught to be migrating to getaddrinfo()/getnodeinfo(). rick jones -- a wide gulf separates "what if" from "if only" these opinions are mine, all mine; HP might not want them anyway... :) feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
From: trustee on 9 Mar 2010 01:43 > You *really* aught to be migrating to getaddrinfo()/getnodeinfo(). I have written two classes, one with getaddrinfo and one with gethostbyname. I implemented the gethostbyname stuff only for fun, i know that it is not recommended nowadays. :)
First
|
Prev
|
Pages: 1 2 3 Prev: Waiting for popen to finish writing to stdout Next: Impact of solid-state drives |