I attached a file that has two parts of details . 1st part from the instructor and the 2nd part from me to explain the project more. also i attended the pcap files with different port scans to test the code..
To open pcap files you need to install Wireshark program.
For more details contact me by chat ..