diff --git a/nlsr.c b/nlsr.c
index bcf897c..0040473 100644
--- a/nlsr.c
+++ b/nlsr.c
@@ -175,6 +175,82 @@
 }
 
 void 
+process_command_lsdb_synch_interval(char *command)
+{
+	if(command==NULL)
+	{
+		printf(" Wrong Command Format ( lsdb-synch-interval secs )\n");
+		return;
+	}
+	char *rem;
+	const char *sep=" \t\n";
+	char *secs;
+	long int seconds;
+	
+	secs=strtok_r(command,sep,&rem);
+	if(secs==NULL)
+	{
+		printf(" Wrong Command Format ( lsdb-synch-interval secs)\n");
+		return;
+	}
+
+	seconds=atoi(secs);
+	nlsr->lsdb_synch_interval=seconds;
+
+}
+
+
+void 
+process_command_interest_retry(char *command)
+{
+	if(command==NULL)
+	{
+		printf(" Wrong Command Format ( interest-retry number )\n");
+		return;
+	}
+	char *rem;
+	const char *sep=" \t\n";
+	char *secs;
+	long int seconds;
+	
+	secs=strtok_r(command,sep,&rem);
+	if(secs==NULL)
+	{
+		printf(" Wrong Command Format ( interest-retry number)\n");
+		return;
+	}
+
+	seconds=atoi(secs);
+	nlsr->interest_retry=seconds;
+
+}
+
+void 
+process_command_interest_resend_time(char *command)
+{
+	if(command==NULL)
+	{
+		printf(" Wrong Command Format ( interest-resend-time secs )\n");
+		return;
+	}
+	char *rem;
+	const char *sep=" \t\n";
+	char *secs;
+	long int seconds;
+	
+	secs=strtok_r(command,sep,&rem);
+	if(secs==NULL)
+	{
+		printf(" Wrong Command Format ( interest-resend-time secs)\n");
+		return;
+	}
+
+	seconds=atoi(secs);
+	nlsr->interest_resend_time=seconds;
+
+}
+
+void 
 process_conf_command(char *command)
 {
 	const char *separators=" \t\n";
@@ -198,6 +274,18 @@
 	{
 		process_command_ccnname(remainder);
 	}
+	else if(!strcmp(cmd_type,"lsdb-synch-interval") )
+	{
+		process_command_lsdb_synch_interval(remainder);
+	}
+	else if(!strcmp(cmd_type,"interest-retry") )
+	{
+		process_command_interest_retry(remainder);
+	}
+	else if(!strcmp(cmd_type,"interest-resend-time") )
+	{
+		process_command_interest_resend_time(remainder);
+	}
 	else
 	{
 		printf("Wrong configuration Command %s \n",cmd_type);
@@ -368,6 +456,13 @@
 
 	nlsr->is_synch_init=1;
 	nlsr->nlsa_id=0;
+	nlsr->adj_build_flag=0;
+	nlsr->adj_build_count=0;	
+
+	nlsr->lsdb_synch_interval = LSDB_SYNCH_INTERVAL;
+	nlsr->interest_retry = INTEREST_RETRY;
+	nlsr->interest_resend_time = INTEREST_RESEND_TIME;
+	
 
 }
 
@@ -424,8 +519,9 @@
 
 	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);
