Next: 5 Interface Description
Up: 4 SAM Detailed Design
Previous: 4.2 Data Decomposition
  Contents
Subsections
In order to minimise the flow of data between Python code and Python modules
written in C, low level packet capturing and saving of this data will be
performed by a C module. This is the ``NetLogger'' module.
This module has been further decomposed into 5 modules, each of which performs
a specific task related to the logging. They are described here.
- Description:
- Contains all the functions which are called from
Python.
- Responsibilities:
- This module is responsible for
- Calling the lower-level modules to provide a simple interface for
Python.
- Initialising output files and the network interface.
- Beginning logging.
- Ending logging.
- Adding fields to be logged.
- Setting the interval at which logging will occur.
- Determining whether logging is currently occurring.
- Determining how many packets have been logged.
- SRS References:
- 3.2.1.9a, 3.2.1.9b, 3.2.1.9c, 3.2.1.9d, 3.2.1.9e
- Description:
- Accesses the network device to capture packets, and
extract data from them.
- Responsibilities:
- This module is responsible for
- Initialising the network device ready to capture packets.
- Capturing packets and passing them on to the two output modules.
- Determining whether logging is occurring.
- Determining how many packets have been logged.
- SRS References:
- 3.2.1.9b
- Description:
- Writes data to an output file in NETLOG format.
- Responsibilities:
- This module is responsible for
- Opening an output file ready for writing.
- Setting the fields which will be written.
- Writing a header containing the file format, including the
fields which the file contains.
- Writing data for a packet, based on the fields already set.
- Writing data at the required interval.
- Closing the output file.
- SRS References:
- 3.2.1.9a, 3.2.1.9c, 3.2.1.9d
- Description:
- Writes data to an output file in STREAMSLOG format.
- Responsibilities:
- This module is responsible for
- Opening an output file ready for writing.
- Writing a header containing the file format.
- Writing data for new streams.
- Returning the data for a stream, given a packet.
- Closing the output file.
- SRS References:
- 3.2.1.9c
- Description:
- Keeps a record of streams which have been seen.
- Responsibilities:
- This module is responsible for
- Initialising internal data structures.
- Recording streams which are seen.
- Allowing access to recorded streams and their data.
- Merging data about a packet into the record for its stream.
- Preparing information about a stream ready to be printed.
- Freeing memory from internal data structures.
- SRS References:
- 3.2.1.9a, 3.2.1.9d
Next: 5 Interface Description
Up: 4 SAM Detailed Design
Previous: 4.2 Data Decomposition
  Contents