- All Implemented Interfaces:
Serializable
,Comparable<PcapSrc>
,Constable
,IntSupplier
Internal representation of the type of source in use (file, remote/local
interface).
- 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 ConstantDescriptionInternal representation of the type of source in use (file, remote/local interface).local network interface.interface on a remote host, using RPCAP. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
local savefile.static final int
local network interface.static final int
interface on a remote host, using RPCAP. -
Method Summary
Modifier and TypeMethodDescriptionint
getAsInt()
Get int value of type.toEnum
(int src) Converts PCAP src numerical constant to an enum constant, if found.static PcapSrc
valueOf
(int src) Converts PCAP src numerical constant to an enum constant.static PcapSrc
Returns the enum constant of this class with the specified name.static PcapSrc[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SRC_FILE
Internal representation of the type of source in use (file, remote/local interface). -
SRC_IFLOCAL
local network interface. -
SRC_IFREMOTE
interface on a remote host, using RPCAP.
-
-
Field Details
-
PCAP_SRC_FILE
public static final int PCAP_SRC_FILElocal savefile.- See Also:
-
PCAP_SRC_IFLOCAL
public static final int PCAP_SRC_IFLOCALlocal network interface.- See Also:
-
PCAP_SRC_IFREMOTE
public static final int PCAP_SRC_IFREMOTEinterface on a remote host, using RPCAP.- 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 PCAP src numerical constant to an enum constant.- Parameters:
src
- the PCAP src numerical constant- Returns:
- the PCAP src enum constant
- Throws:
IllegalArgumentException
- thrown if not found
-
toEnum
Converts PCAP src numerical constant to an enum constant, if found.- Parameters:
src
- the PCAP src numerical constant- Returns:
- the PCAP src enum constant
- Throws:
IllegalArgumentException
- thrown if not found
-
getAsInt
public int getAsInt()Get int value of type.- Specified by:
getAsInt
in interfaceIntSupplier
- Returns:
- The type of input source, passed to pcap_open
- See Also:
-