IPAddress.MapToIPv6 方法

定义

IPAddress 对象映射到 IPv6 地址。Maps the IPAddress object to an IPv6 address.

public:
 System::Net::IPAddress ^ MapToIPv6();
public System.Net.IPAddress MapToIPv6 ();
member this.MapToIPv6 : unit -> System.Net.IPAddress
Public Function MapToIPv6 () As IPAddress

返回

IPAddress

返回 IPAddressReturns IPAddress.

IPv6 地址。An IPv6 address.

注解

双堆栈套接字始终需要 IPv6 地址。Dual-stack sockets always require IPv6 addresses. 与 IPv4 地址进行交互的功能需要使用 IPv4 映射的 IPv6 地址格式。The ability to interact with an IPv4 address requires the use of the IPv4-mapped IPv6 address format. 所有 IPv4 地址必须以 IPv4 映射的 IPv6 地址格式表示,这使得仅支持 IPv6 的应用程序能够与 IPv4 节点通信。Any IPv4 addresses must be represented in the IPv4-mapped IPv6 address format which enables an IPv6 only application to communicate with an IPv4 node. IPv4 映射的 IPv6 地址格式允许 IPv4 节点的 IPv4 地址表示为 IPv6 地址。The IPv4-mapped IPv6 address format allows the IPv4 address of an IPv4 node to be represented as an IPv6 address. IPv4 地址编码为 IPv6 地址的低序位32位,高序位96位保存固定前缀0:0:0:0:0: FFFF。The IPv4 address is encoded into the low-order 32 bits of the IPv6 address, and the high-order 96 bits hold the fixed prefix 0:0:0:0:0:FFFF. 在 RFC 4291 中指定了 IPv4 映射的 IPv6 地址格式。The IPv4-mapped IPv6 address format is specified in RFC 4291. 有关详细信息,请参阅 www.ietf.org/rfc/rfc4291.txtFor more information, see www.ietf.org/rfc/rfc4291.txt.

适用于