NLSR - (Hello Protocol + FIB Update)
diff --git a/src/nlsr_adjacent.hpp b/src/nlsr_adjacent.hpp
index 8d97db6..23f334c 100644
--- a/src/nlsr_adjacent.hpp
+++ b/src/nlsr_adjacent.hpp
@@ -4,93 +4,93 @@
namespace nlsr
{
- using namespace std;
+ using namespace std;
- class Adjacent
+ class Adjacent
+ {
+
+ public:
+ Adjacent()
+ :adjacentName()
+ ,connectingFace(0)
+ ,linkCost(10.0)
+ ,status(0)
+ ,interestTimedOutNo(0)
{
+ }
- public:
- Adjacent()
- :adjacentName()
- ,connectingFace(0)
- ,linkCost(10.0)
- ,status(0)
- ,interestTimedOutNo(0)
- {
- }
+ Adjacent(const string& an)
+ :connectingFace(0)
+ ,linkCost(0.0)
+ ,status(0)
+ ,interestTimedOutNo(0)
+ {
+ adjacentName=an;
+ }
- Adjacent(const string& an)
- :connectingFace(0)
- ,linkCost(0.0)
- ,status(0)
- ,interestTimedOutNo(0)
- {
- adjacentName=an;
- }
+ Adjacent(const string& an, int cf, double lc, int s, int iton);
- Adjacent(const string& an, int cf, double lc, int s, int iton);
+ string getAdjacentName()
+ {
+ return adjacentName;
+ }
- string getAdjacentName()
- {
- return adjacentName;
- }
+ void setAdjacentName(const string& an)
+ {
+ adjacentName=an;
+ }
- void setAdjacentName(const string& an)
- {
- adjacentName=an;
- }
+ int getConnectingFace()
+ {
+ return connectingFace;
+ }
- int getConnectingFace()
- {
- return connectingFace;
- }
+ void setConnectingFace(int cf)
+ {
+ connectingFace=cf;
+ }
- void setConnectingFace(int cf)
- {
- connectingFace=cf;
- }
+ double getLinkCost()
+ {
+ return linkCost;
+ }
- double getLinkCost()
- {
- return linkCost;
- }
+ void setLinkCost(double lc)
+ {
+ linkCost=lc;
+ }
- void setLinkCost(double lc)
- {
- linkCost=lc;
- }
+ int getStatus()
+ {
+ return status;
+ }
- int getStatus()
- {
- return status;
- }
+ void setStatus(int s)
+ {
+ status=s;
+ }
- void setStatus(int s)
- {
- status=s;
- }
+ int getInterestTimedOutNo()
+ {
+ return interestTimedOutNo;
+ }
- int getInterestTimedOutNo()
- {
- return interestTimedOutNo;
- }
+ void setInterestTimedOutNo(int iton)
+ {
+ interestTimedOutNo=iton;
+ }
- void setInterestTimedOutNo(int iton)
- {
- interestTimedOutNo=iton;
- }
+ bool isAdjacentEqual(Adjacent& adj);
+ private:
+ string adjacentName;
+ int connectingFace;
+ double linkCost;
+ int status;
+ int interestTimedOutNo;
+ };
- bool isAdjacentEqual(Adjacent& adj);
- private:
- string adjacentName;
- int connectingFace;
- double linkCost;
- int status;
- int interestTimedOutNo;
- };
-
- std::ostream&
- operator << (std::ostream &os, Adjacent &adj);
+ std::ostream&
+ operator << (std::ostream &os, Adjacent &adj);
} // namespace nlsr