【C++】inet_ptoa&inet_atop inet_pton&inet_ntop
来源:互联网 发布:js是什么防水材料 编辑:程序博客网 时间:2024/06/07 04:52
- inet_aton、inet_addr和inet_ntoa在点分十进制数串(例如”206.62.226.33”)与它的32位网络字节序二进制值间转换IPv4地址
- 两个较新的函数:inet_pton和inet_ntop对IPv4和IPv6地址都能进行处理
/* Convert Internet number in IN to ASCII representation. The return value is a pointer to an internal array containing the string. */extern char *inet_ntoa (struct in_addr __in) __THROW;/* Convert from presentation format of an Internet number in buffer starting at CP to the binary network format and store result for interface type AF in buffer starting at BUF. */extern int inet_pton (int __af, const char *__restrict __cp, void *__restrict __buf) __THROW;/* Convert a Internet address in binary network format for interface type AF in buffer starting at CP to presentation form and place result in buffer of length LEN astarting at BUF. */extern const char *inet_ntop (int __af, const void *__restrict __cp, char *__restrict __buf, socklen_t __len) __THROW;/* The following functions are not part of XNS 5.2. */#ifdef __USE_MISC/* Convert Internet host address from numbers-and-dots notation in CP into binary data and store the result in the structure INP. */extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
引用图:http://m.blog.csdn.net/u011068702/article/details/61219662
阅读全文
0 0
- 【C++】inet_ptoa&inet_atop inet_pton&inet_ntop
- inet_pton+inet_ntop
- inet_ntop, inet_pton
- inet_pton, inet_ntop
- inet_ntop(), inet_pton()
- inet_ntop, inet_pton
- inet_pton, inet_ntop
- inet_pton, inet_ntop
- inet_pton, inet_ntop
- inet_pton、inet_ntop
- inet_pton, inet_ntop
- inet_pton,inet_ntop
- inet_pton, inet_ntop
- inet_pton, inet_ntop
- inet_pton和inet_ntop函数
- inet_pton和inet_ntop
- inet_pton和inet_ntop函数
- inet_pton和inet_ntop函数
- AVL树的实现(C++)
- 安卓常用工具类-SoftKeyboardUtils【软件盘工具类】
- [DL]机器学习算法之支持向量机(Support Vector Machine)
- 田忌赛马——贪心算法(附加别人写的动态规划)
- VMware Ubuntu 全屏
- 【C++】inet_ptoa&inet_atop inet_pton&inet_ntop
- 基于51单片机的无线通讯公交报站系统
- 第四天-运算符
- 安装 cobra
- java线程之间的通信(等待/通知机制)
- 第十章:对象和类
- JUnit测试工具
- OCP学习笔记之数据库及实例的启动
- Kafka 安装部署&java demo