|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.voytechs.jnetstream.codec.FlowKey
public class FlowKey
A flow key a set of values that either match a packet or not to a flow. So typically ip.src, ip.dst, ip.proto, tcp.sport and tcp.dport are values stored in a FlowKey. A packet when its decoded has its own flow key. Packet's flow key is used to identify flows already seen before and matching packets aganst those flows. Flows can be bi-directional meaning that certain key paramters are reversed try to match if a packet belongs to a particular flow in the opposite direction the packet was send from.
| Field Summary | |
|---|---|
static int |
DIM_COUNT
|
static int |
ENTRY_COUNT
|
static int |
KEY_COUNT
|
static java.lang.String |
MODULE
|
static int |
PAIR_SIZE
|
| Constructor Summary | |
|---|---|
FlowKey()
|
|
| Method Summary | |
|---|---|
void |
clear()
Clear all entries within the key. |
boolean |
clearEntry(int index)
Clears all entries from the specified key |
boolean |
equals(java.lang.Object o)
Compare the 2 flowkey and return true if they contain exactly matching values, otherwise false. |
int |
hashCode()
Calculate a hashcode for this key |
boolean |
isInAPair(int index,
int entry)
Tells if a specific entry has been paired up with any other entry. |
void |
reversePairs(boolean flowState)
If false the flow key is represented in its original form and sequence. |
void |
setEntry(int key,
int entry,
java.lang.Object value)
Sets flow key entry value. |
void |
setEntry(int keyIndex,
int entry,
java.lang.Object value,
java.lang.Object alias)
Sets flow key entry value. |
void |
setPair(int index,
long p1,
long p2)
|
java.lang.String |
toString()
Format this key to a printable form. |
java.lang.String |
toStringEntireKey()
Format this key to a printable form. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MODULE
public static int KEY_COUNT
public static int ENTRY_COUNT
public static int DIM_COUNT
public static int PAIR_SIZE
| Constructor Detail |
|---|
public FlowKey()
-
| Method Detail |
|---|
public void setPair(int index,
long p1,
long p2)
public boolean clearEntry(int index)
index - Key index to clear.
public void clear()
public void setEntry(int key,
int entry,
java.lang.Object value)
key - Index of the keyentry - Index of the entry within the keyvalue - Entry value
public void setEntry(int keyIndex,
int entry,
java.lang.Object value,
java.lang.Object alias)
key - Index of the keyentry - Index of the entry within the keyvalue - Entry valuealias - Entry value alias. If alias is used when reporting values
for this particular key, the alias will be used instead. Value will
still be used for matching and comparisson and never the alias.public void reversePairs(boolean flowState)
flowState - false leaves/sets the key values to their
original order and sequence. true set the key values to
reverse order according to the way that flowpairs were defined.
public boolean isInAPair(int index,
int entry)
index - key index.entry - entry index.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - Object to compare to. Should be of FlowKey type otherwise
false is returned immediately.
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringEntireKey()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||