US Software Capstone Design Project

GNAT - Graphical Network Analysis Tool

Code Inspection Report #3

 

 

Design Team:

Matt Ericson

John Kobinski

Matt Petro

Rob Waltz

 

 

Client:

Rich Ames, US Software

 

 

 

 

v1.0

April 29, 1998

Last revision: 4/29/98

TABLE OF CONTENTS

EXECUTIVE SUMMARY *

CODE INSPECTION SUMMARY REPORTS *

SOURCE CODE LISTING *

DESCRIPTION OF REVIEWED CODE *

PREPARATION AND REVIEW TIME *

KEY FINDINGS *

REVIEW OF THE REVIEW *

 

 

EXECUTIVE SUMMARY

 

This document summarizes the results of the GNAT design team’s third formal code review. The participants in the review were the design team and Rich Ames. The code which was reviewed was written by John Kobinski. The code primarily consisted of procedures for parsing a Snoop 2 file into the data structures used by the rest of GNAT. For more information, consult the GNAT Design Document and Specifications Document.

 

Contained in this report are Code Inspection Summary Report Forms from all four team members, a listing of all reviewed source code, a description of the code’s functionality and a summary of the review’s findings.

 

CODE INSPECTION SUMMARY REPORTS

 

See Appendix A

 

SOURCE CODE LISTING

 

See Appendix B

 

DESCRIPTION OF REVIEWED CODE

 

Classes reviewed:

Snoop

 

Snoop is the parsing routine for getting data from the Snoop 2 file. One packet is read into memory at a time. The data is then parsed in memory, rather than from the disk. Once the current packet is parsed, the next packet is read into memory. Data is retrieved from the Snoop header, the Ethernet header, and the IP header. Once the protocol is determined, the file is parsed for UDP or TCP data.

 

The tcpChecksum routine creates a 12 byte pseudo header, and appends it to the TCP packet. This data is added together via ones complement addition, 16 bits at a time.

 

PREPARATION AND REVIEW TIME

 

Team member preparation time:

Matt Ericson 40 min.

John Kobinski 45 min.

Matt Petro 40 min.

Rob Waltz author

 

Total time for review: 60 min.

 

KEY FINDINGS

 

  1. Rich recommended that we put all literals in one place and refer to them using descriptive names, similar to using #define statements in C.
  2. Lines 50-51: Catch EOF Exception instead of checking to see if file.read returns –1.
  3. Lines 93-95: Don’t raise IHL error every time it is encountered.
  4. Line 133: TCP checksum is a 16 bit value, read a short, not a byte.
  5. Line 135: Don’t skip values from TCP header, just get all of them
  6. Line 142-146: Don’t need to parse anymore after TCP header.
  7. Line 185-194: Delete main after testing is done.

 

REVIEW OF THE REVIEW

 

We felt that the review was fairly effective, as were the first two. It was helpful for us to review John Kobinski’s code, as the rest of us could get an update on exactly how his code was implemented. This gave us a good understanding of how his parsing routines worked.

 

Second, the review was useful because our sponsor, Rich Ames, was able to gain an understanding of how we were implementing our design. Although Rich was familiar with our OMT diagrams and overall design, it was useful for him to see actual code which parsed through a Snoop file. He was happy with the code, although he would like the code to be able to parse UDP datagrams as well. This ability was included in the GNAT specifications and will be added before the program is delivered to Rich.

 

Appendix A

 

Appendix B