diff --git a/nlsr.c b/nlsr.c
new file mode 100644
index 0000000..76bbb8a
--- /dev/null
+++ b/nlsr.c
@@ -0,0 +1,273 @@
+#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"
+
+
+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);
+}
+
+void 
+process_command_ccnneighbor(char *command)
+{
+	if(command==NULL)
+	{
+		printf(" Wrong Command Format ( ccnneighbor router_id faceX)\n");
+		return;
+	}
+	char *rem;
+	const char *sep=" \t\n";
+	char *rtr_id,*face;
+
+	rtr_id=strtok_r(command,sep,&rem);
+	if(rtr_id==NULL)
+	{
+		printf(" Wrong Command Format ( ccnneighbor router_id faceX)\n");
+		return;
+	}
+
+	face=strtok_r(NULL,sep,&rem);
+	if(face==NULL)
+	{
+		printf(" Wrong Command Format ( ccnneighbor router_id faceX)\n");
+		return;
+	}
+
+	printf("Router: %s face: %s\n",rtr_id,face);
+
+}
+
+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;
+}
+
+int 
+main(int argc, char *argv[])
+{
+    	int res;
+    	char *config_file;
+	int daemon_mode;
+	struct hashtb_param param_adl = {0};
+	struct hashtb_param param_npl = {0};
+	
+	nlsr=(struct nlsr *)malloc(sizeof(struct nlsr));
+
+	nlsr->adl=hashtb_create(200, &param_adl);
+	nlsr->npl = hashtb_create(200, &param_npl);
+	nlsr->in_interest.p = &incoming_interest;
+	nlsr->in_content.p = &incoming_content;
+	nlsr->is_synch_init=1;
+
+	struct ccn_charbuf *router_prefix;	
+    	
+	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);
+
+	while(1)
+	{
+		ccn_schedule_run(nlsr->sched);
+        	res = ccn_run(nlsr->ccn, 500);
+
+	}
+
+	
+	
+	hashtb_destroy(&nlsr->adl);
+	hashtb_destroy(&nlsr->npl);
+	ccn_schedule_destroy(&nlsr->sched);
+	ccn_destroy(&nlsr->ccn);
+	free(nlsr);
+
+	return 0;
+}
+
diff --git a/nlsr.h b/nlsr.h
new file mode 100644
index 0000000..2b15b8b
--- /dev/null
+++ b/nlsr.h
@@ -0,0 +1,35 @@
+#ifndef _NLSR_H_
+#define _NLSR_H_
+
+#define LSA_ADJ_TYPE 1
+#define LSA_NAME_TYPE 2
+
+struct nlsr
+{
+
+	struct ccn_closure in_interest;
+	struct ccn_closure in_content;
+	struct ccn_schedule *sched;
+    	struct ccn_scheduled_event *event;
+
+	struct hashtb *adl;
+	struct hashtb *npl;
+
+	struct ccn *ccn;
+	char *router_name;
+
+	int is_synch_init;
+};
+
+struct nlsr *nlsr;
+
+
+void ndn_rtr_gettime(const struct ccn_gettime *self, struct ccn_timeval *result);
+void process_command_router_name(char *command);
+void process_command_ccnname(char *command);
+void process_command_ccnneighbor(char *command);
+void process_conf_command(char *command);
+int readConfigFile(const char *filename);
+
+
+#endif
diff --git a/nlsr_ndn.c b/nlsr_ndn.c
new file mode 100644
index 0000000..4b01e2a
--- /dev/null
+++ b/nlsr_ndn.c
@@ -0,0 +1,111 @@
+#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"
+
+enum ccn_upcall_res 
+incoming_interest(struct ccn_closure *selfp,
+        enum ccn_upcall_kind kind, struct ccn_upcall_info *info)
+{
+    
+    switch (kind) {
+        case CCN_UPCALL_FINAL:
+            break;
+        case CCN_UPCALL_INTEREST:
+		// printing the name prefix for which it received interest
+            	printf("Interest Received for name: "); 
+	    	struct ccn_charbuf*c;
+		c=ccn_charbuf_create();
+		ccn_uri_append(c,info->interest_ccnb,info->pi->offset[CCN_PI_E_Name]-info->pi->offset[CCN_PI_B_Name],0);
+		//ccn_name_chop(c,NULL,-1);
+		printf("%s\n",ccn_charbuf_as_string(c));
+		ccn_charbuf_destroy(&c);
+
+		//process_incoming_interest(selfp, info);
+		
+		/* 
+	    	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", 1010);
+                sp.sp_flags |= CCN_SP_TEMPL_FRESHNESS;
+        	ccn_charbuf_append_closer(sp.template_ccnb);		   
+
+		res= ccn_sign_content(ospfndn->ccn, data, name, &sp, "hello", strlen("hello")); 
+	    	res=ccn_put(ospfndn->ccn,data->buf,data->length);
+            	ccn_charbuf_destroy(&data);  
+
+		*/
+		break;
+
+        default:
+            break;
+    }
+
+    return CCN_UPCALL_RESULT_OK;
+}
+
+
+enum ccn_upcall_res incoming_content(struct ccn_closure* selfp,
+        enum ccn_upcall_kind kind, struct ccn_upcall_info* info)
+{
+
+
+    switch(kind) {
+        case CCN_UPCALL_FINAL:
+            break;
+        case CCN_UPCALL_CONTENT:
+            	printf("Content Received for name: ");  
+		struct ccn_charbuf*c;
+		c=ccn_charbuf_create();
+		ccn_uri_append(c,info->interest_ccnb,info->pi->offset[CCN_PI_E],0);
+		printf("%s\n",ccn_charbuf_as_string(c));
+		ccn_charbuf_destroy(&c);
+
+		//process_incoming_content(selfp, info);
+	    break;
+        case CCN_UPCALL_INTEREST_TIMED_OUT:
+          /*  printf("Interest timed out \n"); 
+
+		const unsigned char *comp_ptr;
+		size_t comp_size;
+		int res;
+		
+		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,2,&comp_ptr, &comp_size);
+
+		printf("Parsed Interest: %s size: %d Size of name prefix: %d\n",comp_ptr,(int)comp_size,(int)info->interest_comps->n);
+	   */
+	    
+		//process_timed_out_interest(selfp,info);
+	    break;
+        default:
+            fprintf(stderr, "Unexpected response of kind %d\n", kind);
+            return CCN_UPCALL_RESULT_ERR;
+    }
+
+    return CCN_UPCALL_RESULT_OK;
+}
diff --git a/nlsr_ndn.h b/nlsr_ndn.h
new file mode 100644
index 0000000..4400bbb
--- /dev/null
+++ b/nlsr_ndn.h
@@ -0,0 +1,10 @@
+#ifndef _NLSR_NDN_H_
+#define _NLSR_NDN_H_
+
+enum ccn_upcall_res incoming_interest(struct ccn_closure *selfp, enum ccn_upcall_kind kind, 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);
+
+#endif
+
diff --git a/utility.c b/utility.c
new file mode 100644
index 0000000..5ad3529
--- /dev/null
+++ b/utility.c
@@ -0,0 +1,50 @@
+#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 "utility.h"
+
+
+char * getLocalTimeStamp(void)
+{
+	char *timestamp = (char *)malloc(sizeof(char) * 16);
+	time_t ltime;
+	ltime=time(NULL);
+	struct tm *tm;
+	tm=localtime(&ltime);
+  
+	sprintf(timestamp, "%04d%02d%02d%02d%02d%02d", tm->tm_year+1900, tm->tm_mon+1, 
+		tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
+
+	return timestamp;
+}
+
+char * 
+nth_named_component(const char *name_prefix, int n)
+{
+
+	int i;
+	char * seps="/";
+	char *rem=NULL;
+	char *component;
+
+	char *prefix=(char *)malloc(strlen(name_prefix)+1);
+	memcpy(prefix,name_prefix,strlen(name_prefix)+1);
+
+	component=strtok_r(prefix,seps,&rem);
+
+	for(i=1;i<n;i++)
+		component=strtok_r(NULL,seps,&rem);
+
+	return component;
+
+
+
+}
diff --git a/utility.h b/utility.h
new file mode 100644
index 0000000..ae3b999
--- /dev/null
+++ b/utility.h
@@ -0,0 +1,7 @@
+#ifndef _UTILITY_H_
+#define _UTILITY_H_
+
+char * getLocalTimeStamp(void);
+char * nth_named_component(const char *name_prefix, int n);
+
+#endif
