Package org.pcap4j.packet.namednumber
Class DataLinkType
- java.lang.Object
-
- org.pcap4j.packet.namednumber.NamedNumber<java.lang.Integer,DataLinkType>
-
- org.pcap4j.packet.namednumber.DataLinkType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DataLinkType>
public final class DataLinkType extends NamedNumber<java.lang.Integer,DataLinkType>
Pcap Data Link Type- Since:
- pcap4j 0.9.1
- Author:
- Kaito Yamada
- See Also:
- pcap/bpf.h, tcpdump.org, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DataLinkType
DOCSIS
DOCSIS MAC frames: 143static DataLinkType
EN10MB
Ethernet (10Mb, 100Mb, 1000Mb, and up): 1static DataLinkType
FDDI
FDDI: 10static DataLinkType
IEEE802
802.5 Token Ring: 6static DataLinkType
IEEE802_11
IEEE 802.11 wireless: 105static DataLinkType
IEEE802_11_RADIO
Radiotap: 127 - Header for 802.11 plus a number of bits of link-layer information including radio information, used by some recent BSD drivers as well as the madwifi Atheros driver for Linux.static DataLinkType
LINUX_SLL
Linux cooked-mode capture (SLL): 113static DataLinkType
NULL
Null (BSD loopback encapsulation): 0static DataLinkType
PPP
Point-to-point Protocol: 9static DataLinkType
PPP_SERIAL
PPP over serial with HDLC encapsulation: 50static DataLinkType
RAW
RAW IP packet: 14 on OpenBSD, or 12 on the others.
-
Constructor Summary
Constructors Constructor Description DataLinkType(java.lang.Integer value, java.lang.String name)
-
Method Summary
Modifier and Type Method Description int
compareTo(DataLinkType o)
static DataLinkType
getInstance(java.lang.Integer value)
static DataLinkType
register(DataLinkType type)
java.lang.String
valueAsString()
-
-
-
Field Detail
-
NULL
public static final DataLinkType NULL
Null (BSD loopback encapsulation): 0
-
EN10MB
public static final DataLinkType EN10MB
Ethernet (10Mb, 100Mb, 1000Mb, and up): 1
-
IEEE802
public static final DataLinkType IEEE802
802.5 Token Ring: 6
-
PPP
public static final DataLinkType PPP
Point-to-point Protocol: 9
-
FDDI
public static final DataLinkType FDDI
FDDI: 10
-
RAW
public static final DataLinkType RAW
RAW IP packet: 14 on OpenBSD, or 12 on the others. If you want to change this value, set the property org.pcap4j.dlt.raw (system property or pcap4j.properties) to an integer before using this class.- See Also:
Pcap4jPropertiesLoader
, pcap4j.properties
-
PPP_SERIAL
public static final DataLinkType PPP_SERIAL
PPP over serial with HDLC encapsulation: 50
-
IEEE802_11
public static final DataLinkType IEEE802_11
IEEE 802.11 wireless: 105
-
LINUX_SLL
public static final DataLinkType LINUX_SLL
Linux cooked-mode capture (SLL): 113
-
IEEE802_11_RADIO
public static final DataLinkType IEEE802_11_RADIO
Radiotap: 127 - Header for 802.11 plus a number of bits of link-layer information including radio information, used by some recent BSD drivers as well as the madwifi Atheros driver for Linux.
-
DOCSIS
public static final DataLinkType DOCSIS
DOCSIS MAC frames: 143
-
-
Method Detail
-
getInstance
public static DataLinkType getInstance(java.lang.Integer value)
- Parameters:
value
- value- Returns:
- a DataLinkType object.
-
register
public static DataLinkType register(DataLinkType type)
- Parameters:
type
- type- Returns:
- a DataLinkType object.
-
valueAsString
public java.lang.String valueAsString()
- Overrides:
valueAsString
in classNamedNumber<java.lang.Integer,DataLinkType>
- Returns:
- a string representation of this value.
-
compareTo
public int compareTo(DataLinkType o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<DataLinkType>
- Specified by:
compareTo
in classNamedNumber<java.lang.Integer,DataLinkType>
-
-