I use FreeBSD5.3,I use inet_pton under c language,like follows:
if(inet_pton(AF_INET6,argv[1],&servaddr.sin6_addr)<=0){
printf("error");
}
else{
printf("ok");
}
Then I run above code,
./a.out 127.0.0.1
It shows "error"! I don't know why it don't show "ok",anyone could tell me the reason and how to do it?
Thanks in advance!
Best regards,
konvalo