IPGlobalStatistics.DefaultTtl Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
İnternet Protokolü (IP) paketleri için varsayılan yaşam süresi (TTL) değerini alır.
public:
abstract property int DefaultTtl { int get(); };
public abstract int DefaultTtl { get; }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract int DefaultTtl { get; }
member this.DefaultTtl : int
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.DefaultTtl : int
Public MustOverride ReadOnly Property DefaultTtl As Integer
Özellik Değeri
Int64 TTL'yi belirten bir değer.
- Öznitelikler
Örnekler
Aşağıdaki kod örneği bu özelliğin değerini görüntüler.
void ShowIPStatistics()
{
IPGlobalProperties ^ properties = IPGlobalProperties::GetIPGlobalProperties();
IPGlobalStatistics ^ ipstat = properties->GetIPv4GlobalStatistics();
Console::WriteLine( " Forwarding enabled ...................... : {0}",
ipstat->ForwardingEnabled );
Console::WriteLine( " Interfaces .............................. : {0}",
ipstat->NumberOfInterfaces );
Console::WriteLine( " IP addresses ............................ : {0}",
ipstat->NumberOfIPAddresses );
Console::WriteLine( " Routes .................................. : {0}",
ipstat->NumberOfRoutes );
Console::WriteLine( " Default TTL ............................. : {0}",
ipstat->DefaultTtl );
}
public static void ShowIPStatistics()
{
IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties();
IPGlobalStatistics ipstat = properties.GetIPv4GlobalStatistics();
Console.WriteLine(" Forwarding enabled ...................... : {0}",
ipstat.ForwardingEnabled);
Console.WriteLine(" Interfaces .............................. : {0}",
ipstat.NumberOfInterfaces);
Console.WriteLine(" IP addresses ............................ : {0}",
ipstat.NumberOfIPAddresses);
Console.WriteLine(" Routes .................................. : {0}",
ipstat.NumberOfRoutes);
Console.WriteLine(" Default TTL ............................. : {0}",
ipstat.DefaultTtl);
}
Public Shared Sub ShowIPStatistics()
Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
Dim ipstat As IPGlobalStatistics = properties.GetIPv4GlobalStatistics()
Console.WriteLine(" Forwarding enabled ...................... : {0}", ipstat.ForwardingEnabled)
Console.WriteLine(" Interfaces .............................. : {0}", ipstat.NumberOfInterfaces)
Console.WriteLine(" IP addresses ............................ : {0}", ipstat.NumberOfIPAddresses)
Console.WriteLine(" Routes .................................. : {0}", ipstat.NumberOfRoutes)
Console.WriteLine(" Default TTL ............................. : {0}", ipstat.DefaultTtl)
End Sub
Açıklamalar
TTL değeri, bir paketi atmadan önce iletebilen yönlendirme düğümlerinin sayısı olarak bildirilir. Her düğüm, bir paketteki geçerli TTL değerini iletmeden önce azaltmaya devam eder. TTL değeri sıfıra ulaşırsa paket teslim edilemez kabul edilir ve atılır. Bir paket bir düğümden diğerine geçtiğinde bunun "atlama" olarak da bilindiğini unutmayın.