Network Programming

Course Plan

Course Title: Network Programming (4 Hrs Lecture: 2 Hrs Tutorial :0 Hrs Lab)

Course Code: MCI1C02

Total Contact Hours: 4 / week

Duration of Semester End Exam (SEE): 3 Hours and Max. Marks: 100 (50%)

Continuous Internal Evaluation (CIE), 3 Tests ( Best 2 out of 3 Internal Tests)

Max. Marks: 50 (50%)

Course Outcome:

Course objectives: This course will enable students to

• Define Network Programming.

• Demonstrate programming with TCP and SCTP.

• Explain key management and routing sockets.

• Evaluate advanced Socket Programming APIs.

Syllabus for Unix Network Programming

Chap 1

Module -1: Introduction to network application, client/server communication, OSI Model, BSD Networking history, Test Networks and Hosts, Unix Standards, 64-bit architectures, Transport Layer: TCP

SLE: Transport Layer: UDP and SCTP. (chap 2) 08 Hours

Chap (3,4,5)

Module - 2: Sockets Introduction - socket address structures, value-result arguments, byte ordering and manipulation functions, address conversion functions, Elementary TCP Sockets - socket, connect, bind, listen, accept , fork and concurrent server design, getcsockname and getpeername functions and TCP Client/Server Example- client/server programming through TCP sockets, Normal start-up, termination, POSIX signal handling, Signal handling in server,

SLE: Crashing, rebooting of server host, shutdown (5.14,5.15,5.16) 08 Hours

Chap (6,7, 9, 10)

Module - 3: I/O Multiplexing and Socket Options, Elementary SCTP Sockets- Interface Models, sctp_xx functions, shutdown function, Notifications, SCTP Client/Server Examples - One-to-Many, Head-of-Line Blocking, Controlling number of streams and Termination,

SLE: IPv4 and IPv6 Interoperability-different interoperability scenarios. (Chap 12) 08 Hours

Chap (13, 14, 15)

Module - 4: Daemon Processes, syslogd, daemonizing functions and the inetd super server, Advanced I/O functions- readv, writev, sendmsg and recvmsg, Ancillary data, Advanced polling, Unix domain protocols- socket address structure, functions and communication scenarios,

SLE: Nonblocking I/O - connect and accept examples. (Chap 16) 08 Hours

Chap (17, 18, 19)

Module - 5: IOCTL operations- socket, file, interface configuration information, ARP cache and routing table operations, Routing sockets- data link socket address structure, reading and writing, sysctl operations, interface name and index functions, Key Management functions - reading, writing, SADB, SA, Dynamically Maintaining SA’s,

SLE: Out-of-Band data (chap 24) 08 Hours

(Chap 26.4, 26.7, 26.8)

Module – 6: Threads- basic thread functions, TCP echo server using threads, Mutexes and Conditional variables.

SLE: Web Client and Simultaneous Connections 08 Hours

Text Books:

1. W. Richard Stevens, Bill Fenner, Andrew M. Rudoff: “UNIX Network Programming”. Volume 1, Third Edition, Pearson 2004.

Reference Books:

1. Barry Nance: “Network Programming in C”, PHI 2002 3. Bob Quinn, Dave Shute: “Windows Socket Network Programming”, Pearson 2003.

Richard Stevens: “UNIX Network Programming”. Volume 2, Second Edition.