Class InterfacePdu

Direct Known Subclasses:
InterfacesPdu

public class InterfacePdu extends GetPdu
The InterfacePdu class asks one interface for information, useful for admin purposes. See IF-MIB.
Version:
$Revision: 3.19 $ $Date: 2006/11/29 16:12:50 $
Author:
Tim Panton
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getIndex

      public int getIndex()
      Returns the index of the interface.
      Returns:
      the index
    • getSysUpTime

      public long getSysUpTime()
      Returns the time (in hundredths of a second) since the network management portion of the system was last re-initialized.
    • getDescription

      public String getDescription()
      Returns the description of the interface.
      Returns:
      the description
    • getOperStatus

      public int getOperStatus()
      Returns the operational state of the interface.
      Returns:
      the operational state
    • getOperStatusString

      public String getOperStatusString()
      Returns the string representation of the operational state of the interface.
      Returns:
      the operational state as string
      See Also:
    • getOperStatusString

      public String getOperStatusString(int status)
      Returns the string representation of a operational state.
      See Also:
    • getInOctet

      public long getInOctet()
      Returns the total number of octets received on the interface, including framing characters.
    • getOutOctet

      public long getOutOctet()
      Returns the total number of octets transmitted outOctets of the interface, including framing characters.
    • getSpeed

      public long getSpeed(InterfacePdu old)
      Calculates the speed of the interface. This is done by providing the method with the previous value of this interface. An interface is marked by its index.
      Parameters:
      old - The previous value of this interface
    • getNumIfs

      public static int getNumIfs(SnmpContextBasisFace con) throws PduException, IOException
      Returns how many interfaces are present.
      Returns:
      the number of interfaces
      Throws:
      PduException
      IOException