blob: 00aa79786d9baa5221a946ecd3bdac85f18783c4 [file] [log] [blame]
akmhoque3d06e792014-05-27 16:23:20 -05001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Nick Gordonfeae5572017-01-13 12:06:26 -06003 * Copyright (c) 2014-2017, The University of Memphis,
Vince Lehmanc2e51f62015-01-20 15:03:11 -06004 * Regents of the University of California,
5 * Arizona Board of Regents.
akmhoque3d06e792014-05-27 16:23:20 -05006 *
7 * This file is part of NLSR (Named-data Link State Routing).
8 * See AUTHORS.md for complete list of NLSR authors and contributors.
9 *
10 * NLSR is free software: you can redistribute it and/or modify it under the terms
11 * of the GNU General Public License as published by the Free Software Foundation,
12 * either version 3 of the License, or (at your option) any later version.
13 *
14 * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 * PURPOSE. See the GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
akmhoque3d06e792014-05-27 16:23:20 -050020 **/
Vince Lehmanc2e51f62015-01-20 15:03:11 -060021
Nick Gordonf14ec352017-07-24 16:09:58 -050022#include "lsa.hpp"
23#include "nlsr.hpp"
24#include "name-prefix-list.hpp"
25#include "adjacent.hpp"
26#include "logger.hpp"
27
akmhoque53353462014-04-22 08:43:45 -050028#include <string>
29#include <iostream>
30#include <sstream>
31#include <algorithm>
32#include <cmath>
33#include <limits>
akmhoque31d1d4b2014-05-05 22:08:14 -050034#include <boost/tokenizer.hpp>
35#include <boost/algorithm/string.hpp>
akmhoque53353462014-04-22 08:43:45 -050036
akmhoque53353462014-04-22 08:43:45 -050037namespace nlsr {
38
akmhoque674b0b12014-05-20 14:33:28 -050039INIT_LOGGER("Lsa");
40
Nick Gordonfaf49f42017-10-23 12:36:28 -050041std::string
42Lsa::getData() const
43{
44 std::ostringstream os;
45 os << m_origRouter << "|" << getType() << "|" << m_lsSeqNo << "|"
46 << ndn::time::toIsoString(m_expirationTimePoint) << "|";
47 return os.str();
48}
49
akmhoque31d1d4b2014-05-05 22:08:14 -050050const ndn::Name
Nick Gordon22cc1a82017-10-23 13:06:53 -050051Lsa::getKey() const
akmhoque53353462014-04-22 08:43:45 -050052{
Nick Gordon22cc1a82017-10-23 13:06:53 -050053 return ndn::Name(m_origRouter).append(std::to_string(getType()));
akmhoque53353462014-04-22 08:43:45 -050054}
55
Ashlesh Gawanded02c3882015-12-29 16:02:51 -060056NameLsa::NameLsa(const ndn::Name& origR, uint32_t lsn,
akmhoquec7a79b22014-05-26 08:06:19 -050057 const ndn::time::system_clock::TimePoint& lt,
akmhoquefdbddb12014-05-02 18:35:19 -050058 NamePrefixList& npl)
akmhoque53353462014-04-22 08:43:45 -050059{
60 m_origRouter = origR;
akmhoque53353462014-04-22 08:43:45 -050061 m_lsSeqNo = lsn;
akmhoquec7a79b22014-05-26 08:06:19 -050062 m_expirationTimePoint = lt;
Nick Gordonf14ec352017-07-24 16:09:58 -050063 for (const auto& name : npl.getNames()) {
64 addName(name);
akmhoque53353462014-04-22 08:43:45 -050065 }
66}
67
Nick Gordone98480b2017-05-24 11:23:03 -050068std::string
Nick Gordonfaf49f42017-10-23 12:36:28 -050069NameLsa::serialize() const
akmhoque53353462014-04-22 08:43:45 -050070{
Nick Gordonadad2492017-05-25 10:53:07 -050071 std::ostringstream os;
Nick Gordonfaf49f42017-10-23 12:36:28 -050072 os << getData() << m_npl.size();
Nick Gordonf14ec352017-07-24 16:09:58 -050073 for (const auto& name : m_npl.getNames()) {
Nick Gordonadad2492017-05-25 10:53:07 -050074 os << "|" << name;
akmhoque53353462014-04-22 08:43:45 -050075 }
Nick Gordonadad2492017-05-25 10:53:07 -050076 os << "|";
77 return os.str();
akmhoque53353462014-04-22 08:43:45 -050078}
79
80bool
akmhoque31d1d4b2014-05-05 22:08:14 -050081NameLsa::initializeFromContent(const std::string& content)
akmhoque53353462014-04-22 08:43:45 -050082{
83 uint32_t numName = 0;
akmhoque31d1d4b2014-05-05 22:08:14 -050084 boost::char_separator<char> sep("|");
85 boost::tokenizer<boost::char_separator<char> >tokens(content, sep);
86 boost::tokenizer<boost::char_separator<char> >::iterator tok_iter =
87 tokens.begin();
88 m_origRouter = ndn::Name(*tok_iter++);
akmhoque157b0a42014-05-13 00:26:37 -050089 if (!(m_origRouter.size() > 0)) {
akmhoque53353462014-04-22 08:43:45 -050090 return false;
91 }
akmhoque31d1d4b2014-05-05 22:08:14 -050092 try {
Nick Gordon727d4832017-10-13 18:04:25 -050093 if (*tok_iter++ != std::to_string(Lsa::Type::NAME)) {
Ashlesh Gawanded02c3882015-12-29 16:02:51 -060094 return false;
95 }
96
akmhoque31d1d4b2014-05-05 22:08:14 -050097 m_lsSeqNo = boost::lexical_cast<uint32_t>(*tok_iter++);
akmhoquec7a79b22014-05-26 08:06:19 -050098 m_expirationTimePoint = ndn::time::fromIsoString(*tok_iter++);
akmhoque31d1d4b2014-05-05 22:08:14 -050099 numName = boost::lexical_cast<uint32_t>(*tok_iter++);
akmhoque53353462014-04-22 08:43:45 -0500100 }
Nick Gordonadad2492017-05-25 10:53:07 -0500101 catch (const std::exception& e) {
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600102 _LOG_ERROR(e.what());
akmhoque53353462014-04-22 08:43:45 -0500103 return false;
104 }
akmhoque157b0a42014-05-13 00:26:37 -0500105 for (uint32_t i = 0; i < numName; i++) {
akmhoque778f81b2014-06-27 10:07:56 -0500106 ndn::Name name(*tok_iter++);
akmhoque53353462014-04-22 08:43:45 -0500107 addName(name);
108 }
109 return true;
110}
111
Nick Gordon56d1fae2017-05-26 16:39:25 -0500112bool
113NameLsa::isEqualContent(const NameLsa& other) const
114{
115 return m_npl == other.getNpl();
116}
117
akmhoque53353462014-04-22 08:43:45 -0500118void
119NameLsa::writeLog()
120{
akmhoque674b0b12014-05-20 14:33:28 -0500121 _LOG_DEBUG("Name Lsa: ");
122 _LOG_DEBUG(" Origination Router: " << m_origRouter);
Nick Gordon727d4832017-10-13 18:04:25 -0500123 _LOG_DEBUG(" Ls Type: " << getType());
akmhoque674b0b12014-05-20 14:33:28 -0500124 _LOG_DEBUG(" Ls Seq No: " << m_lsSeqNo);
akmhoquec7a79b22014-05-26 08:06:19 -0500125 _LOG_DEBUG(" Ls Lifetime: " << m_expirationTimePoint);
akmhoque674b0b12014-05-20 14:33:28 -0500126 _LOG_DEBUG(" Names: ");
127 int i = 1;
Nick Gordonf14ec352017-07-24 16:09:58 -0500128 std::list<ndn::Name> nl = m_npl.getNames();
akmhoque674b0b12014-05-20 14:33:28 -0500129 for (std::list<ndn::Name>::iterator it = nl.begin(); it != nl.end(); it++)
130 {
131 _LOG_DEBUG(" Name " << i << ": " << (*it));
132 }
akmhoque2f423352014-06-03 11:49:35 -0500133 _LOG_DEBUG("name_lsa_end");
akmhoque53353462014-04-22 08:43:45 -0500134}
135
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600136CoordinateLsa::CoordinateLsa(const ndn::Name& origR, uint32_t lsn,
akmhoquec7a79b22014-05-26 08:06:19 -0500137 const ndn::time::system_clock::TimePoint& lt,
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600138 double r, std::vector<double> theta)
akmhoque53353462014-04-22 08:43:45 -0500139{
140 m_origRouter = origR;
akmhoque53353462014-04-22 08:43:45 -0500141 m_lsSeqNo = lsn;
akmhoquec7a79b22014-05-26 08:06:19 -0500142 m_expirationTimePoint = lt;
akmhoque53353462014-04-22 08:43:45 -0500143 m_corRad = r;
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600144 m_angles = theta;
akmhoque53353462014-04-22 08:43:45 -0500145}
146
akmhoque53353462014-04-22 08:43:45 -0500147bool
akmhoquefdbddb12014-05-02 18:35:19 -0500148CoordinateLsa::isEqualContent(const CoordinateLsa& clsa)
akmhoque53353462014-04-22 08:43:45 -0500149{
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600150 if (clsa.getCorTheta().size() != m_angles.size()) {
151 return false;
152 }
153
154 std::vector<double> m_angles2 = clsa.getCorTheta();
155 for (unsigned int i = 0; i < clsa.getCorTheta().size(); i++) {
156 if (std::abs(m_angles[i] - m_angles2[i]) > std::numeric_limits<double>::epsilon()) {
157 return false;
158 }
159 }
160
akmhoque53353462014-04-22 08:43:45 -0500161 return (std::abs(m_corRad - clsa.getCorRadius()) <
akmhoque53353462014-04-22 08:43:45 -0500162 std::numeric_limits<double>::epsilon());
163}
164
Nick Gordone98480b2017-05-24 11:23:03 -0500165std::string
Nick Gordonfaf49f42017-10-23 12:36:28 -0500166CoordinateLsa::serialize() const
akmhoque53353462014-04-22 08:43:45 -0500167{
Nick Gordonadad2492017-05-25 10:53:07 -0500168 std::ostringstream os;
Nick Gordonfaf49f42017-10-23 12:36:28 -0500169 os << getData() << m_corRad << "|" << m_angles.size() << "|";
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600170 for (const auto& angle: m_angles) {
171 os << angle << "|";
172 }
Nick Gordonadad2492017-05-25 10:53:07 -0500173 return os.str();
akmhoque53353462014-04-22 08:43:45 -0500174}
175
176bool
akmhoque31d1d4b2014-05-05 22:08:14 -0500177CoordinateLsa::initializeFromContent(const std::string& content)
akmhoque53353462014-04-22 08:43:45 -0500178{
akmhoque31d1d4b2014-05-05 22:08:14 -0500179 boost::char_separator<char> sep("|");
180 boost::tokenizer<boost::char_separator<char> >tokens(content, sep);
181 boost::tokenizer<boost::char_separator<char> >::iterator tok_iter =
182 tokens.begin();
183 m_origRouter = ndn::Name(*tok_iter++);
akmhoque157b0a42014-05-13 00:26:37 -0500184 if (!(m_origRouter.size() > 0)) {
akmhoque53353462014-04-22 08:43:45 -0500185 return false;
186 }
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600187
akmhoque31d1d4b2014-05-05 22:08:14 -0500188 try {
Nick Gordon727d4832017-10-13 18:04:25 -0500189 if (*tok_iter++ != std::to_string(Lsa::Type::COORDINATE)) {
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600190 return false;
191 }
192
akmhoque31d1d4b2014-05-05 22:08:14 -0500193 m_lsSeqNo = boost::lexical_cast<uint32_t>(*tok_iter++);
akmhoquec7a79b22014-05-26 08:06:19 -0500194 m_expirationTimePoint = ndn::time::fromIsoString(*tok_iter++);
akmhoque31d1d4b2014-05-05 22:08:14 -0500195 m_corRad = boost::lexical_cast<double>(*tok_iter++);
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600196 int numAngles = boost::lexical_cast<uint32_t>(*tok_iter++);
197
198 for (int i = 0; i < numAngles; i++) {
199 m_angles.push_back(boost::lexical_cast<double>(*tok_iter++));
200 }
akmhoque53353462014-04-22 08:43:45 -0500201 }
Nick Gordonadad2492017-05-25 10:53:07 -0500202 catch (const std::exception& e) {
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600203 _LOG_ERROR(e.what());
akmhoque53353462014-04-22 08:43:45 -0500204 return false;
205 }
206 return true;
207}
208
akmhoque674b0b12014-05-20 14:33:28 -0500209void
210CoordinateLsa::writeLog()
211{
212 _LOG_DEBUG("Cor Lsa: ");
213 _LOG_DEBUG(" Origination Router: " << m_origRouter);
Nick Gordon727d4832017-10-13 18:04:25 -0500214 _LOG_DEBUG(" Ls Type: " << getType());
akmhoque674b0b12014-05-20 14:33:28 -0500215 _LOG_DEBUG(" Ls Seq No: " << m_lsSeqNo);
akmhoquec7a79b22014-05-26 08:06:19 -0500216 _LOG_DEBUG(" Ls Lifetime: " << m_expirationTimePoint);
akmhoque674b0b12014-05-20 14:33:28 -0500217 _LOG_DEBUG(" Hyperbolic Radius: " << m_corRad);
Muktadir R Chowdhuryb00dc2a2016-11-05 10:48:58 -0600218 int i = 0;
219 for(auto const& value: m_angles) {
220 _LOG_DEBUG(" Hyperbolic Theta " << i++ << ": "<< value);
221 }
akmhoque674b0b12014-05-20 14:33:28 -0500222}
223
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600224AdjLsa::AdjLsa(const ndn::Name& origR, uint32_t lsn,
akmhoquec7a79b22014-05-26 08:06:19 -0500225 const ndn::time::system_clock::TimePoint& lt,
akmhoquefdbddb12014-05-02 18:35:19 -0500226 uint32_t nl , AdjacencyList& adl)
akmhoque53353462014-04-22 08:43:45 -0500227{
228 m_origRouter = origR;
akmhoque53353462014-04-22 08:43:45 -0500229 m_lsSeqNo = lsn;
akmhoquec7a79b22014-05-26 08:06:19 -0500230 m_expirationTimePoint = lt;
akmhoque53353462014-04-22 08:43:45 -0500231 m_noLink = nl;
akmhoquec8a10f72014-04-25 18:42:55 -0500232 std::list<Adjacent> al = adl.getAdjList();
akmhoque157b0a42014-05-13 00:26:37 -0500233 for (std::list<Adjacent>::iterator it = al.begin(); it != al.end(); it++) {
Vince Lehmancb76ade2014-08-28 21:24:41 -0500234 if (it->getStatus() == Adjacent::STATUS_ACTIVE) {
akmhoque53353462014-04-22 08:43:45 -0500235 addAdjacent((*it));
236 }
237 }
238}
239
akmhoque53353462014-04-22 08:43:45 -0500240bool
akmhoquefdbddb12014-05-02 18:35:19 -0500241AdjLsa::isEqualContent(AdjLsa& alsa)
akmhoque53353462014-04-22 08:43:45 -0500242{
akmhoquefdbddb12014-05-02 18:35:19 -0500243 return m_adl == alsa.getAdl();
akmhoque53353462014-04-22 08:43:45 -0500244}
245
Nick Gordone98480b2017-05-24 11:23:03 -0500246std::string
Nick Gordonfaf49f42017-10-23 12:36:28 -0500247AdjLsa::serialize() const
akmhoque53353462014-04-22 08:43:45 -0500248{
Nick Gordonadad2492017-05-25 10:53:07 -0500249 std::ostringstream os;
Nick Gordonfaf49f42017-10-23 12:36:28 -0500250 os << getData() << m_adl.size();
Nick Gordonadad2492017-05-25 10:53:07 -0500251 for (const auto& adjacent : m_adl.getAdjList()) {
Nick Gordone9733ed2017-04-26 10:48:39 -0500252 os << "|" << adjacent.getName() << "|" << adjacent.getFaceUri()
Nick Gordonadad2492017-05-25 10:53:07 -0500253 << "|" << adjacent.getLinkCost();
akmhoque53353462014-04-22 08:43:45 -0500254 }
Nick Gordonadad2492017-05-25 10:53:07 -0500255 os << "|";
256 return os.str();
akmhoque53353462014-04-22 08:43:45 -0500257}
258
259bool
akmhoque31d1d4b2014-05-05 22:08:14 -0500260AdjLsa::initializeFromContent(const std::string& content)
akmhoque53353462014-04-22 08:43:45 -0500261{
262 uint32_t numLink = 0;
akmhoque31d1d4b2014-05-05 22:08:14 -0500263 boost::char_separator<char> sep("|");
264 boost::tokenizer<boost::char_separator<char> >tokens(content, sep);
265 boost::tokenizer<boost::char_separator<char> >::iterator tok_iter =
266 tokens.begin();
267 m_origRouter = ndn::Name(*tok_iter++);
akmhoque157b0a42014-05-13 00:26:37 -0500268 if (!(m_origRouter.size() > 0)) {
akmhoque53353462014-04-22 08:43:45 -0500269 return false;
270 }
akmhoque31d1d4b2014-05-05 22:08:14 -0500271 try {
Nick Gordon727d4832017-10-13 18:04:25 -0500272 if (*tok_iter++ != std::to_string(Lsa::Type::ADJACENCY)) {
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600273 return false;
274 }
275
akmhoque31d1d4b2014-05-05 22:08:14 -0500276 m_lsSeqNo = boost::lexical_cast<uint32_t>(*tok_iter++);
akmhoquec7a79b22014-05-26 08:06:19 -0500277 m_expirationTimePoint = ndn::time::fromIsoString(*tok_iter++);
akmhoque31d1d4b2014-05-05 22:08:14 -0500278 numLink = boost::lexical_cast<uint32_t>(*tok_iter++);
akmhoque53353462014-04-22 08:43:45 -0500279 }
Nick Gordonadad2492017-05-25 10:53:07 -0500280 catch (const std::exception& e) {
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600281 _LOG_ERROR(e.what());
akmhoque53353462014-04-22 08:43:45 -0500282 return false;
283 }
akmhoque157b0a42014-05-13 00:26:37 -0500284 for (uint32_t i = 0; i < numLink; i++) {
akmhoque31d1d4b2014-05-05 22:08:14 -0500285 try {
akmhoque778f81b2014-06-27 10:07:56 -0500286 ndn::Name adjName(*tok_iter++);
akmhoque157b0a42014-05-13 00:26:37 -0500287 std::string connectingFaceUri(*tok_iter++);
akmhoque31d1d4b2014-05-05 22:08:14 -0500288 double linkCost = boost::lexical_cast<double>(*tok_iter++);
Nick Gordone9733ed2017-04-26 10:48:39 -0500289 Adjacent adjacent(adjName, ndn::util::FaceUri(connectingFaceUri), linkCost,
290 Adjacent::STATUS_INACTIVE, 0, 0);
akmhoque53353462014-04-22 08:43:45 -0500291 addAdjacent(adjacent);
292 }
Nick Gordonadad2492017-05-25 10:53:07 -0500293 catch (const std::exception& e) {
Ashlesh Gawanded02c3882015-12-29 16:02:51 -0600294 _LOG_ERROR(e.what());
akmhoque53353462014-04-22 08:43:45 -0500295 return false;
296 }
297 }
298 return true;
299}
300
akmhoque53353462014-04-22 08:43:45 -0500301void
302AdjLsa::addNptEntries(Nlsr& pnlsr)
303{
Nick G97e34942016-07-11 14:46:27 -0500304 // Only add NPT entries if this is an adj LSA from another router.
akmhoque157b0a42014-05-13 00:26:37 -0500305 if (getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix()) {
Nick G97e34942016-07-11 14:46:27 -0500306 // Pass the originating router as both the name to register and
307 // where it came from.
akmhoque31d1d4b2014-05-05 22:08:14 -0500308 pnlsr.getNamePrefixTable().addEntry(getOrigRouter(), getOrigRouter());
akmhoque53353462014-04-22 08:43:45 -0500309 }
310}
311
312
313void
314AdjLsa::removeNptEntries(Nlsr& pnlsr)
315{
akmhoque157b0a42014-05-13 00:26:37 -0500316 if (getOrigRouter() != pnlsr.getConfParameter().getRouterPrefix()) {
akmhoque31d1d4b2014-05-05 22:08:14 -0500317 pnlsr.getNamePrefixTable().removeEntry(getOrigRouter(), getOrigRouter());
akmhoque53353462014-04-22 08:43:45 -0500318 }
319}
320
akmhoque674b0b12014-05-20 14:33:28 -0500321void
322AdjLsa::writeLog()
323{
alvydce3f182015-04-09 11:23:30 -0500324 _LOG_DEBUG(*this);
akmhoque53353462014-04-22 08:43:45 -0500325}
326
alvydce3f182015-04-09 11:23:30 -0500327std::ostream&
328operator<<(std::ostream& os, const AdjLsa& adjLsa)
329{
330 os << "Adj Lsa:\n"
331 << " Origination Router: " << adjLsa.getOrigRouter() << "\n"
Nick Gordon727d4832017-10-13 18:04:25 -0500332 << " Ls Type: " << adjLsa.getType() << "\n"
alvydce3f182015-04-09 11:23:30 -0500333 << " Ls Seq No: " << adjLsa.getLsSeqNo() << "\n"
334 << " Ls Lifetime: " << adjLsa.getExpirationTimePoint() << "\n"
335 << " Adjacents: \n";
336
337 int adjacencyIndex = 1;
338
339 for (const Adjacent& adjacency : adjLsa) {
340 os << " Adjacent " << adjacencyIndex++ << ":\n"
341 << " Adjacent Name: " << adjacency.getName() << "\n"
Nick Gordone9733ed2017-04-26 10:48:39 -0500342 << " Connecting FaceUri: " << adjacency.getFaceUri() << "\n"
alvydce3f182015-04-09 11:23:30 -0500343 << " Link Cost: " << adjacency.getLinkCost() << "\n";
344 }
345 os << "adj_lsa_end";
346
347 return os;
348}
349
Nick Gordon727d4832017-10-13 18:04:25 -0500350std::ostream&
351operator<<(std::ostream& os, const Lsa::Type& type)
352{
353 os << std::to_string(type);
354 return os;
355}
356
357std::istream&
358operator>>(std::istream& is, Lsa::Type& type)
359{
360 std::string typeString;
361 is >> typeString;
362 if (typeString == "ADJACENCY") {
363 type = Lsa::Type::ADJACENCY;
364 }
365 else if (typeString == "COORDINATE") {
366 type = Lsa::Type::COORDINATE;
367 }
368 else if (typeString == "NAME") {
369 type = Lsa::Type::NAME;
370 }
371 else {
372 type = Lsa::Type::BASE;
373 }
374 return is;
375}
376
alvydce3f182015-04-09 11:23:30 -0500377} // namespace nlsr
Nick Gordon727d4832017-10-13 18:04:25 -0500378
379namespace std {
380std::string
381to_string(const nlsr::Lsa::Type& type)
382{
383 switch (type) {
384 case nlsr::Lsa::Type::ADJACENCY:
385 return "ADJACENCY";
386 case nlsr::Lsa::Type::COORDINATE:
387 return "COORDINATE";
388 case nlsr::Lsa::Type::NAME:
389 return "NAME";
Nick Gordon9212bd42017-10-23 10:59:38 -0500390 case nlsr::Lsa::Type::MOCK:
391 return "MOCK";
Nick Gordon727d4832017-10-13 18:04:25 -0500392 default:
393 return "BASE";
394 }
395}
396
397} // namespace std