Skip to content

Latest commit

 

History

History
158 lines (89 loc) · 6.17 KB

nf-ip2string-rtlipv6addresstostringw.md

File metadata and controls

158 lines (89 loc) · 6.17 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ip2string.RtlIpv6AddressToStringW
RtlIpv6AddressToStringW function (ip2string.h)
Converts an IPv6 address to a string in Internet standard format. (Unicode)
RtlIpv6AddressToString
RtlIpv6AddressToString function [IP Helper]
RtlIpv6AddressToStringW
ip2string/RtlIpv6AddressToString
ip2string/RtlIpv6AddressToStringW
iphlp.rtlipv6addresstostring
iphlp\rtlipv6addresstostring.htm
IpHlp
a891adb0-6c2d-4b69-a0de-4a615be938e3
12/05/2018
RtlIpv6AddressToString, RtlIpv6AddressToString function [IP Helper], RtlIpv6AddressToStringA, RtlIpv6AddressToStringW, ip2string/RtlIpv6AddressToString, ip2string/RtlIpv6AddressToStringA, ip2string/RtlIpv6AddressToStringW, iphlp.rtlipv6addresstostring
ip2string.h
Mstcpip.h, Ip2string.h
Windows
Windows Vista [desktop apps \| UWP apps]
Windows Server 2008 [desktop apps \| UWP apps]
RtlIpv6AddressToStringW (Unicode) and RtlIpv6AddressToStringA (ANSI)
ntdll.lib
ntdll.dll
Windows
19H1
RtlIpv6AddressToStringW
ip2string/RtlIpv6AddressToStringW
c++
APIRef
kbSyntax
DllExport
Ntdll.dll
RtlIpv6AddressToString
RtlIpv6AddressToStringA
RtlIpv6AddressToStringW

RtlIpv6AddressToStringW function

-description

The RtlIpv6AddressToString function converts an IPv6 address to a string in Internet standard format.

-parameters

-param Addr [in]

The IPv6 address in network byte order.

-param S [out]

A pointer to a buffer in which to store the NULL-terminated string representation of the IPv6 address. This buffer should be large enough to hold at least 46 characters.

-returns

A pointer to the NULL character inserted at the end of the string representation of the IPv6 address. This can be used by the caller to easily append more information to the string.

-remarks

The RtlIpv6AddressToString function is used to convert an IPv6 address to the string representation of the IPv6 address in Internet standard format.

The basic string representation consists of 8 hexadecimal numbers separated by colons. A string of consecutive zero numbers is replaced with a double-colon. There can only be one double-colon in the string representation of the IPv6 address. The last 32 bits are represented in IPv4-style dotted-octet notation if the address is an IPv4-compatible address, an IPv4-mapped IPv6 address, or an ISATAP address. For more information, see section 5 of RFC 5942 published by the IETF.

RtlIpv6AddressToString is a convenience function that does not require that the Windows Sockets DLL be loaded to access a function provided in Windows Sockets to perform IP address to string conversion.

When either UNICODE or _UNICODE is defined, RtlIpv6AddressToString is defined to RtlIpv6AddressToStringW, the Unicode version of this function. The string parameter S and the function return value are defined to the PWSTR data type.

When both UNICODE and _UNICODE are not defined, RtlIpv6AddressToString is defined to RtlIpv6AddressToStringA, the ANSI version of this function. The string parameter S and the function return value are defined to the PSTR data type.

The IN6_ADDR structure is defined in the In6addr.h header file.

An import library containing the RtlIpv6AddressToString function is not included in the Microsoft Windows Software Development Kit (SDK) released for Windows Vista. The RtlIpv6AddressToString function is included in the Ntdll.lib import library included in the Windows Driver Kit (WDK). An application could also use the GetModuleHandle and GetProcAddress functions to retrieve the function pointer from the Ntdll.dll and call this function.

Note

The ip2string.h header defines RtlIpv6AddressToString as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

GetModuleHandle

GetProcAddress

InetNtop

InetPton

LoadLibrary

RtlIpv4AddressToString

RtlIpv4AddressToStringEx

RtlIpv4StringToAddress

RtlIpv4StringToAddressEx

RtlIpv6AddressToStringEx

RtlIpv6StringToAddress

RtlIpv6StringToAddressEx

inet_addr

inet_ntoa