h*******s 发帖数: 24 | 1 What's wrong?
**************************
unsigned long ppp;
struct in_addr inaddr1;
ppp = inet_addr(hostname);
(void)memcpy(&inaddr1.s_addr,&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 |
|