 between the temporary port at the client site and the temporary port at the server site. This helps to free the well-known port SO that the server can make a connection with another client. Connection Oriented (TCP) Server Program * /* Include Header files */ #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <netinet/in.h> #include <stdio.h> #include <string.h> void main (void) int responseListenID; int responseAcceptID; socklen t clientAddrLen; struct sockaddress serverAddr; struct sockaddress clientAddr; /* Create Socket * / responseListenID = socket (AF_INET, SOCK (STREAM, memset (&serverAddr, 0, sizeof (serverAddr) ) i /* define port (selectedPort) to use for listening * / serverAddr.sin_family = AF INET; serverAddr.sin port = htons (selectedPort) ; serverAddr.sin addr.s addr = htonl (INADDR ANY) ; /* Bind the socket */ bind (responseListenID, &serverAddr, sizeof (serverAddr)) /* Listen for connect request from client */ listen (responseListenID, 1) ; clientAddrLen = sizeof (clientAddr) ; /* define infinite "for" loop to accept connections from client * / for (i i) /* accept response from client */ Fundamentals of EMS, NMS and OSS/BSS responseAcceptID = accept (responseListenID,&clientAddr, &clientAddrLen) ; /* fork to handle multiple client request as separate process*/ pid = fork ( ) ; if (pid>0) /* this is the parent process of fork operation * / close (responseAcceptID) ; continue; /* this is the child process and needs to handle the specific client* / close (responseListenID) ; /*Implement read and write, for communication with client * / close (responseAcceptID, ; /* if -else - end here */ /* for loop end here */ Connection Oriented (TCP) Client Program * /* Include Header files */ #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <netinet/in.h> #include <stdio.h> #include <string. h> /* Define size of buffer */ #define DATABUF 512 void main (void) int commSocket; struct sockaddress hostAddr; Socket Communication char buf [DATABUF] ; struct hostent *hpt