由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - HELP gethostbyaddr()
相关主题
help: gethostbyaddr()a question about inetd server programming
Which library include gethostbyname?What's the command to see your machine's ip addr?
Re: What's the function to get the local ip给出HOST NAME,要求返回IP ADDRESS的函数?
HELP needed--FTP client programmingRe: how to close port/socket from parent process?help!!!!!!!!!
为什么这段代码在FreeBSD上不work? (编译没问题)从一个telnet终端最多能启动几个程序在unix上运行?
unix network programming (Stevens) book V1 (2ed, 3ed) code cannot run on Linux请教高手: 如何写TCP-client program in C++?
REMOTE_USER is UNKNOWN??InetAddress.getLocalHost() in Ubuntu does not work
why I cannot get host IP addressRe: 有没有什么网络函数能够 (转载)
相关话题的讨论汇总
话题: addr话题: ppp话题: what话题: inet
进入Unix版参与讨论
1 (共1页)
h*******s
发帖数: 24
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
1 (共1页)
进入Unix版参与讨论
相关主题
Re: 有没有什么网络函数能够 (转载)为什么这段代码在FreeBSD上不work? (编译没问题)
一个socket中select函数的问题unix network programming (Stevens) book V1 (2ed, 3ed) code cannot run on Linux
问一个Linux无法监听指定端口的问题REMOTE_USER is UNKNOWN??
VPN 一问why I cannot get host IP address
help: gethostbyaddr()a question about inetd server programming
Which library include gethostbyname?What's the command to see your machine's ip addr?
Re: What's the function to get the local ip给出HOST NAME,要求返回IP ADDRESS的函数?
HELP needed--FTP client programmingRe: how to close port/socket from parent process?help!!!!!!!!!
相关话题的讨论汇总
话题: addr话题: ppp话题: what话题: inet