|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<JProtocol>
org.jnetpcap.protocol.JProtocol
public enum JProtocol
Enum table of core protocols supported by the scanner.
| Nested Class Summary | |
|---|---|
static interface |
JProtocol.Suite
A protocol suite. |
| Enum Constant Summary | |
|---|---|
ETHERNET
DIX Ethernet2 header |
|
HTML
Hyper Text Markup Language header |
|
HTTP
Hyper Text Transmission Protocol header |
|
ICMP
Internet Control Message Protocol header |
|
IEEE_802DOT1Q
IEEE VLAN tag header |
|
IEEE_802DOT2
IEEE LLC2 header |
|
IEEE_802DOT3
IEEE 802.3 header type |
|
IEEE_SNAP
IEEE SNAP header |
|
IP4
Ip version 4 header |
|
IP6
Ip version 6 header |
|
L2TP
Layer 2 tunneling protocol header |
|
PAYLOAD
Builtin header type that encapsulates the portion of the packet buffer not matched by any protocol header |
|
PPP
Point to Point Protocol header |
|
TCP
TCP/IP header |
|
UDP
UDP/IP header |
|
| Field Summary | |
|---|---|
static int |
ETHERNET_ID
|
static int |
HTML_ID
|
static int |
HTTP_ID
|
static int |
ICMP_ID
|
static int |
IEEE_802DOT1Q_ID
|
static int |
IEEE_802DOT2_ID
|
static int |
IEEE_802DOT3_ID
|
static int |
IEEE_SNAP_ID
|
static int |
IP4_ID
|
static int |
IP6_ID
|
static int |
L2TP_ID
|
static int |
PAYLOAD_ID
|
static int |
PPP_ID
|
static int |
TCP_ID
|
static int |
UDP_ID
|
| Method Summary | |
|---|---|
PcapDLT[] |
getDlt()
Gets the corresponding Pcap defined Data Link Type. |
java.lang.Class<? extends JHeader> |
getHeaderClass()
|
java.lang.String |
getHeaderClassName()
|
int |
getId()
Gets a unique runtime numerica ID of this protocol assigned by jNetStream. |
static boolean |
isCoreProtocol(java.lang.Class<? extends JHeader> c)
Checks the supplied header by class if its is one of jNetPcap's core protocol set |
static boolean |
isCoreProtocol(int id)
Checks the supplied ID if its is one of jNetPcap's core protocol set |
static JProtocol |
valueOf(java.lang.Class<? extends JHeader> c)
Converts a protocol header to a JPRotocol constant |
static JProtocol |
valueOf(int id)
Converts a protocol header to a JPRotocol constant |
static JProtocol |
valueOf(Pcap pcap)
Gets the numerical ID of the data link header for the open pcap handle. |
static JProtocol |
valueOf(PcapDLT dlt)
Gets the numerical ID of the data link header for supplied pcap dlt constant. |
static JProtocol |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static JProtocol[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final JProtocol PAYLOAD
public static final JProtocol ETHERNET
public static final JProtocol IP4
public static final JProtocol IP6
public static final JProtocol TCP
public static final JProtocol UDP
public static final JProtocol IEEE_802DOT3
public static final JProtocol IEEE_802DOT2
public static final JProtocol IEEE_SNAP
public static final JProtocol IEEE_802DOT1Q
public static final JProtocol L2TP
public static final JProtocol PPP
public static final JProtocol ICMP
public static final JProtocol HTTP
public static final JProtocol HTML
| Field Detail |
|---|
public static final int PAYLOAD_ID
public static final int ETHERNET_ID
public static final int IP4_ID
public static final int IP6_ID
public static final int TCP_ID
public static final int UDP_ID
public static final int IEEE_802DOT3_ID
public static final int IEEE_802DOT2_ID
public static final int IEEE_SNAP_ID
public static final int IEEE_802DOT1Q_ID
public static final int L2TP_ID
public static final int PPP_ID
public static final int ICMP_ID
public static final int HTTP_ID
public static final int HTML_ID
| Method Detail |
|---|
public static final JProtocol[] values()
for(JProtocol c : JProtocol.values())
System.out.println(c);
public static JProtocol 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 namepublic java.lang.Class<? extends JHeader> getHeaderClass()
public java.lang.String getHeaderClassName()
public static boolean isCoreProtocol(int id)
id - numerical ID of the header as assigned by JRegistry
public static boolean isCoreProtocol(java.lang.Class<? extends JHeader> c)
c - class name of the header to check
public static JProtocol valueOf(java.lang.Class<? extends JHeader> c)
c - header class to convert
public static JProtocol valueOf(int id)
id - numerical ID of the header assigned by JRegistry
public static JProtocol valueOf(Pcap pcap)
pcap - open Pcap handle
public static JProtocol valueOf(PcapDLT dlt)
dlt - pcap dlt constant
public PcapDLT[] getDlt()
public int getId()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||