IPGlobalStatistics::DefaultTtl Property
.NET Framework (current version)
Gets the default time-to-live (TTL) value for Internet Protocol (IP) packets.
Assembly: System (in System.dll)
The TTL value is reported as the number of routing nodes that can forward a packet before it is discarded. Each node decrements the current TTL value in a packet before forwarding it. If the TTL value reaches zero, the packet is deemed undeliverable and is discarded. Note that when a packet travels from one node to another, this is also known as a "hop".
The following code example displays the value of this property.
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 ); }
.NET Framework
Available since 2.0
Available since 2.0
Show: