Network Programming, Spring 2006

    TEXT BOOK:  W. Richard Stevens,

     UNIX Network Programming, Vol.1, Third Edition, Prentice Hall, 2004.


    INSTRUCTOR: Prof. Ying-Dar Lin

Office extension
56667 ext: 12


Important Announcment:

=> 2006 / 06 / 29 : Final Score announce!!
=> 2006 / 06 / 28 : TA will send the final score at Thur. and announce the final at 12:00. If you have any question, you'd have to mail to me quickly.
=> 2006 / 06 / 26 : Scores, and notification
=> 2006 / 06 / 15 : Final Project Demo notification , time schedule
=> 2006 / 06 / 12 : Final Project announcement updated.
=> 2006 / 06 / 08 : The class on Thur is defered to 13:30



Syllabus: HTML | DOC | PDF


Suggested Term Projects (slides in PDF format)
1. Chatroom
2. Proxy server
3. Multithreaded web server

Course Slides
1. Introduction 11. Advanced Name and Address Conversions
2. Transport Layer: TCP and UDP 12. Daemon Processes and inetd Superserve
3. Sockets Introduction 13. Advanced I/O Functions
4. Elementary TCP Sockets 14. Unix Domain Protocols - when client and server are on the same host
5. TCP Client-Server Example 15. Nonblocking I/O
6. I/O Multiplexing: select and poll 16. ioctl Function
7. Socket Options 23. Threads
8. Elementary UDP Sockets 24. IP Options
9. Elementary Name and Address Conversions 25. Raw Sockets
10. IPv4 and IPv6 Interoperabilit 26. Datalink Access


bullet Homework #0

Problem statement:
Compile, run, and observe the client and server programs of chapter 1. Use the tools (e.g. netstat, tcpdump, ethereal, gprof, gdb, etc.) to observe(debug) how your program runs
DUE DATE:3/30(Thur) in th class

Turn-in report:
1. One page summary about (1)your programming enviroment, (2)how you compile, run and observe your program, (3)what you have observed(debug) with the tools you use.
2. Program listing

You have to state what tools you use, methodology and result in the following 5 items:
3.Debug(gdb & ddd)
4.Check connections(netstate)


bullet Homework #1

Problem statement:
Modify the echo client in Figure 5.4 and 5.5 and the echo server in Figure 5.11
and 5.12, so that your program can either (1) handle more boundary conditions described
in Chapter 5 or (2) has more meaningful functions than the simple echo service.(You can work towards your term project.)
Programming language: Unlimited. As long as with socket system calls.
DUE DATE: 4/20(Thur) in the class
Turn-in report:
1. Purpose
2. Method
3. Implementation Description
4. Program Listing
5. Screen Dumping: the process of the compilation and result of the program
(2~3 pages for parts 1~3)
Grading criteria:
1. Efforts related to "socket programming"
2. Preciseness in the report writing

Detailed comments on HW1 (2005)


bullet Homework #2

Problem statement:
Similar to homework #1, modify the example programs in Figures 8.3, 8.4, 8.7,
and 8.17 to support client-server communication over UDP. You may extend your
programs in homework #1 to support both TCP and UDP sockets. To support both,
refer to the program in Figure 8.25.
DUE: 5/18
Turn-in report and grading criteria: Same as homework #1


bullet Homework #3

Problem statement:
Modify the programs in Figures 26.2 and 26.3, which support threaded client and
server, to handle more boundary conditions or do something more meaningful.
DUE: 6/8
Turn-in report and grading criteria: Same as homework #1


bullet Final Quiz: 6/15(Thur) 13:30 ~ 15:30

Term Project Demo and Report Turn-In: 6/21-22 in 701 EECS (電資大樓701)

1.there is no page limit on final project report
2.If possible, for source code, please burn it on cd and turn it into the report



Miderm, Soring 2006
Solution to Midterm, Spring 2006


bullet Old exams:
Midterm, Spring 1999
Quiz, Spring 2003
Midterm, Spring 2003
Quiz, Spring 2003
Midterm, Spring 2004
Quiz, Spring 2005
Midterm, Spring 2005

bullet FAQ of Ch10~27
Sample Assignments
Sample Reports
Report 1 Report 2
Scores List (Spring,2006)
Scores List

Course page of 2005