If you are having trouble downloading the file you can copy it from here: UNP 3rd Edition Source Code
Run tar tar -tvzf unpv13e.tar.gz to see the table of contents and the directory it will
create when unarchieved. Run tar again tar -xzf unpv13e.tar.gz to unarchive the source code.
And save the archieve in the new dirctory mv unpv13e.tar.gz unpv13e, then read the README file.
If you're lucky all you have to do is the following:
Run the configure utility to conform to your version of Unix:
./configure
Compile Stevens' library code:
cd ./unpv13e/lib make
Next, complie Stevens' Demo Client and Server
cd ../tcpcliserv make
To test it locally, run the server
./tcpserv01 &Then run the client
./tcpcli01 127.0.0.1Remember, there is no prompt, but the client is waiting and if you type "hello," it will respond with hello.
hello hello
Once the sample code is complied and working, modify Stevens'
echo server/client code (str_echo.c and str_cli.c) with additional
messages indicating which lines are being sent from which agent.
Have agents print each line out to stdout for debugging.
Also, do not use Stevens' port 6000 for the server, instead use the last four digits of your student ID as the port number. That way each server will be unique and can run on multiple machines
Re-compile the source directory:
cd ./unpv13e/lib make cd ../tcpcliserv makeOr re-compile the file directly with:
gcc -o tcpcli writen.c readline.c strcli.c tcpcli.c
gcc -o tcpserv writen.c readline.c strecho.c tcpserv.c
Program output per line -
you type: Helllloooooooo!
client shows on local tty and sends: Client sending - Helllloooooooo!
server shows on local tty and replies: Server sending - Helllloooooooo!
client catches the response and shows: Client from Server - Helllloooooooo!
(Be sure to include similar agent labels as above.)
Finally, please clean up your server processes. Please do not leave them laying around for someone else to kill. They will fill the process table and prevent others from completing the assignment. Thank you.
Once the program is working properly, use the script program (type "man script" to see how to use it) to show your source changes, the compiler output, and the execution of the server & client. Print out the script file and hand it in to me on Tues, Sept. 10th.
Possible problems with using Ubuntu: a) Gcc does not work dowmload gcc with the command sudo apt-get install gcc password: (type in the password located on the whiteboard) Bunch of status lines... Hitor Y b) Error messages about not finding stdio.h or crt1.o dowmload the C include files with the command sudo apt-get install build-essential password: (type in the password located on the whiteboard) Bunch of status lines... Hit or Y