-	nlsr->event_send_lsdb_interest = ccn_schedule_event(nlsr->sched, 500000, &initial_build_name_lsa, NULL, 0);
+	nlsr->event_build_name_lsa = ccn_schedule_event(nlsr->sched, 500000, &initial_build_name_lsa, NULL, 0);
+	nlsr->event_send_info_interest = ccn_schedule_event(nlsr->sched, 1000000, &send_info_interest, NULL, 0);
+	
 
 	while(1)
 	{
diff --git a/nlsr.conf b/nlsr.conf
new file mode 100644
index 0000000..dbbaf9c
--- /dev/null
+++ b/nlsr.conf
@@ -0,0 +1,11 @@
+router-name /ndn/memphis.edu/netlab/macbook
+ccnneighbor /ndn/memphis.edu/netlab/maia face2 10
+ccnneighbor /ndn/memphis.edu/netlab/castor face3 8
+ccnneighbor /ndn/memphis.edu/netlab/pollux face4 15
+ccnname /ndn/memphis.edu/netlab/macbook/name1
+ccnname /ndn/memphis.edu/netlab/macbook/test
+lsdb-synch-interval 300
+interest-retry 2
+interest-resend-time 15
+
+
diff --git a/nlsr.h b/nlsr.h
index d6779b8..0cd71e8 100644
--- a/nlsr.h
+++ b/nlsr.h
@@ -3,6 +3,9 @@
 
 #define LSA_ADJ_TYPE 1
 #define LSA_NAME_TYPE 2
+#define LSDB_SYNCH_INTERVAL 300
+#define INTEREST_RETRY 3
+#define INTEREST_RESEND_TIME 15
 
 struct name_prefix
 {
@@ -16,6 +19,7 @@
 	int face;
 	int status;
 	long int last_lsdb_version;
+	int info_interest_timed_out;
 	struct hashtb *lsa_update_queue;
 };
 
@@ -34,6 +38,9 @@
 	struct ccn_schedule *sched;
     	struct ccn_scheduled_event *event;
 	struct ccn_scheduled_event *event_send_lsdb_interest;
+	struct ccn_scheduled_event *event_send_info_interest;
+	struct ccn_scheduled_event *event_build_name_lsa;
+	struct ccn_scheduled_event *event_build_adj_lsa;
 
 	struct hashtb *adl;
 	struct hashtb *npl;
@@ -45,6 +52,13 @@
 
 	int is_synch_init;
 	long int nlsa_id;
+	int adj_build_flag;
+	long int adj_build_count;
+
+	long int lsdb_synch_interval;
+	int interest_retry;
+	long int interest_resend_time;
+	
 };
 
 struct nlsr *nlsr;
@@ -55,6 +69,9 @@
 void process_command_router_name(char *command);
 void process_command_ccnname(char *command);
 void process_command_ccnneighbor(char *command);
+void process_command_lsdb_synch_interval(char *command);
+void process_command_interest_retry(char *command);
+void process_command_interest_resend_time(char *command);
 void process_conf_command(char *command);
 int readConfigFile(const char *filename);
 
diff --git a/nlsr_adl.c b/nlsr_adl.c
index f4237fb..767d7bd 100644
--- a/nlsr_adl.c
+++ b/nlsr_adl.c
@@ -47,6 +47,7 @@
 		hnbr->face=nbr->face;
 		hnbr->status=nbr->status;
 		hnbr->last_lsdb_version=0;
+		hnbr->info_interest_timed_out=0;
 
 		struct hashtb_param param_luq = {0};
 		hnbr->lsa_update_queue=hashtb_create(200, &param_luq);
@@ -75,7 +76,7 @@
 	for(i=0;i<adl_element;i++)
 	{
 		nbr=e->data;
-		printf("Neighbor: %s Length: %d Face: %d Status: %d LSDB Version: %ld \n",ccn_charbuf_as_string(nbr->neighbor),(int)nbr->neighbor->length,nbr->face, nbr->status, nbr->last_lsdb_version);	
+		printf("Neighbor: %s Length: %d Face: %d Status: %d LSDB Version: %ld Interest Timed Out: %d\n",ccn_charbuf_as_string(nbr->neighbor),(int)nbr->neighbor->length,nbr->face, nbr->status, nbr->last_lsdb_version,nbr->info_interest_timed_out);	
 		hashtb_next(e);		
 	}
 
@@ -140,3 +141,72 @@
 	
 	hashtb_end(e);
 }
