model: Add method that is necessary for python bindings
Refs: #2341
diff --git a/model/ndn-l3-protocol.cpp b/model/ndn-l3-protocol.cpp
index dc487bc..39ce2ca 100644
--- a/model/ndn-l3-protocol.cpp
+++ b/model/ndn-l3-protocol.cpp
@@ -351,5 +351,13 @@
return nullptr;
}
+Ptr<L3Protocol>
+L3Protocol::getL3Protocol(Ptr<Object> node)
+{
+ Ptr<L3Protocol> retval = node->GetObject<L3Protocol>();
+ NS_ASSERT_MSG(retval != nullptr, "L3Protocol is not aggregated on this object");
+ return retval;
+}
+
} // namespace ndn
} // namespace ns3