Export (0) Print
Expand All
Expand Minimize

RtlEthernetAddressToString function

The RtlEthernetAddressToString function converts a binary Ethernet address to a string representation of the Ethernet MAC address.

Syntax


LPTSTR NTAPI RtlEthernetAddressToString(
  _In_   const DL_EUI48 *Addr,
  _Out_  LPTSTR S
);

Parameters

Addr [in]

The Ethernet address in binary format. The Ethernet address is in network order (bytes ordered from left to right).

S [out]

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

Return value

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

Remarks

The RtlEthernetAddressToString function is used to convert a binary Ethernet address to the string representation of the Ethernet address in Ethernet EUI-48 data-link layer address format (also commonly known as a MAC address). The string represents a numeric Ethernet address expressed in the non-DIX standard "-'' notation.

The string returned in the S parameter is represented in the form for an Ethernet MAC address string in the non-DIX standard "-" notation. The basic string representation of an Ethernet MAC address consists of 6 pairs of hexadecimal numbers separated by dashes (F4-CE-46-2D-90-8C, for example).

RtlEthernetAddressToString 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 string to Ethernet address conversion.

When either UNICODE or _UNICODE is defined, RtlEthernetAddressToString is defined to RtlEthernetAddressToStringW, 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, RtlEthernetAddressToString is defined to RtlEthernetAddressToStringA, the ANSI version of this function. The string parameter S and the function return value are defined to the PSTR data type.

The DL_EUI48 data type is defined in the Mstcpip.h header file.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Mstcpip.h

DLL

Ntdll.dll

Unicode and ANSI names

RtlEthernetAddressToStringW (Unicode) and RtlEthernetAddressToStringA (ANSI)

See also

RtlEthernetStringToAddress

 

 

Community Additions

ADD
Show:
© 2014 Microsoft