Add version number after ChronoSync prefix

Change-Id: I5c6782461e6c00129850ab00df407a1f59f4353b
diff --git a/src/conf-parameter.cpp b/src/conf-parameter.cpp
index f0d41cb..5ffca5b 100644
--- a/src/conf-parameter.cpp
+++ b/src/conf-parameter.cpp
@@ -28,6 +28,9 @@
 
 INIT_LOGGER(ConfParameter);
 
+// To be changed when breaking changes are made to sync
+const uint64_t ConfParameter::SYNC_VERSION = 4;
+
 void
 ConfParameter::writeLog()
 {
@@ -59,4 +62,21 @@
   NLSR_LOG_INFO("Routing calculation interval:  " << m_routingCalcInterval);
 }
 
+void
+ConfParameter::setNetwork(const ndn::Name& networkName)
+{
+  m_network = networkName;
+
+  m_chronosyncPrefix.append("localhop");
+  m_chronosyncPrefix.append(m_network);
+  m_chronosyncPrefix.append("NLSR");
+  m_chronosyncPrefix.append("sync");
+  m_chronosyncPrefix.appendVersion(SYNC_VERSION);
+
+  m_lsaPrefix.append("localhop");
+  m_lsaPrefix.append(m_network);
+  m_lsaPrefix.append("NLSR");
+  m_lsaPrefix.append("LSA");
+}
+
 } // namespace nlsr