DSE- 4
UNIX NETWORK PROGRAMMING
COURSE OBJECTIVE�
DETAILED SYLLABUS�
Unit 1- Introduction: Basics of Client Server applications, Example of day time client server, concurrent servers, protocols, sockets, port numbers.
Unit 2- Connection-oriented and Connection-less client server Applications: Elementary TCP
sockets – Socket, connect, bind, listen, accept, fork and exec function, close function, Socket
Address Structures, Byte Ordering and Manipulation Functions, TCP Client and Server for Echo,
Signal Handling in case of crashing and rebooting of server, Shutdown process function
Unit 3- Socket Options: Getsockopt and stockpot functions, Socket states, Generic socket option
Unit 4- Connection-oriented and connection-less Sockets: TCP-oriented basic concurrent client server applications, UDP oriented Echo client and server application, Handling of errors like lost datagram, Lack of flow control with UDP, determining outgoing interface with UDP.
Unit 5- Elementary name and Address conversions: Domain Name System, socket functions like gethostbyname, gethostbyname2, gethostbyaddr function, uname function, gethostname function, getservbyname and getservbyport functions.
Unit 6- Advanced Sockets: Daemon Processes, Multithreaded server, Raw sockets.
1. Implement TCP Echo client and TCP Echo server (Iterative).
2. Implement TCP Echo client and TCP Echo server (Concurrent).
3. Implement TCP daytime client and TCP daytime server (Iterative).
4. Implement TCP daytime client and TCP daytime server (concurrent).
5. Implement UDP Echo Client and UDP Echo Server.
6. Implement UDP daytime Client and UDP daytime server.
7. Implement TCP client and server (concurrent) where client gets input from the user and sends it to server. Server displays it on the screen. Server then gets another input from the user and sends it to client. Client displays it on the screen. The process continues till server or client sends “bye” to the other party.
8. Implement TCP client and server (concurrent) where client requests server to transfer a file. Assume file is smaller than 1K size. If the file is present on the server, it is sent to the client otherwise an error message is sent to client. Client copies the file on the hard disk and disconnects.
Practical
REFERENCES�
1. Stevens, R. W., Fenner, B., & Rudoff, A. M. (2010). Unix Network Programming: The Sockets Networking API. 3rd edition. PHI.
LEARNING OUTCOMES
UDP.
based connection-less client server applications.
type of internet applications to suit the current needs of Internet users.