src: Changing LSA names to conform with specs

Change LSA names from /<network>/NLSR/LSA/<network>/<site>/<router-name>/<type>/<version>
to /<network>/NLSR/LSA/<site>/<router-name>/<type>/<version> to conform with the
NLSR specification document. http://redmine.named-data.net/projects/nlsr/wiki/Build_LSAs

Change-Id: I89c9aaee44cd1f3d286a29bd8eb5585bfa844b43
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 16e7d1a..c5e7756 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -567,8 +567,11 @@
                 m_nlsr.getAdjacencyList());
   m_nlsr.getSequencingManager().increaseAdjLsaSeq();
   // publish routing update
+  //ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
+  //lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
   ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-  lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
+  lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
+  lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
   m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(),
                                                     lsaPrefix);
   return installAdjLsa(adjLsa);
@@ -643,8 +646,11 @@
                                                                  chkNameLsa->getLsSeqNo(),
                                                                  ndn::time::seconds(m_lsaRefreshTime)));
         // publish routing update
+        //ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
+        //lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
         ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
+        lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
+        lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
         m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(),
                                                           lsaPrefix);
       }
@@ -679,8 +685,11 @@
                                                                chkAdjLsa->getLsSeqNo(),
                                                                ndn::time::seconds(m_lsaRefreshTime)));
         // publish routing update
+        //ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
+        //lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
         ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
+        lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
+        lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
         m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(),
                                                           lsaPrefix);
       }
@@ -719,8 +728,11 @@
                                         chkCorLsa->getLsSeqNo(),
                                         ndn::time::seconds(m_lsaRefreshTime)));
         // publish routing update
+        //ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
+        //lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
         ndn::Name lsaPrefix = m_nlsr.getConfParameter().getLsaPrefix();
-        lsaPrefix.append(m_nlsr.getConfParameter().getRouterPrefix());
+        lsaPrefix.append(m_nlsr.getConfParameter().getSiteName());
+        lsaPrefix.append(m_nlsr.getConfParameter().getRouterName());
         m_nlsr.getSyncLogicHandler().publishRoutingUpdate(m_nlsr.getSequencingManager(),
                                                           lsaPrefix);
       }
@@ -762,8 +774,9 @@
   if (lsaPosition >= 0) {
     std::string interestedLsType;
     uint64_t interestedLsSeqNo;
-    ndn::Name origRouter = intName.getSubName(lsaPosition + 1,
-                                              interest.getName().size() - lsaPosition - 3);
+    ndn::Name origRouter = m_nlsr.getConfParameter().getNetwork();
+    origRouter.append(intName.getSubName(lsaPosition + 1,
+                                         interest.getName().size() - lsaPosition - 3));
     interestedLsType  = intName[-2].toUri();
     interestedLsSeqNo = intName[-1].toNumber();
     if (interestedLsType == "name") {
@@ -870,8 +883,9 @@
   if (lsaPosition >= 0) {
     std::string interestedLsType;
     uint64_t interestedLsSeqNo;
-    ndn::Name origRouter = dataName.getSubName(lsaPosition + 1,
-                                               dataName.size() - lsaPosition - 4);
+    ndn::Name origRouter = m_nlsr.getConfParameter().getNetwork();
+    origRouter.append(dataName.getSubName(lsaPosition + 1,
+                                          dataName.size() - lsaPosition - 4));
     interestedLsType  = dataName[-3].toUri();
     interestedLsSeqNo = dataName[-2].toNumber();
     if (interestedLsType == "name") {