Module org.jnetpcap

Enum Class PcapIfFlag

java.lang.Object
java.lang.Enum<PcapIfFlag>
org.jnetpcap.constant.PcapIfFlag
All Implemented Interfaces:
Serializable, Comparable<PcapIfFlag>, Constable, IntSupplier

public enum PcapIfFlag extends Enum<PcapIfFlag> implements IntSupplier
Network interface status flags.
Author:
Sly Technologies Inc, repos@slytechs.com, mark
  • Enum Constant Details

    • IF_LOOPBACK

      public static final PcapIfFlag IF_LOOPBACK
      interface is loopback.
    • IF_UP

      public static final PcapIfFlag IF_UP
      interface is up.
    • IF_RUNNING

      public static final PcapIfFlag IF_RUNNING
      interface is running.
    • IF_WIRELESS

      public static final PcapIfFlag IF_WIRELESS
      interface is wireless (*NOT* necessarily Wi-Fi!).
    • IF_CONNECTION_STATUS_CONNECTED

      public static final PcapIfFlag IF_CONNECTION_STATUS_CONNECTED
      connected.
    • IF_CONNECTION_STATUS_DISCONNECTED

      public static final PcapIfFlag IF_CONNECTION_STATUS_DISCONNECTED
      disconnected.
    • IF_CONNECTION_STATUS_NOT_APPLICABLE

      public static final PcapIfFlag IF_CONNECTION_STATUS_NOT_APPLICABLE
      not applicable.
  • Field Details

    • PCAP_IF_LOOPBACK

      public static final int PCAP_IF_LOOPBACK
      interface is loopback.
      See Also:
    • PCAP_IF_UP

      public static final int PCAP_IF_UP
      interface is up.
      See Also:
    • PCAP_IF_RUNNING

      public static final int PCAP_IF_RUNNING
      interface is running.
      See Also:
    • PCAP_IF_WIRELESS

      public static final int PCAP_IF_WIRELESS
      interface is wireless (*NOT* necessarily Wi-Fi!).
      See Also:
    • PCAP_IF_CONNECTION_STATUS

      public static final int PCAP_IF_CONNECTION_STATUS
      connection status:.
      See Also:
    • PCAP_IF_CONNECTION_STATUS_UNKNOWN

      public static final int PCAP_IF_CONNECTION_STATUS_UNKNOWN
      unknown.
      See Also:
    • PCAP_IF_CONNECTION_STATUS_CONNECTED

      public static final int PCAP_IF_CONNECTION_STATUS_CONNECTED
      connected.
      See Also:
    • PCAP_IF_CONNECTION_STATUS_DISCONNECTED

      public static final int PCAP_IF_CONNECTION_STATUS_DISCONNECTED
      disconnected.
      See Also:
    • PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE

      public static final int PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE
      not applicable.
      See Also:
  • Method Details

    • values

      public static PcapIfFlag[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PcapIfFlag valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toEnumSet

      public static Set<PcapIfFlag> toEnumSet(int flags)
      Converts integer flag bit-field, to an enum set. The method drops "connection" status bits by ANDing with 0x0F value and only uses PCAP interface flag bits.
      Parameters:
      flags - integer bitfield where each bit is a flag
      Returns:
      an enum set containing bits flag bits
    • toLabelSet

      public static Set<String> toLabelSet(int flags)
      To a set of PcapIf flags..
      Parameters:
      flags - the bitmask of flags
      Returns:
      the set of enum constants
    • label

      public String label()
      A human readable label for this constant.
      Returns:
      the label
    • getAsInt

      public int getAsInt()
      Gets the as int.
      Specified by:
      getAsInt in interface IntSupplier
      Returns:
      the as int
      See Also: