LanIdentifier LanIdentifier LanIdentifier LanIdentifier LanIdentifier Class


Represents physical identification data for a specific NetworkAdapter object. For a code example showing how to retrieve data represented by a LanIdentifier object, see How to retrieve network adapter and locality information (XAML).

public : sealed class LanIdentifier : ILanIdentifier
struct winrt::Windows::Networking::Connectivity::LanIdentifier : ILanIdentifier
public sealed class LanIdentifier : ILanIdentifier
Public NotInheritable Class LanIdentifier Implements ILanIdentifier
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


How to retrieve network adapter and locality information (XAML)


Location data is expressed either as a BSSID if the network adapter media type is Wireless LAN, or as a tuple <ChassisId, Port Number> if the network adapter type is Ethernet. The data is represented according to the LLDP protocol.


InfrastructureId InfrastructureId InfrastructureId InfrastructureId InfrastructureId

Gets a LanIdentifierData object containing locality identification information for the network adapter's connection.

public : LanIdentifierData InfrastructureId { get; }
LanIdentifierData InfrastructureId();
public LanIdentifierData InfrastructureId { get; }
Public ReadOnly Property InfrastructureId As LanIdentifierData
var lanIdentifierData = lanIdentifier.infrastructureId;
LanIdentifierData LanIdentifierData LanIdentifierData

Location information for the network adapter providing connectivity for the connection.

NetworkAdapterId NetworkAdapterId NetworkAdapterId NetworkAdapterId NetworkAdapterId

Gets the adapter GUID that identifies the network adapter to associate with the locality information.

public : Platform::Guid NetworkAdapterId { get; }
Guid NetworkAdapterId();
public Guid NetworkAdapterId { get; }
Public ReadOnly Property NetworkAdapterId As Guid
var guid = lanIdentifier.networkAdapterId;
Guid Guid Guid

The adapter ID for the network adapter associated with the LanIdentifier information.

PortId PortId PortId PortId PortId

Gets a LanIdentifierData object containing the port ID from the Link Layer Discovery Protocol (LLDP) locality information for an Ethernet type network adapter.

public : LanIdentifierData PortId { get; }
LanIdentifierData PortId();
public LanIdentifierData PortId { get; }
Public ReadOnly Property PortId As LanIdentifierData
var lanIdentifierData = lanIdentifier.portId;
LanIdentifierData LanIdentifierData LanIdentifierData

The port ID information for the network adapter.