From f8481b70eb437cfb81d0eddc8583e4d3b8aeb895 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 14 Sep 2014 17:57:47 -0400 Subject: [PATCH] check MTU of remote router --- RouterInfo.cpp | 4 ++++ RouterInfo.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/RouterInfo.cpp b/RouterInfo.cpp index b951db6c..675947eb 100644 --- a/RouterInfo.cpp +++ b/RouterInfo.cpp @@ -133,6 +133,8 @@ namespace data address.transportStyle = eTransportSSU; else address.transportStyle = eTransportUnknown; + address.port = 0; + address.mtu = 0; uint16_t size, r = 0; s.read ((char *)&size, sizeof (size)); size = be16toh (size); @@ -164,6 +166,8 @@ namespace data } else if (!strcmp (key, "port")) address.port = boost::lexical_cast(value); + else if (!strcmp (key, "mtu")) + address.mtu = boost::lexical_cast(value); else if (!strcmp (key, "key")) Base64ToByteStream (value, strlen (value), address.key, 32); else if (!strcmp (key, "caps")) diff --git a/RouterInfo.h b/RouterInfo.h index 8959186c..3ea77df0 100644 --- a/RouterInfo.h +++ b/RouterInfo.h @@ -69,7 +69,7 @@ namespace data { TransportStyle transportStyle; boost::asio::ip::address host; - int port; + int port, mtu; uint64_t date; uint8_t cost; // SSU only