|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--SSF.OS.NetFlow.Filter.FilterPlayer
|
+--SSF.OS.NetFlow.Util.NHIDemuxer
Given one flow data file, divide it into several files according to the nhi address prefixes of the hosts that dump the flow data. In this version, it just takes into account the fist 3 levels of nhi ID
| Field Summary | |
int |
level
|
protected int |
numFileOpened
|
protected int |
openFileMAX
|
java.lang.String |
srcFileName
|
| Fields inherited from class SSF.OS.NetFlow.Filter.FilterPlayer |
filter, sourceDictionary, streamID, typeDictionary |
| Constructor Summary | |
NHIDemuxer(java.lang.String streamID)
|
|
NHIDemuxer(java.lang.String streamID,
int nLevel)
|
|
| Method Summary | |
protected void |
addSource(java.lang.String spec)
The method that will be called when a record of "source nhi" announcement is met in the inputStream. |
protected void |
addType(java.lang.String spec)
The method that will be called when a record of "type" announcement is met in the inputStream. |
void |
disconnect()
Signal that no more records are to be received (if reading) or sent (if writing). |
static void |
errorUsage()
|
static java.lang.String |
getNhiPrefix(java.lang.String nhi,
int level)
Given the nhi address, return its first *level* prefix. |
static void |
main(java.lang.String[] args)
usage: java FilterPlayer <filter config> <flow data file> <stream name> |
int |
receive(int type_code,
int source_code,
double timestamp,
byte[] buf,
int offset,
int length)
operations after a record of netflow stream is met if the record is NOT a netflow record, this function should be overloaded. |
| Methods inherited from class SSF.OS.NetFlow.Filter.FilterPlayer |
assignFilter, connectRead, connectWrite, getRecordSourceCode, getRecordSourceString, getRecordTypeCode, getRecordTypeString, isConnected, send, send |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int level
public java.lang.String srcFileName
protected int openFileMAX
protected int numFileOpened
| Constructor Detail |
public NHIDemuxer(java.lang.String streamID)
public NHIDemuxer(java.lang.String streamID,
int nLevel)
| Method Detail |
protected void addType(java.lang.String spec)
throws streamException
FilterPlayer
addType in class FilterPlayerspec - the string generated from the record.
streamException
protected void addSource(java.lang.String spec)
throws streamException
FilterPlayer
addSource in class FilterPlayerspec - the string generated from the record.
streamException
public int receive(int type_code,
int source_code,
double timestamp,
byte[] buf,
int offset,
int length)
FilterPlayer
receive in interface StreamInterfacereceive in class FilterPlayer
public static java.lang.String getNhiPrefix(java.lang.String nhi,
int level)
public void disconnect()
StreamInterface
disconnect in interface StreamInterfacedisconnect in class FilterPlayerpublic static void main(java.lang.String[] args)
FilterPlayer
public static void errorUsage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||