encoding: replace the route origin selflearning with prefixann
refs: #4280
Change-Id: I9db6b92f681650c21e82251f17f03f4ae2834b24
diff --git a/src/encoding/nfd-constants.cpp b/src/encoding/nfd-constants.cpp
index eebd4f3..1b4e1ef 100644
--- a/src/encoding/nfd-constants.cpp
+++ b/src/encoding/nfd-constants.cpp
@@ -115,8 +115,8 @@
routeOrigin = ROUTE_ORIGIN_AUTOCONF;
else if (iequals(s, "nlsr"))
routeOrigin = ROUTE_ORIGIN_NLSR;
- else if (iequals(s, "selflearning"))
- routeOrigin = ROUTE_ORIGIN_SELFLEARNING;
+ else if (iequals(s, "prefixann"))
+ routeOrigin = ROUTE_ORIGIN_PREFIXANN;
else if (iequals(s, "static"))
routeOrigin = ROUTE_ORIGIN_STATIC;
else {
@@ -160,8 +160,8 @@
return os << "autoconf";
case ROUTE_ORIGIN_NLSR:
return os << "nlsr";
- case ROUTE_ORIGIN_SELFLEARNING:
- return os << "selflearning";
+ case ROUTE_ORIGIN_PREFIXANN:
+ return os << "prefixann";
case ROUTE_ORIGIN_STATIC:
return os << "static";
}
diff --git a/src/encoding/nfd-constants.hpp b/src/encoding/nfd-constants.hpp
index 6cc2c59..0ec923d 100644
--- a/src/encoding/nfd-constants.hpp
+++ b/src/encoding/nfd-constants.hpp
@@ -103,7 +103,7 @@
ROUTE_ORIGIN_CLIENT = 65,
ROUTE_ORIGIN_AUTOCONF = 66,
ROUTE_ORIGIN_NLSR = 128,
- ROUTE_ORIGIN_SELFLEARNING = 129,
+ ROUTE_ORIGIN_PREFIXANN = 129,
ROUTE_ORIGIN_STATIC = 255,
};
diff --git a/tests/unit-tests/encoding/nfd-constants.t.cpp b/tests/unit-tests/encoding/nfd-constants.t.cpp
index c2149a1..af9997b 100644
--- a/tests/unit-tests/encoding/nfd-constants.t.cpp
+++ b/tests/unit-tests/encoding/nfd-constants.t.cpp
@@ -96,7 +96,7 @@
expectSuccess("Client", ROUTE_ORIGIN_CLIENT);
expectSuccess("AutoConf", ROUTE_ORIGIN_AUTOCONF);
expectSuccess("NLSR", ROUTE_ORIGIN_NLSR);
- expectSuccess("SelfLearning", ROUTE_ORIGIN_SELFLEARNING);
+ expectSuccess("PrefixAnn", ROUTE_ORIGIN_PREFIXANN);
expectSuccess("static", ROUTE_ORIGIN_STATIC);
expectSuccess("27", static_cast<RouteOrigin>(27));
@@ -119,7 +119,7 @@
BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(ROUTE_ORIGIN_CLIENT), "client");
BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(ROUTE_ORIGIN_AUTOCONF), "autoconf");
BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(ROUTE_ORIGIN_NLSR), "nlsr");
- BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(ROUTE_ORIGIN_SELFLEARNING), "selflearning");
+ BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(ROUTE_ORIGIN_PREFIXANN), "prefixann");
BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(ROUTE_ORIGIN_STATIC), "static");
BOOST_CHECK_EQUAL(boost::lexical_cast<std::string>(static_cast<RouteOrigin>(27)), "27");
}