you are to write a TCP/IP server that can build up a graph of a network of networks (using the supplied graph library and implementation of Dijkstra’s algorithm) and then query that graph to find out which link between two networks should be used as the next hop to send a packet of data from one network to another within the network of networks (using the supplied implementation of Dijkstra’s algorithm).
C
you are to write a TCP/IP server that can build up a graph of a network of
networks (using the supplied graph library and implementation of Dijkstra’s
query that graph to find out which link between two networks should be used as the next hop to
send a packet of data from one network to another within the network of networks (using the
supplied implementation of Dijkstra’s algorithm).
using the following program as a start point:
/*
* NetworkServer.c
* ProgrammingPortfolio Skeleton
*
*/
/* You will need to include these header files to be able to implement the TCP/IP functions */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/socket.h>
/* You will also need to add #include for your graph library header files */
int main(int argc, const char * argv[])
{
int serverSocket = -1;
printf("Programming Portfolio 2022 Implementation\n");
printf("=========================================\n\n");
/* Insert your code here to create, and the TCP/IP socket for the Network Server
*
* Then once a connection has been accepted implement protocol described in the coursework description.
*/
return 0;
}
Step by step
Solved in 3 steps with 1 images