- All Implemented Interfaces:
Serializable
,Comparable<PcapMode>
,Constable
Pcap live capture mode flags.
- Author:
- Sly Technologies, repos@slytechs.com
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionFlag used withopenLive
to specify that the interface should be put into non-promisuous mode.Flag used withopenLive
to specify that the interface should be put into promisuous mode. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Flag used withopenLive
to specify that the interface should be put into non-promisuous mode.static final int
Flag used withopenLive
to specify that the interface should be put into promisuous mode. -
Method Summary
Modifier and TypeMethodDescriptiontoEnum
(int mode) Converts numerical PCAP_MODE constant to an enum, if found.static PcapMode
valueOf
(int mode) Converts numerical PCAP_MODE constant to an enum.static PcapMode
Returns the enum constant of this class with the specified name.static PcapMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
NON_PROMISCOUS
Flag used withopenLive
to specify that the interface should be put into non-promisuous mode. -
PROMISCUOUS
Flag used withopenLive
to specify that the interface should be put into promisuous mode.
-
-
Field Details
-
PCAP_MODE_NON_PROMISCUOUS
public static final int PCAP_MODE_NON_PROMISCUOUSFlag used withopenLive
to specify that the interface should be put into non-promisuous mode.- See Also:
-
PCAP_MODE_PROMISCUOUS
public static final int PCAP_MODE_PROMISCUOUSFlag used withopenLive
to specify that the interface should be put into promisuous mode.- See Also:
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
valueOf
Converts numerical PCAP_MODE constant to an enum.- Parameters:
mode
- the PCAP integer mode constant- Returns:
- the pcap mode constant
- Throws:
IllegalArgumentException
- thrown if not found
-
toEnum
Converts numerical PCAP_MODE constant to an enum, if found.- Parameters:
mode
- the PCAP integer mode constant- Returns:
- the optional enum constant
-