Increment IP address(增加 IP 地址)
本文介绍了增加 IP 地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在那个程序中,我想增加 IP 地址.我看到这样的输出:
In that program I want to increment IP address. And I see output like that:
但我想看到这样的输出:
But I want to see output like this:
这是程序代码:
推荐答案
Big endian 和 little endian 又多了一个!使用 htonl 和 ntohl 来回转换.
Big endian and little endian gets another one! Use htonl and ntohl to convert back and forth.
这篇关于增加 IP 地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!