OperationalStatus OperationalStatus OperationalStatus OperationalStatus Enum

Definición

Especifica el estado operativo de una interfaz de red.Specifies the operational state of a network interface.

public enum class OperationalStatus
public enum OperationalStatus
type OperationalStatus = 
Public Enum OperationalStatus
Herencia
OperationalStatusOperationalStatusOperationalStatusOperationalStatus

Campos

Dormant Dormant Dormant Dormant 5

La interfaz de red no se encuentra en condiciones de transmitir paquetes de datos; está esperando a un evento externo.The network interface is not in a condition to transmit data packets; it is waiting for an external event.

Down Down Down Down 2

La interfaz de red no puede transmitir paquetes de datos.The network interface is unable to transmit data packets.

LowerLayerDown LowerLayerDown LowerLayerDown LowerLayerDown 7

La interfaz de red no puede transmitir paquetes de datos porque se ejecuta sobre una o varias interfaces y, por lo menos, una de estas interfaces de capas inferiores no está disponible.The network interface is unable to transmit data packets because it runs on top of one or more other interfaces, and at least one of these "lower layer" interfaces is down.

NotPresent NotPresent NotPresent NotPresent 6

La interfaz de red no puede transmitir paquetes de datos debido a que falta un componente, normalmente un componente de hardware.The network interface is unable to transmit data packets because of a missing component, typically a hardware component.

Testing Testing Testing Testing 3

La interfaz de red está realizando comprobaciones.The network interface is running tests.

Unknown Unknown Unknown Unknown 4

No se conoce el estado de la interfaz de red.The network interface status is not known.

Up Up Up Up 1

La interfaz de red está conectada; puede transmitir paquetes de datos.The network interface is up; it can transmit data packets.

Ejemplos

En el ejemplo de código siguiente se muestra un resumen de todas las interfaces en el equipo local.The following code example displays a summary for all interfaces on the local computer.

void ShowInterfaceSummary()
{
   array<NetworkInterface^>^interfaces = NetworkInterface::GetAllNetworkInterfaces();
   System::Collections::IEnumerator^ myEnum5 = interfaces->GetEnumerator();
   while ( myEnum5->MoveNext() )
   {
      NetworkInterface ^ adapter = safe_cast<NetworkInterface ^>(myEnum5->Current);
      Console::WriteLine( "Name: {0}", adapter->Name );
      Console::WriteLine( adapter->Description );
      Console::WriteLine( String::Empty->PadLeft( adapter->Description->Length, '=' ) );
      Console::WriteLine( "  Interface type .......................... : {0}",
         adapter->NetworkInterfaceType );
      Console::WriteLine( "  Operational status ...................... : {0}", adapter->OperationalStatus );
      String^ versions = "";

      // Create a display string for the supported IP versions.
      if ( adapter->Supports( NetworkInterfaceComponent::IPv4 ) )
      {
         versions = "IPv4";
      }

      if ( adapter->Supports( NetworkInterfaceComponent::IPv6 ) )
      {
         if ( versions->Length > 0 )
         {
            versions = String::Concat( versions, " " );
         }

         versions = String::Concat( versions, "IPv6" );
      }

      Console::WriteLine( "  IP version .............................. : {0}", versions );
      Console::WriteLine();
   }

   Console::WriteLine();
}
public static void ShowInterfaceSummary()
{
    
    NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
    foreach (NetworkInterface adapter in interfaces)
    {                
        Console.WriteLine ("Name: {0}", adapter.Name);
        Console.WriteLine(adapter.Description);
        Console.WriteLine(String.Empty.PadLeft(adapter.Description.Length,'='));
        Console.WriteLine("  Interface type .......................... : {0}", adapter.NetworkInterfaceType);
        Console.WriteLine("  Operational status ...................... : {0}", 
            adapter.OperationalStatus);
        string versions ="";

        // Create a display string for the supported IP versions.
        if (adapter.Supports(NetworkInterfaceComponent.IPv4))
        {
             versions = "IPv4";
         }
        if (adapter.Supports(NetworkInterfaceComponent.IPv6))
        {
            if (versions.Length > 0)
            {
                versions += " ";
             }
            versions += "IPv6";
        }
        Console.WriteLine("  IP version .............................. : {0}", versions);
        Console.WriteLine();
    }
    Console.WriteLine();
}

Comentarios

Esta enumeración define los valores válidos para el OperationalStatus propiedad.This enumeration defines valid values for the OperationalStatus property.

Se aplica a