CS430 Project 5: Using Red-Black Trees

Due Thursday, May 9, at 9:00 (start of the final exam)

For this assignment, create a tree of incoming traffic destinations using the built-in red-black tree functions. There is a demo (rbtree_kbd.c in the class examples area of using these trees, which was the focus of a class in November. Project 5 should be able to output a list of IP addresses which were the source of some traffic to the computer, along with the number of packets received from that address.

A little background about IPv4: Currently, the IP version 4 protocol is used for most traffic on computer networks. It sits in a protocol stack, above a lower-level protocol like 802.11 (wifi) or 802.3 (wired ethernet) that handles traffic within a local network, and below a higher-level protocol (usually TCP or UDP) which handles error correction, packet ordering, and other higher-level functions. Any IP packet will contain an address where the packet is going (destination address) and address where the packet came from (source address). We can learn a lot about a computer user by looking at the packets which come into their computer! So in this assignment, we'll track the source addresses of incoming packets, and make a tree to see which addresses most frequently are used to send packets to the computer. For example, my office computer would likely show a lot of incoming packets from spotify, since I use their music service.
Unlike the keyboard example, you will have to monitor the network interface. There is a demo of this in the class examples area as well (netmon.c. You'll have to store addresses or add to counts in the tree in the hook function, and make a read function to retrieve the results using the /proc filesystem.

Turning in the assignment

Turn in your project in the usual manner.