IPGlobalStatistics.ForwardingEnabled Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene un valore Boolean che specifica se è stato abilitato l'inoltro del pacchetto IP (Internet Protocol).
public:
abstract property bool ForwardingEnabled { bool get(); };
public abstract bool ForwardingEnabled { get; }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract bool ForwardingEnabled { get; }
member this.ForwardingEnabled : bool
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
member this.ForwardingEnabled : bool
Public MustOverride ReadOnly Property ForwardingEnabled As Boolean
Valore della proprietà
Valore Boolean che specifica se l'inoltro del pacchetto è stato abilitato.
- Attributi
Esempio
Nell'esempio di codice seguente viene visualizzato il valore di questa proprietà.
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
Commenti
Questo valore determina se il computer inoltra i datagrammi IP destinati a un altro computer. In genere, i router inoltrano pacchetti e computer host non.