Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设您有以下 IP 地址:
192.168.0.255
如何将该人类可读的 IP 地址存储到struct in_addr? 我对这个低级别的 C 网络编程是全新的,所以任何帮助都将不胜感激。
struct in_addr
你可以做
struct in_addr p; inet_aton("192.168.0.255", &p.s_addr);