SSF.OS.NetFlow.Util
Class NetMap

java.lang.Object
  |
  +--SSF.Util.Streams.BasicPlayer
        |
        +--SSF.OS.NetFlow.Util.NetMap
All Implemented Interfaces:
StreamInterface

public class NetMap
extends BasicPlayer

Read in the records generated by MapMonitor, construct a "map". When queried with an NIC NHI or an IP, return the corresponding IP / NHI, and the IP of the peers connected with this NIC.
ip --> nhi
nhi --> ip and ip of peers


Field Summary
protected  java.util.Hashtable mapTable
           
protected  int typeCode
           
 
Constructor Summary
NetMap(java.lang.String streamID)
           
 
Method Summary
static void errorUsage()
           
 int getFirstPeerIP(java.lang.String nhi)
           
 byte[] getRawData(java.lang.String nhi)
           
static void main(java.lang.String[] args)
           
 java.lang.String query(int ip)
           
 int query(java.lang.String nhi)
           
 int receive(int tid, int sid, double time, byte[] buf, int offset, int length)
          Default handler for generic record data.
 
Methods inherited from class SSF.Util.Streams.BasicPlayer
connectRead, connectWrite, disconnect, getRecordCount, 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

typeCode

protected int typeCode

mapTable

protected java.util.Hashtable mapTable
Constructor Detail

NetMap

public NetMap(java.lang.String streamID)
Method Detail

receive

public int receive(int tid,
                   int sid,
                   double time,
                   byte[] buf,
                   int offset,
                   int length)
Description copied from class: BasicPlayer
Default handler for generic record data.

Specified by:
receive in interface StreamInterface
Overrides:
receive in class BasicPlayer

query

public java.lang.String query(int ip)

query

public int query(java.lang.String nhi)

getRawData

public byte[] getRawData(java.lang.String nhi)

getFirstPeerIP

public int getFirstPeerIP(java.lang.String nhi)

main

public static void main(java.lang.String[] args)

errorUsage

public static void errorUsage()