fixed the error of the process_command_topo_prefix() the arguments of memset were not right, so there was a garbage in front of the topo prefix. it is fixed! now I can see changes using ccnsyncwatch locally. going to try remotely.
diff --git a/nlsr-sync-0.0/Makefile b/nlsr-sync-0.0/Makefile
index 30e4fad..ae2b195 100755
--- a/nlsr-sync-0.0/Makefile
+++ b/nlsr-sync-0.0/Makefile
@@ -1,5 +1,5 @@
-CC = cc
-CFLAGS = -g -Wall -Wpointer-arith -Wreturn-type -Wstrict-prototypes
+CC = gcc
+CFLAGS = -g -Wall
LIBS = -lccn -lccnsync -lcrypto
PROGRAMS = nlsrc nlsr
@@ -11,10 +11,10 @@
all: $(PROGRAMS)
nlsr: $(NLSR_SRCS)
- $(CC) $(CFLAGS) $(NLSR_SRCS) -o nlsr $(LIBS) -lm
+ $(CC) $(CFLAGS) $(NLSR_SRCS) $(LIBS) -lm -o nlsr
nlsrc: $(NLSRC_SRCS)
- $(CC) $(CFLAGS) $(NLSRC_SRCS) -o nlsrc $(LIBS) -lm
+ $(CC) $(CFLAGS) $(NLSRC_SRCS) $(LIBS) -lm -o nlsrc
install: $(PROGRAMS)
cp $(PROGRAMS) $(INSTALL_PATH)
diff --git a/nlsr-sync-0.0/nlsr.c b/nlsr-sync-0.0/nlsr.c
index c7c468f..9e63703 100755
--- a/nlsr-sync-0.0/nlsr.c
+++ b/nlsr-sync-0.0/nlsr.c
@@ -549,7 +549,9 @@
if( nlsr->topo_prefix != NULL)
free(nlsr->topo_prefix);
nlsr->topo_prefix=(char *)malloc(strlen(topo_prefix)+1);
- memset(nlsr->topo_prefix,strlen(topo_prefix)+1,0);
+ //nlsr->topo_prefix=(char *)calloc(strlen(topo_prefix)+1, sizeof(char));
+ memset(nlsr->topo_prefix,0,strlen(topo_prefix)+1);
+ puts(topo_prefix);
memcpy(nlsr->topo_prefix,topo_prefix,strlen(topo_prefix));
//printf(" Topo Prefix: %s \n",nlsr->topo_prefix);
diff --git a/nlsr-sync-0.0/nlsr_lsdb.c b/nlsr-sync-0.0/nlsr_lsdb.c
index e0f6ee4..8b753bd 100755
--- a/nlsr-sync-0.0/nlsr_lsdb.c
+++ b/nlsr-sync-0.0/nlsr_lsdb.c
@@ -61,7 +61,7 @@
memcpy(key+strlen(key),lst,strlen(lst));
memcpy(key+strlen(key),"/",1);
memcpy(key+strlen(key),lsid,strlen(lsid));
-
+ printf("%s\n", key);
}
@@ -69,7 +69,7 @@
make_name_lsa_prefix_for_repo(char *key, char *orig_router, int ls_type, long int ls_id,char *orig_time,char *slice_prefix)
{
- char lst[2];
+ /*char lst[2];
memset(lst,0,2);
sprintf(lst,"%d",ls_type);
@@ -83,7 +83,9 @@
memcpy(key+strlen(key),"/",1);
memcpy(key+strlen(key),orig_time,strlen(orig_time));
memcpy(key+strlen(key),orig_router,strlen(orig_router));
-
+ */
+ sprintf(key,"%s%d/%d/%s%s",slice_prefix, ls_type, ls_id, orig_time, orig_router);
+ printf("%s\n",key);
}
void
diff --git a/nlsr-sync-0.0/pollux.conf b/nlsr-sync-0.0/pollux.conf
index 495378e..a2c2193 100755
--- a/nlsr-sync-0.0/pollux.conf
+++ b/nlsr-sync-0.0/pollux.conf
@@ -1,10 +1,18 @@
-router-name /ndn/memphis.edu/netlab/pollux
-ccnneighbor /ndn/memphis.edu/netlab/macbook face2 10
-ccnneighbor /ndn/memphis.edu/netlab/castor face3 8
-ccnname /ndn/memphis.edu/netlab/pollux/name1
-ccnname /ndn/memphis.edu/netlab/pollux/test
-lsdb-synch-interval 320
-interest-retry 3
+#----configuration file for macbook----------
+#
+router-name /ndn/memphis.edu/cs/pollux
+ccnneighbor /ndn/memphis.edu/cs/sirius
+ccnname /ndn/memphis.edu/cs/pollux/name1
+#------lsdb-synch-interval-----
+lsdb-synch-interval 350
+interest-retry 2
interest-resend-time 5
+lsa-refresh-time 600
+router-dead-interval 900
+multi-path-face-num 2
+debug on
+topo-prefix /ndn/test/topo/
+slice-prefix /ndn/test/slice/
+logdir mylog/