Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac13.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac13.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac13.php on line 3

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac13.php on line 4

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac13.php on line 5

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac13.php on line 8

 

 


Douglas E. Comer


Computer Science Department
Purdue University
West Lafayette, IN 47907

webmaster: W. David Laverell


Companion Topics

Home

Book Information

Purpose of Site

Getting Started

Students

Faculty

"What's New"

"Coming Attractions"

"C Pointers"

Acknowledgements

 

 
HON: Faculty Notes to Chapter 13 Home > Faculty > Chapter Notes > Chapter 13

Chapter 13

This chapter is in some sense a continuation of Chapter 12. Experiment 13.1 deals with the tricky task of reassembling IP fragments. There is a great deal to be learned from the the second Optional Extension, but there is a major problem involved in obtaining the data needed to test solutions. It is absolutely essential for the students to wrestle with RFC 815. Simply put, the simplistic idea that I have had for years as to how fragmented datagrams are reassembled turns out to be simplistic. You have to deal with the possibility that datagrams have been fragmented in different ways. For example, imagine a 90 byte datagram that has been fragmented. I had always assumed that the worst you would have to deal with would be a standard length, say 30, and fragments arriving as [60,89], [0,29], and [30,59]. Wrong! You have to deal with the possibility of [30,59], [22,31], etc. You cannot make assumptions about the fragments as they arrive.

So RFC815 turns out to be extremely interesting. If you do not teach the algorithms course, you might mention it to the person who does. It contains an elegant and practical example.

The problem is simply where to find such totally "messed up" fragments. I am sure that they occur somewhere in the world, but I am equally sure that they are not going to cooperate by coming through my computer just when I am sniffing packets. I chose to implement the algorithm by randomly writing chunks of a file to a second file. This represents a worst case scenario because you cannot make any assumptions about the resulting "fragments". Fascinating exercise! You will find two programs under the solutions to Experiment 13.1 called scramble.c and unscramble.c. See Experiment 13.1 for a warning about trying this with very large files.



This site is maintained by W. David Laverell of the Computer Science Department at Calvin College. For assistance or corrections, please contact him at lave@calvin.edu.