1 of 7

DSE- 4

UNIX NETWORK PROGRAMMING

2 of 7

COURSE OBJECTIVE

  • This course introduces the concepts of Internet protocols, ports used during communication, Client/Server concepts and various transport protocols used in computer network applications and services.
  • The objective is to equip the students with technical knowledge of it comprises of the study of the sockets used with TCP and UDP include IPV4 & IPV6.

3 of 7

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

4 of 7

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.

5 of 7

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

6 of 7

REFERENCES

1. Stevens, R. W., Fenner, B., & Rudoff, A. M. (2010). Unix Network Programming: The Sockets Networking API. 3rd edition. PHI.

7 of 7

LEARNING OUTCOMES

  • Describe and analyze the various Internet Transport layer protocols used in TCP/IP AND

UDP.

  • Comprehend the concepts and structures of both TCP based connection-oriented and UDP

based connection-less client server applications.

  • Write various real-life client-server applications using socket programming.
  • Modify, maintain and extend the present internet client-server applications and write any new

type of internet applications to suit the current needs of Internet users.