IPGlobalProperties.GetUnicastAddresses 메서드

정의

로컬 컴퓨터의 안정된 유니캐스트 IP 주소 테이블을 검색합니다.

public:
 virtual System::Net::NetworkInformation::UnicastIPAddressInformationCollection ^ GetUnicastAddresses();
public virtual System.Net.NetworkInformation.UnicastIPAddressInformationCollection GetUnicastAddresses ();
abstract member GetUnicastAddresses : unit -> System.Net.NetworkInformation.UnicastIPAddressInformationCollection
override this.GetUnicastAddresses : unit -> System.Net.NetworkInformation.UnicastIPAddressInformationCollection
Public Overridable Function GetUnicastAddresses () As UnicastIPAddressInformationCollection

반환

로컬 컴퓨터의 안정된 유니캐스트 IP 주소 목록을 포함하는 UnicastIPAddressInformationCollection입니다.

예외

네이티브 GetAdaptersAddresses 함수에 대한 호출에 실패한 경우.

이 메서드는 플랫폼에서 구현되지 않습니다. 이 메서드는 Windows Vista 이상에서 지원되는 네이티브 NotifyStableUnicastIpAddressTable 함수를 사용합니다.

호출자에게 필요한 Read 권한이 없습니다.

네이티브 NotifyStableUnicastIpAddressTable 함수에 대한 호출에 실패한 경우.

설명

아웃 바운드 연결을 지원 하기 위해 또는 Teredo 인터페이스에 들어오는 연결을 허용 하도록 애플리케이션 하 여 Teredo 인터페이스 인지 확인 하 고 사용 하기 위해 준비 해야 합니다. 일정 기간 동안 사용하지 않을 때 Teredo 휴면 상태로 전환할 수 있기 때문입니다.

GetUnicastAddresses 메서드 애플리케이션이 안정 된 유니캐스트 IP 주소 목록을 검색할 수 있습니다. 속성은 IPAddress.IsIPv6Teredo IP 주소가 2001:/32 접두사를 가진 IPv6 Teredo 주소인지 확인하는 데 사용할 수 있습니다.

또한 메서드는 GetUnicastAddresses Teredo 이외의 주소를 반환하고 로컬 컴퓨터의 모든 System.Net.NetworkInformation.NetworkInterface 개체를 열거하고 연결된 IP 주소를 쿼리하는 것보다 시스템의 유니캐스트 IP 주소를 가져오는 보다 편리한 방법을 제공합니다.

적용 대상

추가 정보