Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Overview

rclange edited this page Feb 27, 2012 · 2 revisions

Class Descriptions

Collector - collects NetFlow V5 Packets

Instance Variables

  • listener - the socket that waits for NetFlow packets
  • buffer - contains NetFlow data collected from the listener socket
  • database - contains a reference to a storage medium (could be SQL, could be Python)
  • pktLogBin - the raw packet log

Methods

  • collectNetFlowPackets() - main control method to check for data and collect that data
  • cleanup() - closes sockets
  • getData() - checks if data is available; if it is, copies the data into the buffer and writes it to file
  • parseNetFlowPackets() - extracts NetFlow header and record data from the socket buffer
  • parseNetFlowHeader(pktData) - extracts NetFlow header data
  • dumpHeader(pktData) - print out all extracted header information
  • dumpRecord(pktData) - print out all extracted record information
  • parseNetFlowRecord(pktData) - extracts NetFlow record data
  • storeRecord(key, record) - stores the extracted NetFlow record data with the given key
  • storeHeader(key, header) - stores the extracted NetFlow header data with the given key

Database - stores, partially processes, and provides access to captured NetFlow data

Instance Variables

  • data - the "database" data structure
  • numHdrs - the internal counter of how many NetFlow headers have been seen

Methods

  • insert(table, key, data) - inserts the data yielded by the key into the given table
  • get(table, key) - returns the data in the given table indexed by key