/* gcc -Wall -g -o test test.c loader.o -lsocket -lnsl */

#include "loader.h"

int main()
{
	struct RoutingTable *rTable;
	int x, y;
	char *temp;

	rTable = LoadRoutingTable();

	struct in_addr in;

	for(x = 0; x < NUM_ROUTERS; x++)
	{
		in.s_addr = rTable[x].ip;
		temp = inet_ntoa(in);
		printf("%c %s %s\n", rTable[x].letter, rTable[x].domain, temp);
		for(y = 0; y < NUM_ROUTERS-1; y++)
			printf("    %c %c %d\n", rTable[x].route[y].destination, rTable[x].route[y].nextRouter, rTable[x].route[y].mtu);
		printf("\n");
	}

	return 1;
}

