inet_pton和inet_ntop inet_ntoa
摘要:
Linux下地址转换函数inet_pton ==> Oxinet_ntop ==> xxx.xxx.xxx #include #include #include 1 char IPdec[20]; //存放点分十进制IP地址 2 3 struct in_addr s; // IPv4地址结构体 4 5 6 7 printf("Please input IP address: "); 8 9 scanf("%s", IPdec); //input 192.168.1.110 11 12 13 inet_pton(AF_INET, ... 阅读全文
posted @ 2013-12-08 21:21 狮子座男 阅读(787) 评论(0) 推荐(0) 编辑