htons(), htonl(), ntohs(), ntohl()详解
发布日期:2021-05-12 14:27:10 浏览次数:12 分类:精选文章

本文共 2032 字,大约阅读时间需要 6 分钟。

������������������������������������������������������������

���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ian���������������������������������������������������������ian������������������������������������������������������������������������������������������������������������������

������������������������������

#include 

���������������������������������������

  • htonl( hostlong netlong ): ���32���������������������������������������������������������������������
  • htons( hostshort netshort ): ���16���������������������������������������������������������������������
  • ntohl( netlong hostlong ): ���32���������������������������������������������������
  • ntos( netshort hostshort ): ���16���������������������������������������������������

���������������������������������������������������������������������������������������������������������������big-endian������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������little-endian���������������������������������������������������

������������������IP������������������������������������������������������������������IP������������������������������������������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

上一篇:Linux如何才能ping通外网(详细设置过程,基于Qracle VM VirtualBox)
下一篇:memset()函数及其作用

发表评论

最新留言

感谢大佬
[***.8.128.20]2025年04月23日 04时12分49秒