+
+void 
+update_adjacent_timed_out_to_adl(struct ccn_charbuf *nbr, int increment)
+{
+	printf("update_adjacent_timed_out_to_adl called \n");
+
+	int res;
+	struct ndn_neighbor *nnbr;
+
+	struct hashtb_enumerator ee;
+    	struct hashtb_enumerator *e = &ee;
+
+	hashtb_start(nlsr->adl, e);
+	res = hashtb_seek(e, nbr->buf, nbr->length, 0);
+
+	if( res == HT_OLD_ENTRY )
+	{
+		nnbr=e->data;
+		nnbr->info_interest_timed_out += increment;
+	}
+	else if(res == HT_NEW_ENTRY)
+	{
+		hashtb_delete(e);
+	}
+	
+	hashtb_end(e);
+}
+
+void 
+update_adjacent_timed_out_zero_to_adl(struct ccn_charbuf *nbr)
+{
+
+	printf("update_adjacent_timed_out_zero_to_adl called \n");
+	int time_out_number=get_timed_out_number(nbr);
+	update_adjacent_timed_out_to_adl(nbr,-time_out_number);
+
+}
+
+
+int 
+get_timed_out_number(struct ccn_charbuf *nbr)
+{
+
+	printf("get_timed_out_number called \n");
+
+	int res,ret=-1;
+	struct ndn_neighbor *nnbr;
+
+	struct hashtb_enumerator ee;
+    	struct hashtb_enumerator *e = &ee;
+
+	hashtb_start(nlsr->adl, e);
+	res = hashtb_seek(e, nbr->buf, nbr->length, 0);
+
+	if( res == HT_OLD_ENTRY )
+	{
+		nnbr=e->data;
+		ret=nnbr->info_interest_timed_out;
+	}
+	else if(res == HT_NEW_ENTRY)
+	{
+		hashtb_delete(e);
+	}
+	
+	hashtb_end(e);
+
+	return ret;
+	
+}
diff --git a/nlsr_adl.h b/nlsr_adl.h
index cd25524..dc2e899 100644
--- a/nlsr_adl.h
+++ b/nlsr_adl.h
@@ -6,4 +6,8 @@
 void update_adjacent_status_to_adl(struct ccn_charbuf *nbr, int status);
 void update_adjacent_lsdb_version_to_adl(struct ccn_charbuf *nbr, long int version);
 
+int get_timed_out_number(struct ccn_charbuf *nbr);
+void update_adjacent_timed_out_to_adl(struct ccn_charbuf *nbr, int increment);
+void update_adjacent_timed_out_zero_to_adl(struct ccn_charbuf *nbr);
+
 #endif
diff --git a/nlsr_lsdb.c b/nlsr_lsdb.c
index 26b130a..d9d66c2 100644
--- a/nlsr_lsdb.c
+++ b/nlsr_lsdb.c
@@ -29,16 +29,17 @@
 
 	struct ccn_charbuf *c=ccn_charbuf_create();
 	ccn_charbuf_reset(c);
-	ccn_charbuf_putf(c, "%d", (unsigned)ls_type);
+	ccn_charbuf_putf(c, "%d", ls_type);
 	ccn_charbuf_append_string(key,ccn_charbuf_as_string(c));
 	
 	ccn_charbuf_reset(c);
-	ccn_charbuf_putf(c, "%d", (unsigned)nlsa_id);
+	ccn_charbuf_putf(c, "%ld", nlsa_id);
 	ccn_charbuf_append_string(key,ccn_charbuf_as_string(c));
 	
 	ccn_charbuf_reset(c);
-	ccn_charbuf_putf(c, "%ld", (unsigned)orig_time);
+	ccn_charbuf_putf(c, "%ld", orig_time);
 	ccn_charbuf_append_string(key,ccn_charbuf_as_string(c));
+	//ccn_charbuf_append_string(key,orig_time);	
 
 	ccn_charbuf_destroy(&c);
 
@@ -104,7 +105,9 @@
 	name_lsa->header->orig_router=ccn_charbuf_create();
 	
 	name_lsa->header->ls_type=LS_TYPE_NAME;
-	name_lsa->header->orig_time=get_current_time_sec();
+	name_lsa->header->orig_time=get_current_time_microsec();
+	//name_lsa->header->orig_time=(char *)malloc(strlen(get_current_time_microsec())+1);
+	//memcpy(name_lsa->header->orig_time,get_current_time_microsec(),strlen(get_current_time_microsec())+1);
 	name_lsa->header->ls_id=++nlsr->nlsa_id;
 	ccn_charbuf_append_string(name_lsa->header->orig_router,nlsr->router_name);	
 	name_lsa->header->isValid=1;
@@ -166,7 +169,7 @@
 	printf("	LS Type			 :	%d\n",name_lsa->header->ls_type);
 	printf("	LS Id			 :	%ld\n",name_lsa->header->ls_id);
 	printf("	Origination Time	 :	%ld\n",name_lsa->header->orig_time);
-	printf("	Is Valid 		 :	%u\n",name_lsa->header->isValid);
+	printf("	Is Valid 		 :	%d\n",name_lsa->header->isValid);
 
 	printf("	LSA Data			\n");
 	printf("		Name Prefix:	 	:	%s\n",ccn_charbuf_as_string(name_lsa->name_prefix));
