使用boost库将ipv6地址转换为字符串,反之亦然

问题描述 投票:0回答:1

一个IPV6地址想要将它转换为字符串并且给定字符串想要使用标准的boost库转换为IPV6地址。我可以使用什么api?

ipv6
1个回答
0
投票

使用inet_ntop()将IPv6地址从二进制转换为文本格式(see here)

使用inet_pton()将IPv6地址从文本转换为二进制形式(see here)

© www.soinside.com 2019 - 2024. All rights reserved.