Add support for setting NLSR prefix costs via configuration file and nlsrc
This change alters the nlsr.conf 'advertising' format, as the previous
setup used unnecessary keys which made dynamically adjusting the
stateful conf file difficult.
Incorporates code written by Yanbiao Li.
Change-Id: I3ed5d0a564099be8cc1389ee6acc6f2d04cef889
diff --git a/tools/nlsrc.hpp b/tools/nlsrc.hpp
index a64c940..4337375 100644
--- a/tools/nlsrc.hpp
+++ b/tools/nlsrc.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, The University of Memphis,
+ * Copyright (c) 2014-2025, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -86,7 +86,7 @@
*
*/
void
- advertiseName(ndn::Name name, bool wantSave);
+ advertiseName(ndn::Name name, bool wantSave, uint64_t cost = 0);
/**
* \brief Removes a name prefix from NLSR's Name LSA
@@ -102,7 +102,8 @@
sendNamePrefixUpdate(const ndn::Name& name,
const ndn::Name::Component& verb,
const std::string& info,
- bool saveFlag);
+ bool saveFlag,
+ uint64_t cost = 0);
void
onControlResponse(const std::string& info, const ndn::Data& data);