inet_aton and inet_addr


 
Thread Tools Search this Thread
Top Forums Programming inet_aton and inet_addr
# 1  
Old 04-10-2010
inet_aton and inet_addr

wht is the difference between inet_aton and inet_addr function ??
# 2  
Old 04-10-2010
See beej's guide:
inet_ntoa(), inet_aton(), inet_addr

Plus, both of those calls only work on ipv4 addresses.
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Programming

warning: passing arg 1 of `inet_addr' makes pointer from integer without a cast

I use solaris10,following is tcp client code: #include "cliserv.h" int main(int argc,char argv){ struct sockaddr_in serv; char request,reply; int sockfd,n; if(argc!=2) err_quit("usage: tcpclient <IP address of server>"); if((sockfd=socket(PF_INET,SOCK_STREAM,0))<0) ... (1 Reply)
Discussion started by: konvalo
1 Replies

2. UNIX for Dummies Questions & Answers

Principle of inet_addr and inet_ntoa

hello, i have just started Socket programming and i come across functions inet_addr() which converts IP address to unsigned long and inet_ntoa() which converts unsigned long to IP address but dont understand on what formula/principle they do these conversions say for a given ip address can... (0 Replies)
Discussion started by: juststarted
0 Replies

3. Programming

inet_addr() returns 0

Im trying to connect to a particular IP address and I'm tying to use gethostbyaddr() and inet_addr() to do this. However, when I tried using inet_addr(), I always get a return value of 0 when I tried to connect to "172.21.16.238". Hope someone here could help me on this. I already tried using inet_... (1 Reply)
Discussion started by: soulfactory2002
1 Replies
Login or Register to Ask a Question