mgmt: add LocalUri to ControlParameters

refs #4014

Change-Id: I474dc3f41021687b99804fc2d71dd6e72c5175c5
diff --git a/src/mgmt/nfd/control-parameters.hpp b/src/mgmt/nfd/control-parameters.hpp
index 6c0c599..cd432ca 100644
--- a/src/mgmt/nfd/control-parameters.hpp
+++ b/src/mgmt/nfd/control-parameters.hpp
@@ -37,6 +37,7 @@
   CONTROL_PARAMETER_NAME,
   CONTROL_PARAMETER_FACE_ID,
   CONTROL_PARAMETER_URI,
+  CONTROL_PARAMETER_LOCAL_URI,
   CONTROL_PARAMETER_LOCAL_CONTROL_FEATURE,
   CONTROL_PARAMETER_ORIGIN,
   CONTROL_PARAMETER_COST,
@@ -52,6 +53,7 @@
   "Name",
   "FaceId",
   "Uri",
+  "LocalUri",
   "LocalControlFeature",
   "Origin",
   "Cost",
@@ -74,7 +76,7 @@
 /**
  * \ingroup management
  * \brief represents parameters in a ControlCommand request or response
- * \sa http://redmine.named-data.net/projects/nfd/wiki/ControlCommand#ControlParameters
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/ControlCommand#ControlParameters
  * \details This type is copyable because it's an abstraction of a TLV type.
  */
 class ControlParameters : public mgmt::ControlParameters
@@ -196,6 +198,36 @@
     return *this;
   }
 
+  bool
+  hasLocalUri() const
+  {
+    return m_hasFields[CONTROL_PARAMETER_LOCAL_URI];
+  }
+
+  const std::string&
+  getLocalUri() const
+  {
+    BOOST_ASSERT(this->hasLocalUri());
+    return m_localUri;
+  }
+
+  ControlParameters&
+  setLocalUri(const std::string& localUri)
+  {
+    m_wire.reset();
+    m_localUri = localUri;
+    m_hasFields[CONTROL_PARAMETER_LOCAL_URI] = true;
+    return *this;
+  }
+
+  ControlParameters&
+  unsetLocalUri()
+  {
+    m_wire.reset();
+    m_hasFields[CONTROL_PARAMETER_LOCAL_URI] = false;
+    return *this;
+  }
+
   /**
    * \deprecated use Flags+Mask fields instead
    */
@@ -492,6 +524,7 @@
   Name                m_name;
   uint64_t            m_faceId;
   std::string         m_uri;
+  std::string         m_localUri;
   LocalControlFeature m_localControlFeature;
   uint64_t            m_origin;
   uint64_t            m_cost;