C PROGRAMMING. 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 #include #include #include #include #include #include #include #include #include /* 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 */ TASK: you are to write a TCP/IP server that can build up a graph of a network of networks (using the supplied graph library (graph.h) and implementation of Dijkstra’s (Dijkstra.h) 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
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
*/
TASK:
you are to write a TCP/IP server that can build up a graph of a network of
networks (using the supplied graph library (graph.h) and implementation of Dijkstra’s (Dijkstra.h)
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).
Step by step
Solved in 2 steps