HELP gethostbyaddr()# Unix - 噫吁兮,危乎高哉
h*s
1 楼
What's wrong?
**************************
unsigned long ppp;
struct in_addr inaddr1;
ppp = inet_addr(hostname);
(void)memcpy(&inaddr1.s_addr,(char*)&ppp,sizeof
(inaddr1.s_addr));
if((hostaddress =
gethostbyaddr((char*)&inaddr1.s_addr,sizeof(inaddr1.s_addr),
PF_INET))==NULL);
{
}
******************************
What's wrong in the above section?
Can you send me an example about gethostbyaddr()?
my email address:
w*[email protected]
Thanks
**************************
unsigned long ppp;
struct in_addr inaddr1;
ppp = inet_addr(hostname);
(void)memcpy(&inaddr1.s_addr,(char*)&ppp,sizeof
(inaddr1.s_addr));
if((hostaddress =
gethostbyaddr((char*)&inaddr1.s_addr,sizeof(inaddr1.s_addr),
PF_INET))==NULL);
{
}
******************************
What's wrong in the above section?
Can you send me an example about gethostbyaddr()?
my email address:
w*[email protected]
Thanks