Function

int main (int argc, char * * argv)

Arguments

argc
The number of arguments given
argv
The argument vector containing the arguments

Preconditions

None

Postconditions

Logging occurred for the given interval and duration

SRS Refs

3.2.1.6a, 3.2.1.6d

Author

caedwa

Date

30/09/02

Pseudocode

Set values from arguments If options not correctly specified, print message and exit Open output file as given as argument Open input file /proc/net/fcm_queue Call findfields to search for fields in input file Close input file Write header to output file Attach dump_fields as handler for SIGALRM Set timer to create SIGALRM Wait until duration is over Close output file Return success

Function

void dump_fields (int signal_value)

Arguments

signal_value
The signal value of the signal which caused this function to be called

Preconditions

The input and output files have been initialised

Postconditions

A line of output data has been produced and written

SRS Refs

3.2.1.6b

Author

caedwa

Date

30/09/02

Function

void print_usage (char * progname)

Arguments

progname
The program name, as found in argv[0] of main

Preconditions

None

Postconditions

None

SRS Refs

3.2.1.6

Author

caedwa

Date

30/09/02