Network Programming, Spring 2005

    TEXT BOOK:  W. Richard Stevens,

     UNIX Network Programming, Vol.1, Second Edition, Prentice Hall, 1998.

   

    INSTRUCTOR: Prof. Ying-Dar Lin
        Email: ydlin@cis.nctu.edu.tw
        URL: http://www.cis.nctu.edu.tw/~ydlin

TAs
Name
Email
Office
Office extension
Task assignment
林義能
ynlin@cis.nctu.edu.tw
電資大樓701
56667 ext: 12
1st & 2nd mini-program reports
蔡孟甫
mftsai@cis.nctu.edu.tw
電資大樓701
56667 ext: 15
midterm
李志祥
lizx@cis.nctu.edu.tw
電資大樓701
56667 ext: 11
3rd mini-program report & term project
曹樂淇
lctsao@cis.nctu.edu.tw
電資大樓701
56667 ext: 11
final term, web announcements, grading



bullet Syllabus: HTML | DOC | PDF
bullet
Course Slides
1. Introduction 
2. Transport Layer: TCP and UDP 
3. Sockets Introduction 
4. Elementary TCP Sockets 
5. TCP Client-Server Example 
6. I/O Multiplexing: select and poll 
7. Socket Options 
8. Elementary UDP Sockets 
9. Elementary Name and Address Conversions 
10. IPv4 and IPv6 Interoperability 
11. Advanced Name and Address Conversions 
12. Daemon Processes and inetd Superserver 
13. Advanced I/O Functions 
14. Unix Domain Protocols - when client and server are on the same host 
15. Nonblocking I/O 
16. ioctl Function 
23. Threads 
24. IP Options 
25. Raw Sockets 
26. Datalink Access 
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.
Programming language: C or C++
DUE DATE: 4/14/2005 (Thu.) 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.
Note: Please print your future homework assignments double-sidedly, and bind them on the upper-left of the page.
bullet
Midterm

Solution

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/19 (thursday) in the class
Turn-in report and grading criteria: Same as homework #1

bullet
Homework #3

Problem statement:
Modify the programs in Figures 23.2 and 23.3, which support threaded client and
server, to handle more boundary conditions or do something more meaningful.
DUE: 6/9 (Thursday) in the class
Turn-in report and grading criteria: Same as homework #1
Note : 6/9 日 星期四 下午 1:30 ~ 1:40 工四 117 交作業, 遲交請拿到電資大樓 701

bullet
Final quiz
Coverage: chapter 9 to chapter 27 (except chapters 18, 19, 20, 21)
Open book
Time: 6/16 (Thursday) 1:30-3:20PM

bullet
Term project

Problem statement: Open! Anything on socket programming.
Suggestions:
(1) Extend what you have accumulated from homework #1, #2, and #3 to more sophisticated programs.
(2) Tools running over raw socket and/or datalink access interfaces (such as libpcap and libipq).
DUE: the week of 6/20 ~ 24 in 電資大樓701 (turn-in report and DEMO to TA)

Demo時間1: 6/23 下午1:30 - 5:00

Demo時間2: 6/28 上午9:00 - 12:00
Demo地點:資科系計中
Demo時要繳交報告
當日無法前來DEMO的請事先mail找助教約時間Demo
延後DEMO成績打八折
請大家盡早來Demo,不要都擠在最後一兩個小時才來Demo

Demo時間3: 6/28 下午8:00 - 9:00
Demo地點:電資大樓701

bullet
Old exams:

Midterm, Spring 1999
Quiz, Spring 2003
Midterm, Spring 2003
Midterm, Spring 2004

bullet
Sample Assignments
聊天室之用戶端與伺服端程式
bullet
Sample Reports
Report 1 Report 2
bullet
Sample Exams
1999 Midterms
bullet
Scores List (Spring, 2005)
Scores List
學期成績已公佈,對成績有疑問者請在 7/6 前 mail 給老師 ydlin@cis.nctu.edu.tw以及助教 lctsao@cis.nctu.edu.tw