@@ -199,3 +202,15 @@
 	hashtb_end(e);
 
 }
+
+
+int 
+install_adj_lsa(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)
+{
+	printf("install_adj_lsa called \n");
+
+	ev = ccn_schedule_event(nlsr->sched, 1000000, &install_adj_lsa, NULL, 0);
+
+	return 0;
+	
+}
diff --git a/nlsr_lsdb.h b/nlsr_lsdb.h
index a5316f0..23a670e 100644
--- a/nlsr_lsdb.h
+++ b/nlsr_lsdb.h
@@ -51,4 +51,7 @@
 void print_name_lsdb(void);
 void print_name_lsa(struct nlsa *name_lsa);
 
+
+int install_adj_lsa(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
+
 #endif
diff --git a/nlsr_ndn.c b/nlsr_ndn.c
index eaa0ba0..3f92698 100644
--- a/nlsr_ndn.c
+++ b/nlsr_ndn.c
@@ -22,6 +22,24 @@
 #include "nlsr_ndn.h"
 #include "utility.h"
 #include "nlsr_adl.h"
+#include "nlsr_lsdb.h"
+
+int
+appendLifetime(struct ccn_charbuf *cb, int lifetime) 
+{
+	unsigned char buf[sizeof(int32_t)];
+	int32_t dreck = lifetime << 12;
+	int pos = sizeof(int32_t);
+	int res = 0;
+	while (dreck > 0 && pos > 0) 
+	{
+		pos--;
+		buf[pos] = dreck & 255;
+		dreck = dreck >> 8;
+	}
+	res |= ccnb_append_tagged_blob(cb, CCN_DTAG_InterestLifetime, buf+pos, sizeof(buf)-pos);
+	return res;
+}
 
 enum ccn_upcall_res 
 incoming_interest(struct ccn_closure *selfp,
@@ -147,6 +165,10 @@
 	{
 		process_incoming_content_lsdb(selfp,info);
 	}
+	if(!strcmp((char *)comp_ptr1,"info"))
+	{
+		process_incoming_content_info(selfp,info);
+	}
 
 }
 
@@ -184,6 +206,21 @@
 }
 
 
+
+void 
+process_incoming_content_info(struct ccn_closure* selfp, struct ccn_upcall_info* info)
+{
+	printf("process_incoming_content_info called \n");
+
+	const unsigned char *content_data;
+	size_t length;
+	ccn_content_get_value(info->content_ccnb, info->pco->offset[CCN_PCO_E_Content]-info->pco->offset[CCN_PCO_B_Content], info->pco, &content_data, &length);
+
+	printf("Info Value: %s \n",(char *)content_data);
+	
+
+}
+
 void 
 process_incoming_timed_out_interest(struct ccn_closure* selfp, struct ccn_upcall_info* info)
 {
@@ -222,6 +259,10 @@
 	{
 		process_incoming_timed_out_interest_lsdb(selfp,info);
 	}
+	else if(ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,nlsr_position+1,"info") == 0)
+	{
+		process_incoming_timed_out_interest_info(selfp,info);
+	}
 }
 
 
@@ -272,6 +313,60 @@
 }
 
 void 
