- All Implemented Interfaces:
Serializable
,Comparable<PcapIfFlag>
,Constable
,IntSupplier
Network interface status flags.
- Author:
- Sly Technologies Inc, repos@slytechs.com, mark
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionconnected.disconnected.not applicable.interface is loopback.interface is running.interface is up.interface is wireless (*NOT* necessarily Wi-Fi!). -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
connection status:.static final int
connected.static final int
disconnected.static final int
not applicable.static final int
unknown.static final int
interface is loopback.static final int
interface is running.static final int
interface is up.static final int
interface is wireless (*NOT* necessarily Wi-Fi!). -
Method Summary
Modifier and TypeMethodDescriptionint
getAsInt()
Gets the as int.label()
A human readable label for this constant.static Set
<PcapIfFlag> toEnumSet
(int flags) Converts integer flag bit-field, to an enum set.toLabelSet
(int flags) To a set of PcapIf flags..static PcapIfFlag
Returns the enum constant of this class with the specified name.static PcapIfFlag[]
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
-
IF_LOOPBACK
interface is loopback. -
IF_UP
interface is up. -
IF_RUNNING
interface is running. -
IF_WIRELESS
interface is wireless (*NOT* necessarily Wi-Fi!). -
IF_CONNECTION_STATUS_CONNECTED
connected. -
IF_CONNECTION_STATUS_DISCONNECTED
disconnected. -
IF_CONNECTION_STATUS_NOT_APPLICABLE
not applicable.
-
-
Field Details
-
PCAP_IF_LOOPBACK
public static final int PCAP_IF_LOOPBACKinterface is loopback.- See Also:
-
PCAP_IF_UP
public static final int PCAP_IF_UPinterface is up.- See Also:
-
PCAP_IF_RUNNING
public static final int PCAP_IF_RUNNINGinterface is running.- See Also:
-
PCAP_IF_WIRELESS
public static final int PCAP_IF_WIRELESSinterface is wireless (*NOT* necessarily Wi-Fi!).- See Also:
-
PCAP_IF_CONNECTION_STATUS
public static final int PCAP_IF_CONNECTION_STATUSconnection status:.- See Also:
-
PCAP_IF_CONNECTION_STATUS_UNKNOWN
public static final int PCAP_IF_CONNECTION_STATUS_UNKNOWNunknown.- See Also:
-
PCAP_IF_CONNECTION_STATUS_CONNECTED
public static final int PCAP_IF_CONNECTION_STATUS_CONNECTEDconnected.- See Also:
-
PCAP_IF_CONNECTION_STATUS_DISCONNECTED
public static final int PCAP_IF_CONNECTION_STATUS_DISCONNECTEDdisconnected.- See Also:
-
PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE
public static final int PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLEnot applicable.- 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
-
toEnumSet
Converts integer flag bit-field, to an enum set. The method drops "connection" status bits by ANDing with0x0F
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
To a set of PcapIf flags..- Parameters:
flags
- the bitmask of flags- Returns:
- the set of enum constants
-
label
A human readable label for this constant.- Returns:
- the label
-
getAsInt
public int getAsInt()Gets the as int.- Specified by:
getAsInt
in interfaceIntSupplier
- Returns:
- the as int
- See Also:
-