다음을 통해 공유


IPGlobalStatistics.ForwardingEnabled 속성

정의

IP(인터넷 프로토콜) 패킷 전달이 가능한지 여부를 나타내는 Boolean 값입니다.

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

속성 값

패킷 전달이 가능한지 여부를 나타내는 Boolean 값입니다.

특성

예제

다음 코드 예제에서는이 속성의 값을 표시합니다.

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

설명

이 값은 컴퓨터가 다른 컴퓨터로 향하는 IP 데이터그램을 전달하는지 여부를 결정합니다. 일반적으로 라우터는 패킷을 전달하고 호스트 컴퓨터는 전달하지 않습니다.

적용 대상