+process_incoming_timed_out_interest_info(struct ccn_closure* selfp, struct ccn_upcall_info* info)
+{
+
+	printf("process_incoming_timed_out_interest_info called \n");
+
+	int res,i;
+	int nlsr_position=0;
+	int name_comps=(int)info->interest_comps->n;
+
+	for(i=0;i<name_comps;i++)
+	{
+		res=ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,i,"nlsr");
+		if( res == 0)
+		{
+			nlsr_position=i;
+			break;
+		}	
+	}
+	
+	struct ccn_charbuf *nbr;
+	nbr=ccn_charbuf_create();
+
+	
+	const unsigned char *comp_ptr1;
+	size_t comp_size;
+	for(i=0;i<nlsr_position;i++)
+	{
+		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,&comp_ptr1, &comp_size);
+		//printf("%s \n",comp_ptr1);
+		ccn_charbuf_append_string(nbr,"/");
+		ccn_charbuf_append_string(nbr,(const char *)comp_ptr1);	
+	}
+
+	ccn_charbuf_append_string(nbr,"\0");	
+	printf("Info Interest Timed out for Neighbor: %s\n",ccn_charbuf_as_string(nbr));
+
+	update_adjacent_timed_out_to_adl(nbr,1);
+	int timed_out=get_timed_out_number(nbr);
+	if(timed_out<nlsr->interest_retry && timed_out>0) // use configured variables 
+	{
+		printf("Neighbor: %s Info Interest Timed Out: %d times\n",ccn_charbuf_as_string(nbr),timed_out);
+		send_info_interest_to_neighbor(nbr);
+	}
+	else
+	{
+		printf("Neighbor: %s Info Interest Timed Out: %d times\n",ccn_charbuf_as_string(nbr),timed_out);
+		nlsr->event_build_adj_lsa = ccn_schedule_event(nlsr->sched, 1, &install_adj_lsa, NULL, 0);
+	}
+
+	ccn_charbuf_destroy(&nbr);
+}
+
+
+void 
 process_incoming_interest(struct ccn_closure *selfp, struct ccn_upcall_info *info)
 {
 	printf("process_incoming_interest called \n");
@@ -307,8 +402,10 @@
 	{
 		process_incoming_interest_lsdb(selfp,info);
 	}
-
-
+	if(!strcmp((char *)comp_ptr1,"info"))
+	{
+		process_incoming_interest_info(selfp,info);
+	}
 }
 
 
@@ -395,12 +492,55 @@
 			printf("Sending NACK Content is successful \n");
 
             	ccn_charbuf_destroy(&data);
+		ccn_charbuf_destroy(&name);
 		ccn_charbuf_destroy(&sp.template_ccnb);		
 
 	}
 
 }
 
+
+void 
+process_incoming_interest_info(struct ccn_closure *selfp, struct ccn_upcall_info *info)
+{
+	printf("process_incoming_interest_info called \n");
+	int res;
+
+	printf("Sending Info Content back.....\n");
+
+	struct ccn_charbuf *data=ccn_charbuf_create();
+    	struct ccn_charbuf *name=ccn_charbuf_create();
+    	struct ccn_signing_params sp=CCN_SIGNING_PARAMS_INIT;
+
+	ccn_charbuf_append(name, info->interest_ccnb + info->pi->offset[CCN_PI_B_Name],info->pi->offset[CCN_PI_E_Name] - info->pi->offset[CCN_PI_B_Name]); 
+	
+	
+	sp.template_ccnb=ccn_charbuf_create();
+	ccn_charbuf_append_tt(sp.template_ccnb,CCN_DTAG_SignedInfo, CCN_DTAG);
+	ccnb_tagged_putf(sp.template_ccnb, CCN_DTAG_FreshnessSeconds, "%ld", 10);
+	sp.sp_flags |= CCN_SP_TEMPL_FRESHNESS;
+	ccn_charbuf_append_closer(sp.template_ccnb);	
+
+	struct ccn_charbuf *c=ccn_charbuf_create();
+	ccn_charbuf_reset(c);
+	ccn_charbuf_putf(c, "%ld", nlsr->lsdb_synch_interval);
+	ccn_charbuf_append_string(data,ccn_charbuf_as_string(c));	   
+
+	res= ccn_sign_content(nlsr->ccn, data, name, &sp, "info", strlen("info")); 
+	if(res >= 0)
+		printf("Signing Content is successful \n");
+
+    	res=ccn_put(nlsr->ccn,data->buf,data->length);		
+	if(res >= 0)
+		printf("Sending NACK Content is successful \n");
+
+	ccn_charbuf_destroy(&data);
+	ccn_charbuf_destroy(&c);
+	ccn_charbuf_destroy(&name);
+	ccn_charbuf_destroy(&sp.template_ccnb);
+
+}
+
 int
 send_lsdb_interest(struct ccn_schedule *sched, void *clienth,
         struct ccn_scheduled_event *ev, int flags)
@@ -487,3 +627,158 @@
 
 }
 
