#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/time.h>
#include <assert.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif


#include <ccn/ccn.h>
#include <ccn/uri.h>
#include <ccn/keystore.h>
#include <ccn/signing.h>
#include <ccn/schedule.h>
#include <ccn/hashtb.h>

#include "nlsr.h"
#include "nlsr_ndn.h"
#include "utility.h"
#include "nlsr_adl.h"
#include "nlsr_lsdb.h"


struct option longopts[] =
{
    { "daemon",      no_argument,       NULL, 'd'},
    { "config_file", required_argument, NULL, 'f'},
    { "help",        no_argument,       NULL, 'h'},
    { 0 }
};

static int 
usage(char *progname)
{

    printf("Usage: %s [OPTIONS...]\n\
	NDN routing....\n\
	-d, --daemon        Run in daemon mode\n\
	-f, --config_file   Specify configuration file name\n\
	-h, --help          Display this help message\n", progname);

    exit(1);
}

void ndn_rtr_gettime(const struct ccn_gettime *self, struct ccn_timeval *result)
{
    struct timeval now = {0};
    gettimeofday(&now, 0);
    result->s = now.tv_sec;
    result->micros = now.tv_usec;
}

static struct ccn_gettime ndn_rtr_ticker = {
    "timer",
    &ndn_rtr_gettime,
    1000000,
    NULL
};

void 
process_command_router_name(char *command)
{
	if(command==NULL)
	{
		printf(" Wrong Command Format ( router-name /router/name )\n");
		return;
	}
	char *rem;
	const char *sep=" \t\n";
	char *rtr_name;

	rtr_name=strtok_r(command,sep,&rem);
	if(rtr_name==NULL)
	{
		printf(" Wrong Command Format ( router-name /router/name )\n");
		return;
	}
	nlsr->router_name=(char *)malloc(strlen(rtr_name)+1);
	memcpy(nlsr->router_name,rtr_name,strlen(rtr_name)+1);	
	printf("Router Name: %s\n",nlsr->router_name);
}

void 
process_command_ccnname(char *command)
{

	if(command==NULL)
	{
		printf(" Wrong Command Format ( ccnname /name/prefix)\n");
		return;
	}
	char *rem;
	const char *sep=" \t\n";
	char *name_prefix;
	name_prefix=strtok_r(command,sep,&rem);
	if(name_prefix==NULL)
	{
		printf(" Wrong Command Format ( ccnname /name/prefix/ )\n");
		return;
	}

	printf("Name Prefix: %s \n",name_prefix);

	struct name_prefix *np=(struct name_prefix *)malloc(sizeof(struct name_prefix *));
	np->name=(char *)malloc(strlen(name_prefix)+1);
	memcpy(np->name,name_prefix,strlen(name_prefix)+1);
	np->length=strlen(name_prefix)+1;

	add_name_prefix_to_npl(np);
	/* Debugging Purpose */
	print_name_prefix_from_npl();

	free(np->name);
	free(np);

		
}

void 
process_command_ccnneighbor(char *command)
{
	if(command==NULL)
	{
		printf(" Wrong Command Format ( ccnneighbor router_name faceX)\n");
		return;
	}
	char *rem;
	const char *sep=" \t\n";
	char *rtr_name,*face;

	rtr_name=strtok_r(command,sep,&rem);
	if(rtr_name==NULL)
	{
		printf(" Wrong Command Format ( ccnneighbor router_name faceX)\n");
		return;
	}

	face=strtok_r(NULL,sep,&rem);
	if(face==NULL)
	{
		printf(" Wrong Command Format ( ccnneighbor router_name faceX)\n");
		return;
	}

	printf("Router: %s face: %s\n",rtr_name,face);
	int face_id;
	int res;
	res=sscanf(face,"face%d",&face_id);

	if(res != 1 )
	{
		printf(" Wrong Command Format ( ccnneighbor router_name faceX) where X is integer\n");
		return;
	}

	struct ndn_neighbor *nbr=(struct ndn_neighbor *)malloc(sizeof(struct ndn_neighbor*));
	nbr->neighbor=(struct name_prefix *)malloc(sizeof(struct name_prefix *));
	nbr->neighbor->name=(char *)malloc(strlen(rtr_name)+1);
	memcpy(nbr->neighbor->name,rtr_name,strlen(rtr_name)+1);
	nbr->neighbor->length=strlen(rtr_name);
	nbr->face=face_id;
	nbr->status=0;	

	

	add_adjacent_to_adl(nbr);
	print_adjacent_from_adl();

	free(nbr->neighbor->name);
	free(nbr->neighbor);
	free(nbr);

}

void 
process_conf_command(char *command)
{
	const char *separators=" \t\n";
	char *remainder=NULL;
	char *cmd_type=NULL;

	if(command==NULL || strlen(command)==0 || command[0]=='!')
		return;	

	cmd_type=strtok_r(command,separators,&remainder);

	if(!strcmp(cmd_type,"router-name") )
	{
		process_command_router_name(remainder);
	}
	else if(!strcmp(cmd_type,"ccnneighbor") )
	{
		process_command_ccnneighbor(remainder);
	} 
	else if(!strcmp(cmd_type,"ccnname") )
	{
		process_command_ccnname(remainder);
	}
	else
	{
		printf("Wrong configuration Command %s \n",cmd_type);
	}
}

