Programming
Project 2(Out on Monday
Feb 23, Due
on Friday, Apr 24 at midnight. Absolute
deadline!) |
|
Programming
Project 1 (Out on
Friday, Jan 16. Due
on Monday Feb 23 at 2:00am. Absolute
deadline!) |
- Grading
criteria
- Project 1
specification
- The binaries of my
implementation of project 1:
- We provide you with 4
examples, following the line of
presentation in W. Richard Stevens' Unix network programming book. All
these link to tar files. To untar, type
tar
-xvf filename.tar . Then, cd
into the untared directory and type make
to compile the programs.
Read the README
files in each directory, and also the
comments inside
the source codes to see what's going on. Note that, the first example
has a hard-coded IP address, which was meant for you to read and
replace the IP
with your own machine's IP. To check your machine's IP, use ifconfig
as
I've shown in class. In later examples, you can type the server's IP
address and port numbers as client's arguments.
- Some specific useful
links for your project:
- You then can check out
some more advanced documents
(these are not absolutely needed for project 1, read them if you have
time)
|
Useful
Man Pages |
- Headers: socket.h,
netdb.h,
- Functions: accept,
bind,
connect,
getpeername,
getsockname,
listen,
recvfrom,
send,
sendto,
setsockopt,
socket,
gethostname,
gethostbyname,
gethostbyaddr,
getaddrinfo,
freeaddrinfo,
inet_pton,
inet_ntop
- Memory and string
manipulation:
|
On
Coding Style |
|