Module org.jnetpcap

Enum Class WinPcapMode

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

public enum WinPcapMode extends Enum<WinPcapMode> implements IntSupplier
WinPcap setmode values.
Author:
Sly Technologies Inc, repos@slytechs.com, mark
  • Enum Constant Details

    • CAPT

      public static final WinPcapMode CAPT
      The CAPTURE mode constant.
    • STAT

      public static final WinPcapMode STAT
      The STATISTICS mode constant.
    • MON

      public static final WinPcapMode MON
      The MONITOR mode constant.
  • Field Details

  • Method Details

    • values

      public static WinPcapMode[] 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 WinPcapMode 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
    • valueOf

      public static WinPcapMode valueOf(int mode) throws IllegalArgumentException
      Converts numerical WinPcap mode constant to an enum.
      Parameters:
      mode - the PCAP integer mode constant
      Returns:
      the pcap mode constant
      Throws:
      IllegalArgumentException - thrown if not found
    • toEnum

      public static Optional<WinPcapMode> toEnum(int mode)
      Converts numerical WinPcap mode constant to an enum, if found.
      Parameters:
      mode - the WinPcap mode constant
      Returns:
      the optional enum constant
    • getAsInt

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