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

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

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

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

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

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/ch/ch5.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

 

 
Hands-On Networking: Chapter 5 Home > Student > Chapter Notes > Chapter 5

Chapter 5

5.1 5.2 5.3
Alert! A problem has emerged with the experiments in this chapter! Many thanks to Professor Cozart of Mercer University for bringing it to my attention.

It is a UNIX problem only (so far)! If you are using a 64-bit computer with an up to date compiler, echoserver will always terminate. I have let Professor Comer know about this, but for the time being here is a quick fix.

In the directory h there is a file named cnaipi.h. On line 26 of this file there is a line that says typedef long computer. Just change long to int, and and the echo and chat software will work fine. You might want to change long to int on line 43 of cname_to_comp.c in the api directory to avoid some warnings. Many thanks to Dr. Cozart!

As is quite appropriate, the first programming experiments in the book call for modifications to programs available from Purdue University. The directions for obtaining the software are found under Obtaining Software For The API. Your instructor may obtain the programs and make them available to you.

Experiment 5.1 requires you to compile and test an echo client. It is possible that the procedure will not be completely transparent to some students (it takes a few minutes thought to see how things are organized), but detailed directions are to be found on the page for this experiment. The Optional Extensions are interesting and are not difficult. I would encourage you to perform further experiments such as the one described on the page. "Odd" behavior is interesting, and you can learn a lot by persuing explanations.

Experiment 5.2 requires adding some features. This requires familiarity with the basic string handling functions in C. The first Optional Extension is of great interest. The comment that "Sending the remote user's name with each line of text wastes network bandwidth" is of special interest. Why worry about 6 bytes? It is the principle! Watch out for the second Optional Extension. It is, in my opinion, extremely difficult. See the page for this experiment for details. As best as I can tell at the moment (I plan to come back to this one once I am further along), changing the terminal settings require modification to the library code provided. Nasty, but challenging.

Experiment 5.3 introduces the student to file transfer. This idea will appear again in Experiment 6.3, and then again in Expriments 8.3 and 8.4.



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.