Introduction to Network Programming
Course #: CSCS10010
- 2022-09-22: The lab course will be physically lectured for this semester. Please join us at EC315/EC316. For those who cannot attend it physically, the online course link for the lab lecture (lab explanation only) is available here.
- 2022-09-21: The entry page for labs can be visited from here.
- 2022-09-18: Our next class will be lectured in the PC classroom (EC-315 and 316). However, we are unsure if the PC classroom can deploy our VM images on time. So please bring your laptop to the classroom if possible. If you plan to play with the VM image we prepared for the PC classroom, you can downoad it from here.
- 2022-09-18: Please follow the updated docker setup instructions below for those who work with Apple chips (M1/M2).
- When running the ./configure command, you may also need to append an additional argument ``--build=arm-linux`` to ensure it does not complain.
- 2022-09-14: We just release the tentative course/lab schedule for this semester. Please have a look at here. The video link for this course is availabe here. Only campus IP is allowed for accessing the video.
- 2022-09-12: The course will be physically lectured for this semester. Please join us at EC015 this Thursday morning. For those who cannot attend it physically this Thu, the online course link for the first lectue is available here.
- 2022-09-12: We plan to implement a flipped classroom this semester. That is, you should watch the pre-recorded videos before the class and then take your questions to the classroom for discussion. In addition, we will design 1-3 labs for you to implement in the class. For more explanations about how the classes proceed, please attend our first lecture on Sept 15.
- 2022-09-02: Course web site refreshed.
Homework Submission Procedure
- Pack all your files into a single tar.gz archive file.
- Upload your homework via the E3 system.
- Slides: syllabus, intro, transport, socket, tcpsocket, tcp-example, multiplex, sockopt, udp, addrconv, daemon, advio, unix, nonblock, broadcast, rawsocket
- Container files for sample: (20220918 updated)
- Ubuntu: Dockerfile and docker-compose.yml
- Replace 'chuang' with the username you like, and choose your preferred UID and GID.
- Use `passwd' command in your docker to setup your password.
- (as root) Create your home directory in /home/<username> if it does not exist.
- Note for Apple Chip Users: You have to enable "Use Docker Compose V2" in your Docker Desktop options, and use the alternative Dockerfile file here.
- Sample codes download: from textbook authors.
- If you are new to Linux, you may try to install Ubuntu (Mint, or Manjaro) Linux and read its manual from the ubuntu-manual website.
- If you would like to try various UNIX OSes, you may have a look at the DistroWatch website.
- Quick References: SystemV Commands Pocket Guide, Common Unix Commands, Summary of common Unix Commands, GDB reference card (7.2).
- OS pre-defined compiler macros.
- Lectures: Thursday 10:10--12:00.
- Office Hours: by appointment @ EC417
- Classroom: EC015 / EC315, 316, 324 (PC classroom).
- Textbook: W. Richard Stevens, "UNIX Network Programming, Vol. 1," 3rd ed., Addison Wesley (開發圖書)
- TA group
echo 'dGFAem9vbGFiLm9yZwo=' | base64 -d
(you know how to decode it if you have participated the class on the 1st day)
- TA group
- Course Topics:
- Computer Network Applications
- Introduction to Network Programming
- Transportation Layer: TCP and UDP
- Socket Introduction
- Elementary TCP Sockets
- TCP Client/Server Example
- I/O Multiplexing
- Socket Options
- UDP Sockets
- Name and Address Conversions
- Advanced I/O Functions
- Nonblocking I/O
- ioctl() Operations
- Raw Sockets
- Other Topics
- Grading policy: Lab (50%), Homework (40%), Class participation (10%)
- Lab/Homework submission policy:
- Lab (105% if you solve the lab in the class; 90% if you solve the lab in one week; 70% if you solve the lab in two weeks).
- For students infected by COVID:
- 95% if you solve the lab in one week.
- If you cannot perform an in-class demo before the demo deadline, please upload your homework before the demo deadline to the E3 system, and we will allow you to postpone your demo to our available in-class lab demo time. The code used for demo will be downloaded from the E3 system
- Homework (100% before deadline; TBD for late submission)
- Homework judgment policy: We do not welcome copycats. You are encourages to discuss with your classmates, but all your submissions must be your own work.
- Course/Lab schedule (last update: 20220914)
Week Date Topic 1 09/15 intro <lecture only, no lab> 2 09/22 transport layer 3 09/29 socket 4 10/06 TCP socket 5 10/13 TCP examples 6 10/20 I/O multiplexing 7 10/27 socket options <hw1 announced> 8 11/03 address conversion (pt 1-2) <no lab, no midterm, no class> 9 11/10 address conversion (pt 3-4) 10 11/17 hw1 due <in-class homework demo> 11 11/24 udp 12 12/01 unix domain socket 13 12/08 non-blocking 14 12/15 broadcast <hw2 announced> 15 12/22 raw socket 16 12/29 <no lab, no final, no class> 17 01/05 hw2 due <in-class homework demo>