+
+int
+send_info_interest(struct ccn_schedule *sched, void *clienth,
+        struct ccn_scheduled_event *ev, int flags)
+{
+
+	struct ccn_charbuf *name;
+	long int rnum;
+	char rnumstr[20];
+	char info_str[5];
+	char nlsr_str[5];
+
+	int res,i;
+	int adl_element;
+	int scope = 2;  //no further than the next host
+
+	rnum=random();
+	memset(&rnumstr,0,20);
+	sprintf(rnumstr,"%ld",rnum);
+	memset(&nlsr_str,0,5);
+	sprintf(nlsr_str,"nlsr");
+	memset(&info_str,0,5);
+	sprintf(info_str,"info");
+	
+
+	struct ndn_neighbor *nbr;
+
+	struct hashtb_enumerator ee;
+    	struct hashtb_enumerator *e = &ee;
+    	
+    	hashtb_start(nlsr->adl, e);
+	adl_element=hashtb_n(nlsr->adl);
+	//int mynumber=15;
+
+	for(i=0;i<adl_element;i++)
+	{
+		nbr=e->data;
+		printf("Sending interest for name prefix:%s/%s/%s\n",ccn_charbuf_as_string(nbr->neighbor),nlsr_str,info_str);	
+		name=ccn_charbuf_create();
+		res=ccn_name_from_uri(name,ccn_charbuf_as_string(nbr->neighbor));
+		ccn_name_append_str(name,nlsr_str);
+		ccn_name_append_str(name,info_str);
+		//ccn_name_append_str(name,rnumstr);
+
+		/* adding Exclusion filter */
+		
+		struct ccn_charbuf *templ;
+		templ = ccn_charbuf_create();
+
+//		struct ccn_charbuf *c;
+//		c = ccn_charbuf_create();
+
+
+		ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
+		ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
+		ccn_charbuf_append_closer(templ); /* </Name> */
+//		ccn_charbuf_append_tt(templ, CCN_DTAG_Exclude, CCN_DTAG);
+//		ccnb_tagged_putf(templ, CCN_DTAG_Any, "");
+//		ccn_charbuf_reset(c);
+//		//ccn_charbuf_putf(c, "%u", (unsigned)mynumber);
+//		//ccn_charbuf_putf(c, "%s", nbr->last_lsdb_version);
+//		ccn_charbuf_putf(c, "%u", (unsigned)nbr->last_lsdb_version);
+//		ccnb_append_tagged_blob(templ, CCN_DTAG_Component, c->buf, c->length);
+//		ccn_charbuf_append_closer(templ); /* </Exclude> */
+		ccnb_tagged_putf(templ, CCN_DTAG_Scope, "%d", scope);
+		appendLifetime(templ,nlsr->interest_resend_time);
+		ccn_charbuf_append_closer(templ); /* </Interest> */
+
+
+		/* Adding Exclusion filter done */
+				
+		res=ccn_express_interest(nlsr->ccn,name,&(nlsr->in_content),templ);
+			
+		if ( res >= 0 )
+			printf("Interest sending Successfull .... \n");	
+//		ccn_charbuf_destroy(&c);
+		ccn_charbuf_destroy(&templ);
+		ccn_charbuf_destroy(&name);
+	
+		hashtb_next(e);		
+	}
+
+	hashtb_end(e);
+
+	//nlsr->event_send_info_interest = ccn_schedule_event(nlsr->sched, 20000000, &send_info_interest, NULL, 0);
+
+	return 0;
+
+}
+
+
+void 
+send_info_interest_to_neighbor(struct ccn_charbuf *nbr)
+{
+
+	struct ccn_charbuf *name;
+	long int rnum;
+	char rnumstr[20];
+	char info_str[5];
+	char nlsr_str[5];
+
+	int res;
+	int scope = 2;  //no further than the next host
+
+	rnum=random();
+	memset(&rnumstr,0,20);
+	sprintf(rnumstr,"%ld",rnum);
+	memset(&nlsr_str,0,5);
+	sprintf(nlsr_str,"nlsr");
+	memset(&info_str,0,5);
+	sprintf(info_str,"info");
+	
+	printf("Sending interest for name prefix:%s/%s/%s\n",ccn_charbuf_as_string(nbr),nlsr_str,info_str);	
+	name=ccn_charbuf_create();
+	res=ccn_name_from_uri(name,ccn_charbuf_as_string(nbr));
+	ccn_name_append_str(name,nlsr_str);
+	ccn_name_append_str(name,info_str);
+	//ccn_name_append_str(name,rnumstr);
+
+	/* adding Exclusion filter */
+		
+	struct ccn_charbuf *templ;
+	templ = ccn_charbuf_create();
+
+//	struct ccn_charbuf *c;
+//	c = ccn_charbuf_create();
+
+
+	ccn_charbuf_append_tt(templ, CCN_DTAG_Interest, CCN_DTAG);
+	ccn_charbuf_append_tt(templ, CCN_DTAG_Name, CCN_DTAG);
+	ccn_charbuf_append_closer(templ); /* </Name> */
+//	ccn_charbuf_append_tt(templ, CCN_DTAG_Exclude, CCN_DTAG);
+//	ccnb_tagged_putf(templ, CCN_DTAG_Any, "");
+//	ccn_charbuf_reset(c);
+//	//ccn_charbuf_putf(c, "%u", (unsigned)mynumber);
+//	//ccn_charbuf_putf(c, "%s", nbr->last_lsdb_version);
+//	ccn_charbuf_putf(c, "%u", (unsigned)nbr->last_lsdb_version);
+//	ccnb_append_tagged_blob(templ, CCN_DTAG_Component, c->buf, c->length);
+//	ccn_charbuf_append_closer(templ); /* </Exclude> */
+	ccnb_tagged_putf(templ, CCN_DTAG_Scope, "%d", scope);
+	appendLifetime(templ,15);
+	ccn_charbuf_append_closer(templ); /* </Interest> */
+
+
+	/* Adding Exclusion filter done */
+				
+	res=ccn_express_interest(nlsr->ccn,name,&(nlsr->in_content),templ);
+			
+	if ( res >= 0 )
+		printf("Interest sending Successfull .... \n");	
+//	ccn_charbuf_destroy(&c);
+	ccn_charbuf_destroy(&templ);
+	ccn_charbuf_destroy(&name);
+
+}
diff --git a/nlsr_ndn.h b/nlsr_ndn.h
index cb249c2..4c2a79c 100644
--- a/nlsr_ndn.h
+++ b/nlsr_ndn.h
@@ -1,20 +1,28 @@
 #ifndef _NLSR_NDN_H_
 #define _NLSR_NDN_H_
 