int 
readConfigFile(const char *filename)
{
	FILE *cfg;
	char buf[1024];
	int len;

	cfg=fopen(filename, "r");

	if(cfg == NULL)
	{
		printf("\nConfiguration File does not exists\n");
		exit(1);	
	}

	while(fgets((char *)buf, sizeof(buf), cfg))
	{
		len=strlen(buf);
		if(buf[len-1] == '\n')
		buf[len-1]='\0';
		process_conf_command(buf);	
	}

	fclose(cfg);

	return 0;
}

void
add_name_prefix_to_npl(struct name_prefix *np)
{

	
	printf("\nadd_name_prefix called\n");
	printf("Name Prefix: %s and length: %d \n",np->name,np->length);

	struct name_prefix *hnp=(struct name_prefix *)malloc(sizeof(struct name_prefix *));

	struct hashtb_enumerator ee;
    	struct hashtb_enumerator *e = &ee; 	
    	int res;

   	hashtb_start(nlsr->npl, e);
    	res = hashtb_seek(e, np->name, strlen(np->name), 0);
   
	hnp = e->data;
	hnp->name=(char *)malloc(np->length);
    	memcpy(hnp->name,np->name,np->length);
	hnp->length=np->length;

    	hashtb_end(e);

	printf("\n");

}

void
print_name_prefix_from_npl(void)
{
	printf("print_name_prefix_from_npl called \n");	
	int i, npl_element;
	struct name_prefix *np;

	struct hashtb_enumerator ee;
    	struct hashtb_enumerator *e = &ee;
    	
    	hashtb_start(nlsr->npl, e);
	npl_element=hashtb_n(nlsr->npl);

	for(i=0;i<npl_element;i++)
	{
		np=e->data;
		printf("Name Prefix: %s and Length: %d \n",np->name,np->length);	
		hashtb_next(e);		
	}

	hashtb_end(e);

	printf("\n");
}


void 
nlsr_destroy( void )
{

	/* Destroying every hash table attached to each neighbor in ADL before destorying ADL */	

	int i, element;
	struct ndn_neighbor *nbr;

	struct hashtb_enumerator ee;
    	struct hashtb_enumerator *e = &ee;
    	
    	hashtb_start(nlsr->adl, e);
	element=hashtb_n(nlsr->adl);

	for(i=0;i<element;i++)
	{
		nbr=e->data;
		hashtb_destroy(&nbr->lsa_update_queue);	
		hashtb_next(e);		
	}
	hashtb_end(e);

	

	hashtb_destroy(&nlsr->adl);
	hashtb_destroy(&nlsr->npl);
	ccn_schedule_destroy(&nlsr->sched);
	ccn_destroy(&nlsr->ccn);
	free(nlsr);

}

void
init_nlsr(void)
{
	struct hashtb_param param_adl = {0};
	struct hashtb_param param_npl = {0};

	struct hashtb_param param_adj_lsdb = {0};
	struct hashtb_param param_name_lsdb = {0};
	
	nlsr=(struct nlsr *)malloc(sizeof(struct nlsr));

	nlsr->adl=hashtb_create(sizeof(struct ndn_neighbor), &param_adl);
	nlsr->npl = hashtb_create(sizeof(struct name_prefix), &param_npl);
	nlsr->in_interest.p = &incoming_interest;
	nlsr->in_content.p = &incoming_content;

	nlsr->lsdb=(struct linkStateDatabase *)malloc(sizeof(struct linkStateDatabase *));
	nlsr->lsdb->version=(char *)malloc(16);
	nlsr->lsdb->version="0000000000000000";

	nlsr->lsdb->adj_lsdb = hashtb_create(sizeof(struct adj_lsa), &param_adj_lsdb);
	nlsr->lsdb->name_lsdb = hashtb_create(sizeof(struct name_lsa), &param_name_lsdb);

	nlsr->is_synch_init=1;
	nlsr->nlsa_id=0;

}

int 
main(int argc, char *argv[])
{
    	int res;
    	char *config_file;
	int daemon_mode;
	struct ccn_charbuf *router_prefix;	

	init_nlsr();
    	
	while ((res = getopt_long(argc, argv, "df:h", longopts, 0)) != -1) 
	{
        	switch (res) 
		{
			case 'd':
				daemon_mode = 1;
				break;
			case 'f':
				config_file = optarg;
				break;
			case 'h':
			default:
				usage(argv[0]);
		}
    	}

	readConfigFile(config_file);

	nlsr->ccn=ccn_create();
	if(ccn_connect(nlsr->ccn, NULL) == -1)
		{
			fprintf(stderr,"Could not connect to ccnd\n");
			exit(1);
		}	
	router_prefix=ccn_charbuf_create();	
	res=ccn_name_from_uri(router_prefix,nlsr->router_name);		
	if(res<0)
		{
			fprintf(stderr, "Bad ccn URI: %s\n",nlsr->router_name);
			exit(1);
		}

	ccn_name_append_str(router_prefix,"nlsr");
	nlsr->in_interest.data=nlsr->router_name;
	res=ccn_set_interest_filter(nlsr->ccn,router_prefix,&nlsr->in_interest);
	if ( res < 0 )
		{
			fprintf(stderr,"Failed to register interest for router\n");
			exit(1);
		}

	nlsr->sched = ccn_schedule_create(nlsr, &ndn_rtr_ticker);

	nlsr->event_send_lsdb_interest = ccn_schedule_event(nlsr->sched, 1000000, &send_lsdb_interest, NULL, 0);

	while(1)
	{
		ccn_schedule_run(nlsr->sched);
        	res = ccn_run(nlsr->ccn, 500);

	}
	
	nlsr_destroy();

	return 0;
}

