22 #ifndef NLSR_LSA_NAME_LSA_HPP
23 #define NLSR_LSA_NAME_LSA_HPP
28 #include <boost/operators.hpp>
42 class NameLsa :
public Lsa,
private boost::equality_comparable<NameLsa>
47 NameLsa(
const ndn::Name& originRouter, uint64_t seqNo,
48 const ndn::time::system_clock::time_point& timepoint,
52 NameLsa(
const ndn::Block& block);
92 template<ndn::encoding::Tag TAG>
94 wireEncode(ndn::EncodingImpl<TAG>& block)
const;
102 std::tuple<bool, std::list<ndn::Name>, std::list<ndn::Name>>
103 update(
const std::shared_ptr<Lsa>& lsa)
override;
107 print(std::ostream& os)
const override;
117 return lhs.m_npl == rhs.m_npl;
Represents a Link State Announcement (LSA).
Represents an LSA of name prefixes announced by the origin router.
NamePrefixList & getNpl()
static constexpr Lsa::Type type()
void addName(const ndn::Name &name)
std::tuple< bool, std::list< ndn::Name >, std::list< ndn::Name > > update(const std::shared_ptr< Lsa > &lsa) override
void removeName(const ndn::Name &name)
void wireDecode(const ndn::Block &wire)
friend bool operator==(const NameLsa &lhs, const NameLsa &rhs)
const NamePrefixList & getNpl() const
const ndn::Block & wireEncode() const override
Lsa::Type getType() const override
bool erase(const ndn::Name &name, const std::string &source="")
Deletes name and source combination.
bool insert(const ndn::Name &name, const std::string &source="")
Inserts name and source combination.
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(Adjacent)