+int appendLifetime(struct ccn_charbuf *cb, int lifetime);
 
 int send_lsdb_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
 
 enum ccn_upcall_res incoming_interest(struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info);
 void process_incoming_interest(struct ccn_closure *selfp, struct ccn_upcall_info *info);
 void process_incoming_interest_lsdb(struct ccn_closure *selfp, struct ccn_upcall_info *info);
+void process_incoming_interest_info(struct ccn_closure *selfp, struct ccn_upcall_info *info);
 
 void process_incoming_timed_out_interest(struct ccn_closure* selfp, struct ccn_upcall_info* info);
 void process_incoming_timed_out_interest_lsdb(struct ccn_closure* selfp, struct ccn_upcall_info* info);
+void process_incoming_timed_out_interest_info(struct ccn_closure* selfp, struct ccn_upcall_info* info);
 
 
 enum ccn_upcall_res incoming_content(struct ccn_closure* selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info* info);
 void process_incoming_content(struct ccn_closure* selfp, struct ccn_upcall_info* info);
 void process_incoming_content_lsdb(struct ccn_closure* selfp, struct ccn_upcall_info* info);
+void process_incoming_content_info(struct ccn_closure* selfp, struct ccn_upcall_info* info);
+
+
+int send_info_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags);
+void send_info_interest_to_neighbor(struct ccn_charbuf *nbr);
 
 #endif
 
diff --git a/utility.c b/utility.c
index ed22483..283376d 100644
--- a/utility.c
+++ b/utility.c
@@ -70,3 +70,14 @@
 	gettimeofday(&now,NULL);
 	return now.tv_sec;
 }
+
+
+long int 
+get_current_time_microsec(void)
+{
+	struct timeval now; 
+	gettimeofday(&now, NULL);
+	long int microSec=1000000*now.tv_sec+now.tv_usec;
+	return microSec;
+
+}
diff --git a/utility.h b/utility.h
index 96cd3cf..b068d1a 100644
--- a/utility.h
+++ b/utility.h
@@ -5,5 +5,6 @@
 char * getGmTimeStamp(void);
 char * nth_named_component(const char *name_prefix, int n);
 long int get_current_time_sec(void);
+long int get_current_time_microsec(void);
 
 #endif
