|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.NetFlow.NetFlow
|
+--SSF.OS.NetFlow.IpNetFlow
| Field Summary | |
int |
dOctets
size of data in the flow This is not completely the same as in cisco |
int |
dPkts
number of packets in the flow |
byte |
dst_mask
destination IP suffix mask |
int |
dstAddr
Destinatio IP (prefix) address |
float |
First
start time |
short |
input
index of the input NIC |
float |
Last
the last time a packet of this flow arrives |
int |
nextHop
IP of the next Hop. |
java.lang.String |
nhi
NHI address of the collector, not including the interface ID |
short |
output
index of the output NIC |
byte |
protocol
IP protocol type |
byte |
src_mask
source IP suffix mask |
int |
srcAddr
Source IP (prefix) address |
byte |
tcp_flags
cumulative OR of TCP flags |
| Fields inherited from class SSF.OS.NetFlow.NetFlow |
next |
| Constructor Summary | |
IpNetFlow()
default constructor |
|
IpNetFlow(IpHeader ipPacket,
short inID,
short outID,
float curTime,
java.lang.String nhiAddr,
byte srcMask,
byte dstMask)
construct a new flow from an ip packet |
|
| Method Summary | |
boolean |
acceptPacket(ProtocolMessage packet)
Check whether the given packet belongs to this flow. |
void |
dumpBinaryOut(java.io.DataOutputStream outStream)
Dump the flow to a stream. |
byte[] |
dumpToBytes()
Generate a byte array from this record. |
java.lang.Long |
makeKey()
Construct a key for this flow based on srcAddr and dstAddr key is (srcAddr << 32)+dstAddr This is used in for IpNetFlow. |
static java.lang.Long |
makeKey(IpHeader ipPacket)
make the key needed for IpNetFlow from an ip Packet. |
void |
readBinaryIn(java.io.DataInputStream inStream)
Read data from a binary stream for a given flow. |
void |
readFromBytes(byte[] bytes,
int len)
extract the record information from a byte array |
int |
recordSize()
The "next" field is NOT included when count the size of the record. |
java.lang.String |
toString()
dump to String |
void |
update(ProtocolMessage packet,
float curTime)
update the flow for the given packet |
| Methods inherited from class SSF.OS.NetFlow.NetFlow |
removeFlow |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int nextHop
public java.lang.String nhi
public int srcAddr
public int dstAddr
public short input
public short output
public int dPkts
public int dOctets
public float First
public float Last
public byte tcp_flags
public byte protocol
public byte src_mask
public byte dst_mask
| Constructor Detail |
public IpNetFlow()
public IpNetFlow(IpHeader ipPacket,
short inID,
short outID,
float curTime,
java.lang.String nhiAddr,
byte srcMask,
byte dstMask)
ipPacket - the packet receivedinID - the ID of the input NICoutID - the ID of the output NICcurTime - currentTimenhiAddr - the NHI address of the IpFlowCollectorsrcMask - dstMask - | Method Detail |
public byte[] dumpToBytes()
dumpToBytes in class NetFlow
public void readFromBytes(byte[] bytes,
int len)
readFromBytes in class NetFlowbytes - the byte array that stores the datalen - the length of the data stored in the array (Not the length of the array)public boolean acceptPacket(ProtocolMessage packet)
acceptPacket in class NetFlowpacket - the packet to be checked.public int recordSize()
recordSize in class NetFlow
public void update(ProtocolMessage packet,
float curTime)
update in class NetFlowpacket - given packetcurTime - the current timepublic static java.lang.Long makeKey(IpHeader ipPacket)
public java.lang.Long makeKey()
makeKey in class NetFlowpublic java.lang.String toString()
toString in class java.lang.Objectpublic void dumpBinaryOut(java.io.DataOutputStream outStream)
dumpBinaryOut in class NetFlowoutStream - the outputStream into which the data is dumped.public void readBinaryIn(java.io.DataInputStream inStream)
readBinaryIn in class NetFlow
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||