|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<PcapDLT>
org.jnetpcap.PcapDLT
public enum PcapDLT
Constants that represent the Pcap's Payload Link Type assignments. The most
popular constant is the EN10MB (alternatively CONST_EN10MB)
which represents
Ethernet2 based physical medium. This includes 10, 100, and 1000
mega-bit ethernets.
There are 2 tables within PcapDLT enum structure. First is the full table of
enum constants, and then there is a duplicate table containing
public final static int of contants, prefixed with
CONST_. Also the enum constant's field value is
public which means that integer DLT constant can also be access using the
field directly.
int dlt = pcap.datalink(); // Get DLT value from open Pcap capture
if (dlt == PcapDLT.EN10MB.value) {
// Do something
}
// Also can use this more formal approach
if (PcapDLT.EN10MB.equals(dlt)) {
// Do something
}
int dlt = pcap.datalink(); // Get DLT value from open Pcap capture
if (dlt == PcapDLT.CONST_EN10MB) {
// Do something
}
int dlt = pcap.datalink(); // Get DLT value from open Pcap capture
PcapDLT enumConst = PcapDLT.valueOf(dlt);
System.out.println("The Payload Link Type is " + enumConst + " described as " +
enumConst.description);
PcapDLT enumConst = PcapDLT.valueOf("EN10MB");
System.out.println("The Payload Link Type value is " + enumConst.value);
| Enum Constant Summary | |
|---|---|
AIRONET_HEADER
The AIRONE t_ header. |
|
APPLE_IP_OVER_IEEE1394
The APPL e_ i p_ ove r_ iee e1394. |
|
ARCNET
The ARCNET. |
|
ARCNET_LINUX
The ARCNE t_ linux. |
|
ATM_CLIP
The AT m_ clip. |
|
ATM_RFC1483
The AT m_ rf c1483. |
|
AURORA
The AURORA. |
|
AX25
The A x25. |
|
BACNET_MS_TP
The BACNE t_ m s_ tp. |
|
C_HDLC
The C_ hdlc. |
|
CHAOS
The CHAOS. |
|
CISCO_IOS
The CISC o_ ios. |
|
DOCSIS
The DOCSIS. |
|
ECONET
The ECONET. |
|
EN10MB
The E n10 mb. |
|
EN3MB
The E n3 mb. |
|
ENC
The ENC. |
|
ERF_ETH
The ER f_ eth. |
|
ERF_POS
The ER f_ pos. |
|
FDDI
The FDDI. |
|
FRELAY
The FRELAY. |
|
GCOM_SERIAL
The GCO m_ serial. |
|
GCOM_T1E1
The GCO m_ t1 e1. |
|
GPF_F
The GP f_ f. |
|
GPF_T
The GP f_ t. |
|
GPRS_LLC
The GPR s_ llc. |
|
IBM_SN
The IB m_ sn. |
|
IBM_SP
The IB m_ sp. |
|
IEEE802
The IEE e802. |
|
IEEE802_11
The IEE e802_11. |
|
IEEE802_11_RADIO
The IEE e802_11_ radio. |
|
IEEE802_11_RADIO_AVS
The IEE e802_11_ radi o_ avs. |
|
IP_OVER_FC
The I p_ ove r_ fc. |
|
IPFILTER
The IPFILTER. |
|
JUNIPER_ATM1
The JUNIPE r_ at m1. |
|
JUNIPER_ATM2
The JUNIPE r_ at m2. |
|
JUNIPER_ES
The JUNIPE r_ es. |
|
JUNIPER_GGSN
The JUNIPE r_ ggsn. |
|
JUNIPER_MFR
The JUNIPE r_ mfr. |
|
JUNIPER_MLFR
The JUNIPE r_ mlfr. |
|
JUNIPER_MLPPP
The JUNIPE r_ mlppp. |
|
JUNIPER_MONITOR
The JUNIPE r_ monitor. |
|
JUNIPER_PIC_PEER
The JUNIPE r_ pi c_ peer. |
|
JUNIPER_PPPOE
The JUNIPE r_ pppoe. |
|
JUNIPER_PPPOE_ATM
The JUNIPE r_ pppo e_ atm. |
|
JUNIPER_SERVICES
The JUNIPE r_ services. |
|
LINUX_IRDA
The LINU x_ irda. |
|
LINUX_LAPD
The LINU x_ lapd. |
|
LINUX_SLL
The LINU x_ sll. |
|
LOOP
The LOOP. |
|
LTALK
The LTALK. |
|
MTP2
The MT p2. |
|
MTP2_WITH_PHDR
The MT p2_ wit h_ phdr. |
|
MTP3
The MT p3. |
|
NULL
The NULL. |
|
PCI_EXP
The PC i_ exp. |
|
PFLOG
The PFLOG. |
|
PFSYNC
The PFSYNC. |
|
PPP
The PPP. |
|
PPP_BSDOS
The PP p_ bsdos. |
|
PPP_ETHER
The PP p_ ether. |
|
PPP_PPPD
The PP p_ pppd. |
|
PPP_SERIAL
The PP p_ serial. |
|
PRISM_HEADER
The PRIS m_ header. |
|
PRONET
The PRONET. |
|
RAW
The RAW. |
|
RIO
The RIO. |
|
SCCP
The SCCP. |
|
SLIP
The SLIP. |
|
SLIP_BSDOS
The SLI p_ bsdos. |
|
SUNATM
The SUNATM. |
|
SYMANTEC_FIREWALL
The SYMANTE c_ firewall. |
|
TZSP
The TZSP. |
|
USER0
The USE r0. |
|
USER1
The USE r1. |
|
USER10
The USE r10. |
|
USER11
The USE r11. |
|
USER12
The USE r12. |
|
USER13
The USE r13. |
|
USER14
The USE r14. |
|
USER15
The USE r15. |
|
USER2
The USE r2. |
|
USER3
The USE r3. |
|
USER4
The USE r4. |
|
USER5
The USE r5. |
|
USER6
The USE r6. |
|
USER7
The USE r7. |
|
USER8
The USE r8. |
|
USER9
The USE r9. |
|
| Field Summary | |
|---|---|
static int |
CONST_AIRONET_HEADER
The Constant CONST_AIRONET_HEADER. |
static int |
CONST_APPLE_IP_OVER_IEEE1394
The Constant CONST_APPLE_IP_OVER_IEEE1394. |
static int |
CONST_ARCNET
The Constant CONST_ARCNET. |
static int |
CONST_ARCNET_LINUX
The Constant CONST_ARCNET_LINUX. |
static int |
CONST_ATM_CLIP
The Constant CONST_ATM_CLIP. |
static int |
CONST_ATM_RFC1483
The Constant CONST_ATM_RFC1483. |
static int |
CONST_AURORA
The Constant CONST_AURORA. |
static int |
CONST_AX25
The Constant CONST_AX25. |
static int |
CONST_BACNET_MS_TP
The Constant CONST_BACNET_MS_TP. |
static int |
CONST_C_HDLC
The Constant CONST_C_HDLC. |
static int |
CONST_CHAOS
The Constant CONST_CHAOS. |
static int |
CONST_CISCO_IOS
The Constant CONST_CISCO_IOS. |
static int |
CONST_DOCSIS
The Constant CONST_DOCSIS. |
static int |
CONST_ECONET
The Constant CONST_ECONET. |
static int |
CONST_EN10MB
The Constant CONST_EN10MB. |
static int |
CONST_EN3MB
The Constant CONST_EN3MB. |
static int |
CONST_ENC
The Constant CONST_ENC. |
static int |
CONST_ERF_ETH
The Constant CONST_ERF_ETH. |
static int |
CONST_ERF_POS
The Constant CONST_ERF_POS. |
static int |
CONST_FDDI
The Constant CONST_FDDI. |
static int |
CONST_FRELAY
The Constant CONST_FRELAY. |
static int |
CONST_GCOM_SERIAL
The Constant CONST_GCOM_SERIAL. |
static int |
CONST_GCOM_T1E1
The Constant CONST_GCOM_T1E1. |
static int |
CONST_GPF_F
The Constant CONST_GPF_F. |
static int |
CONST_GPF_T
The Constant CONST_GPF_T. |
static int |
CONST_GPRS_LLC
The Constant CONST_GPRS_LLC. |
static int |
CONST_IBM_SN
The Constant CONST_IBM_SN. |
static int |
CONST_IBM_SP
The Constant CONST_IBM_SP. |
static int |
CONST_IEEE802
The Constant CONST_IEEE802. |
static int |
CONST_IEEE802_11
The Constant CONST_IEEE802_11. |
static int |
CONST_IEEE802_11_RADIO
The Constant CONST_IEEE802_11_RADIO. |
static int |
CONST_IEEE802_11_RADIO_AVS
The Constant CONST_IEEE802_11_RADIO_AVS. |
static int |
CONST_IP_OVER_FC
The Constant CONST_IP_OVER_FC. |
static int |
CONST_IPFILTER
The Constant CONST_IPFILTER. |
static int |
CONST_JUNIPER_ATM1
The Constant CONST_JUNIPER_ATM1. |
static int |
CONST_JUNIPER_ATM2
The Constant CONST_JUNIPER_ATM2. |
static int |
CONST_JUNIPER_ES
The Constant CONST_JUNIPER_ES. |
static int |
CONST_JUNIPER_GGSN
The Constant CONST_JUNIPER_GGSN. |
static int |
CONST_JUNIPER_MFR
The Constant CONST_JUNIPER_MFR. |
static int |
CONST_JUNIPER_MLFR
The Constant CONST_JUNIPER_MLFR. |
static int |
CONST_JUNIPER_MLPPP
The Constant CONST_JUNIPER_MLPPP. |
static int |
CONST_JUNIPER_MONITOR
The Constant CONST_JUNIPER_MONITOR. |
static int |
CONST_JUNIPER_PIC_PEER
The Constant CONST_JUNIPER_PIC_PEER. |
static int |
CONST_JUNIPER_PPPOE
The Constant CONST_JUNIPER_PPPOE. |
static int |
CONST_JUNIPER_PPPOE_ATM
The Constant CONST_JUNIPER_PPPOE_ATM. |
static int |
CONST_JUNIPER_SERVICES
The Constant CONST_JUNIPER_SERVICES. |
static int |
CONST_LINUX_IRDA
The Constant CONST_LINUX_IRDA. |
static int |
CONST_LINUX_LAPD
The Constant CONST_LINUX_LAPD. |
static int |
CONST_LINUX_SLL
The Constant CONST_LINUX_SLL. |
static int |
CONST_LOOP
The Constant CONST_LOOP. |
static int |
CONST_LTALK
The Constant CONST_LTALK. |
static int |
CONST_MTP2
The Constant CONST_MTP2. |
static int |
CONST_MTP2_WITH_PHDR
The Constant CONST_MTP2_WITH_PHDR. |
static int |
CONST_MTP3
The Constant CONST_MTP3. |
static int |
CONST_NULL
The Constant CONST_NULL. |
static int |
CONST_PCI_EXP
The Constant CONST_PCI_EXP. |
static int |
CONST_PFLOG
The Constant CONST_PFLOG. |
static int |
CONST_PFSYNC
The Constant CONST_PFSYNC. |
static int |
CONST_PPP
The Constant CONST_PPP. |
static int |
CONST_PPP_BSDOS
The Constant CONST_PPP_BSDOS. |
static int |
CONST_PPP_ETHER
The Constant CONST_PPP_ETHER. |
static int |
CONST_PPP_PPPD
The Constant CONST_PPP_PPPD. |
static int |
CONST_PPP_SERIAL
The Constant CONST_PPP_SERIAL. |
static int |
CONST_PRISM_HEADER
The Constant CONST_PRISM_HEADER. |
static int |
CONST_PRONET
The Constant CONST_PRONET. |
static int |
CONST_RAW
The Constant CONST_RAW. |
static int |
CONST_RIO
The Constant CONST_RIO. |
static int |
CONST_SCCP
The Constant CONST_SCCP. |
static int |
CONST_SLIP
The Constant CONST_SLIP. |
static int |
CONST_SLIP_BSDOS
The Constant CONST_SLIP_BSDOS. |
static int |
CONST_SUNATM
The Constant CONST_SUNATM. |
static int |
CONST_SYMANTEC_FIREWALL
The Constant CONST_SYMANTEC_FIREWALL. |
static int |
CONST_TZSP
The Constant CONST_TZSP. |
static int |
CONST_USER0
The Constant CONST_USER0. |
static int |
CONST_USER1
The Constant CONST_USER1. |
static int |
CONST_USER10
The Constant CONST_USER10. |
static int |
CONST_USER11
The Constant CONST_USER11. |
static int |
CONST_USER12
The Constant CONST_USER12. |
static int |
CONST_USER13
The Constant CONST_USER13. |
static int |
CONST_USER14
The Constant CONST_USER14. |
static int |
CONST_USER15
The Constant CONST_USER15. |
static int |
CONST_USER2
The Constant CONST_USER2. |
static int |
CONST_USER3
The Constant CONST_USER3. |
static int |
CONST_USER4
The Constant CONST_USER4. |
static int |
CONST_USER5
The Constant CONST_USER5. |
static int |
CONST_USER6
The Constant CONST_USER6. |
static int |
CONST_USER7
The Constant CONST_USER7. |
static int |
CONST_USER8
The Constant CONST_USER8. |
static int |
CONST_USER9
The Constant CONST_USER9. |
java.lang.String |
description
Description of the dlt retrieved by quering the native pcap library. |
int |
value
Integer dlt value assigned by libpcap to this constant. |
| Method Summary | |
|---|---|
boolean |
equals(int value)
Compares the supplied value with the constant's assigned DLT value. |
java.lang.String |
getDescription()
Gets the description of the dlt retrieved by quering the native pcap library. |
int |
getValue()
Gets the integer dlt value assigned by libpcap to this constant. |
static PcapDLT |
valueOf(int value)
Converts an integer value into a PcapDLT constant. |
static PcapDLT |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static PcapDLT[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final PcapDLT NULL
public static final PcapDLT EN10MB
public static final PcapDLT EN3MB
public static final PcapDLT AX25
public static final PcapDLT PRONET
public static final PcapDLT CHAOS
public static final PcapDLT IEEE802
public static final PcapDLT ARCNET
public static final PcapDLT SLIP
public static final PcapDLT PPP
public static final PcapDLT FDDI
public static final PcapDLT ATM_RFC1483
public static final PcapDLT RAW
public static final PcapDLT SLIP_BSDOS
public static final PcapDLT PPP_BSDOS
public static final PcapDLT ATM_CLIP
public static final PcapDLT PPP_SERIAL
public static final PcapDLT PPP_ETHER
public static final PcapDLT SYMANTEC_FIREWALL
public static final PcapDLT C_HDLC
public static final PcapDLT IEEE802_11
public static final PcapDLT FRELAY
public static final PcapDLT LOOP
public static final PcapDLT ENC
public static final PcapDLT LINUX_SLL
public static final PcapDLT LTALK
public static final PcapDLT ECONET
public static final PcapDLT IPFILTER
public static final PcapDLT PFLOG
public static final PcapDLT CISCO_IOS
public static final PcapDLT PRISM_HEADER
public static final PcapDLT AIRONET_HEADER
public static final PcapDLT PFSYNC
public static final PcapDLT IP_OVER_FC
public static final PcapDLT SUNATM
public static final PcapDLT RIO
public static final PcapDLT PCI_EXP
public static final PcapDLT AURORA
public static final PcapDLT IEEE802_11_RADIO
public static final PcapDLT TZSP
public static final PcapDLT ARCNET_LINUX
public static final PcapDLT JUNIPER_MLPPP
public static final PcapDLT JUNIPER_MLFR
public static final PcapDLT JUNIPER_ES
public static final PcapDLT JUNIPER_GGSN
public static final PcapDLT JUNIPER_MFR
public static final PcapDLT JUNIPER_ATM2
public static final PcapDLT JUNIPER_SERVICES
public static final PcapDLT JUNIPER_ATM1
public static final PcapDLT APPLE_IP_OVER_IEEE1394
public static final PcapDLT MTP2_WITH_PHDR
public static final PcapDLT MTP2
public static final PcapDLT MTP3
public static final PcapDLT SCCP
public static final PcapDLT DOCSIS
public static final PcapDLT LINUX_IRDA
public static final PcapDLT IBM_SP
public static final PcapDLT IBM_SN
public static final PcapDLT USER0
public static final PcapDLT USER1
public static final PcapDLT USER2
public static final PcapDLT USER3
public static final PcapDLT USER4
public static final PcapDLT USER5
public static final PcapDLT USER6
public static final PcapDLT USER7
public static final PcapDLT USER8
public static final PcapDLT USER9
public static final PcapDLT USER10
public static final PcapDLT USER11
public static final PcapDLT USER12
public static final PcapDLT USER13
public static final PcapDLT USER14
public static final PcapDLT USER15
public static final PcapDLT IEEE802_11_RADIO_AVS
public static final PcapDLT JUNIPER_MONITOR
public static final PcapDLT BACNET_MS_TP
public static final PcapDLT PPP_PPPD
public static final PcapDLT JUNIPER_PPPOE
public static final PcapDLT JUNIPER_PPPOE_ATM
public static final PcapDLT GPRS_LLC
public static final PcapDLT GPF_T
public static final PcapDLT GPF_F
public static final PcapDLT GCOM_T1E1
public static final PcapDLT GCOM_SERIAL
public static final PcapDLT JUNIPER_PIC_PEER
public static final PcapDLT ERF_ETH
public static final PcapDLT ERF_POS
public static final PcapDLT LINUX_LAPD
| Field Detail |
|---|
public final int value
public final java.lang.String description
public static final int CONST_NULL
public static final int CONST_EN10MB
public static final int CONST_EN3MB
public static final int CONST_AX25
public static final int CONST_PRONET
public static final int CONST_CHAOS
public static final int CONST_IEEE802
public static final int CONST_ARCNET
public static final int CONST_SLIP
public static final int CONST_PPP
public static final int CONST_FDDI
public static final int CONST_ATM_RFC1483
public static final int CONST_RAW
public static final int CONST_SLIP_BSDOS
public static final int CONST_PPP_BSDOS
public static final int CONST_ATM_CLIP
public static final int CONST_PPP_SERIAL
public static final int CONST_PPP_ETHER
public static final int CONST_SYMANTEC_FIREWALL
public static final int CONST_C_HDLC
public static final int CONST_IEEE802_11
public static final int CONST_FRELAY
public static final int CONST_LOOP
public static final int CONST_ENC
public static final int CONST_LINUX_SLL
public static final int CONST_LTALK
public static final int CONST_ECONET
public static final int CONST_IPFILTER
public static final int CONST_PFLOG
public static final int CONST_CISCO_IOS
public static final int CONST_PRISM_HEADER
public static final int CONST_AIRONET_HEADER
public static final int CONST_PFSYNC
public static final int CONST_IP_OVER_FC
public static final int CONST_SUNATM
public static final int CONST_RIO
public static final int CONST_PCI_EXP
public static final int CONST_AURORA
public static final int CONST_IEEE802_11_RADIO
public static final int CONST_TZSP
public static final int CONST_ARCNET_LINUX
public static final int CONST_JUNIPER_MLPPP
public static final int CONST_APPLE_IP_OVER_IEEE1394
public static final int CONST_JUNIPER_MLFR
public static final int CONST_JUNIPER_ES
public static final int CONST_JUNIPER_GGSN
public static final int CONST_JUNIPER_MFR
public static final int CONST_JUNIPER_ATM2
public static final int CONST_JUNIPER_SERVICES
public static final int CONST_JUNIPER_ATM1
public static final int CONST_MTP2_WITH_PHDR
public static final int CONST_MTP2
public static final int CONST_MTP3
public static final int CONST_SCCP
public static final int CONST_DOCSIS
public static final int CONST_LINUX_IRDA
public static final int CONST_IBM_SP
public static final int CONST_IBM_SN
public static final int CONST_USER0
public static final int CONST_USER1
public static final int CONST_USER2
public static final int CONST_USER3
public static final int CONST_USER4
public static final int CONST_USER5
public static final int CONST_USER6
public static final int CONST_USER7
public static final int CONST_USER8
public static final int CONST_USER9
public static final int CONST_USER10
public static final int CONST_USER11
public static final int CONST_USER12
public static final int CONST_USER13
public static final int CONST_USER14
public static final int CONST_USER15
public static final int CONST_IEEE802_11_RADIO_AVS
public static final int CONST_JUNIPER_MONITOR
public static final int CONST_BACNET_MS_TP
public static final int CONST_PPP_PPPD
public static final int CONST_JUNIPER_PPPOE
public static final int CONST_JUNIPER_PPPOE_ATM
public static final int CONST_GPRS_LLC
public static final int CONST_GPF_T
public static final int CONST_GPF_F
public static final int CONST_GCOM_T1E1
public static final int CONST_GCOM_SERIAL
public static final int CONST_JUNIPER_PIC_PEER
public static final int CONST_ERF_ETH
public static final int CONST_ERF_POS
public static final int CONST_LINUX_LAPD
| Method Detail |
|---|
public static PcapDLT[] values()
for (PcapDLT c : PcapDLT.values()) System.out.println(c);
public static PcapDLT valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic boolean equals(int value)
value - the value
public static PcapDLT valueOf(int value)
value - Pcap DLT integer value to convert
public java.lang.String getDescription()
getDescription in interface DataLinkTypeDataLinkType.getDescription()public int getValue()
getValue in interface DataLinkTypeDataLinkType.getValue()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||