Share via


IPAddress.ScopeId Özellik

Tanım

IPv6 adres kapsamı tanımlayıcısını alır veya ayarlar.

public:
 property long ScopeId { long get(); void set(long value); };
public long ScopeId { get; set; }
member this.ScopeId : int64 with get, set
Public Property ScopeId As Long

Özellik Değeri

Adresin kapsamını belirten uzun bir tamsayı.

Özel durumlar

AddressFamily = InterNetwork.

scopeId< 0

-veya-

scopeId> 0x00000000FFFFFFFF

Örnekler

// Display the type of address family supported by the server. If the
// server is IPv6-enabled this value is: InterNetworkV6. If the server
// is also IPv4-enabled there will be an additional value of InterNetwork.
Console::WriteLine( "AddressFamily: {0}", curAdd->AddressFamily );

// Display the ScopeId property in case of IPV6 addresses.
if ( curAdd->AddressFamily.ToString() == ProtocolFamily::InterNetworkV6.ToString() )
         Console::WriteLine( "Scope Id: {0}", curAdd->ScopeId );

// Display the type of address family supported by the server. If the
// server is IPv6-enabled this value is: InterNetworkV6. If the server
// is also IPv4-enabled there will be an additional value of InterNetwork.
Console.WriteLine("AddressFamily: " + curAdd.AddressFamily.ToString());

// Display the ScopeId property in case of IPV6 addresses.
if(curAdd.AddressFamily.ToString() == ProtocolFamily.InterNetworkV6.ToString())
  Console.WriteLine("Scope Id: " + curAdd.ScopeId.ToString());
' Display the type of address family supported by the server. If the
' server is IPv6-enabled this value is: InterNetworkV6. If the server
' is also IPv4-enabled there will be an additional value of InterNetwork.
Console.WriteLine(("AddressFamily: " + curAdd.AddressFamily.ToString()))

' Display the ScopeId property in case of IPV6 addresses.
If curAdd.AddressFamily.ToString() = ProtocolFamily.InterNetworkV6.ToString() Then
  Console.WriteLine(("Scope Id: " + curAdd.ScopeId.ToString()))
End If

Açıklamalar

Kullanıldığı bağlama bağlı olarak değişikliklerin anlamı ScopeId .

  • Bağlantı yerel adresi. Ayrı bağlantılara bağlı birden çok arabirimi olan bir konakta, aynı bağlantı yerel adresi birden çok arabirime atanabilir. Bu belirsizliği ortadan kaldırmak için, iletilerin değiştirildiği arabirimi belirtmek için bir kapsam tanımlayıcısı kullanılır.

Not

Biçim Ön Eki (FP) FE80 ile tanımlanan bağlantı yerel adresleri, aynı bağlantı üzerindeki komşu düğümlerle iletişim kurarken düğümler tarafından kullanılır.

  • Site yerel adresleri. Bir konak birden çok siteye bağlanabilir. Bu durumda, iletişim kuracak belirli bir siteyi belirtmek için kapsam tanımlayıcısı kullanılır.

Not

Biçim Ön Eki (FP) FEC0 ile tanımlanan site yerel adresleri, özel intranetlerde iletişim kurarken düğümler tarafından kullanılır.

ile belirtmek için ScopeId kullanılan gösterimi şeklindedir Address%ScopeId. Örneğin, FE80::5EFE:192.168.41.30%2.

Şunlara uygulanır