#include "sim.h"
#include <stdlib.h>
#include <stdio.h>


int main(int argc, char *argv[]) {
int noden=0;
int sr = 0;
int nlist[3] = {1,2,3};
int *a=NULL, num=0, i=0;




	noden = atoi(argv[1]);
	sr = atoi(argv[2]);			/*send = 0, rec = 1*/

	num = readNeighbours(&a, noden, "topology.dat");

	for (i=0; i<num; i++) printf(">%d\n", a[i]);

	if (sr == 0)
		sndPacketNode(a, num, "Hola", 4);
	else {
		printf("%s\n", recPacketNode(noden));
	}





	return 1;



	for(i=0; i< num; i++) {
		printf("[%d] %d\n",i , a[i]);
	}

	return 0;


	if (argc == 1) {
		printf("%s node_number\n", argv[0]);
		return 1;
	}
	noden = atoi(argv[1]);
	sr = atoi(argv[2]);


	if (sr)	printf("%s\n", recPacketNode(noden));
	else sndPacketNode(nlist, 3, "Hola");


return 0;
}
