Browse Source

check MTU of remote router

pull/97/head
orignal 10 years ago
parent
commit
f8481b70eb
  1. 4
      RouterInfo.cpp
  2. 2
      RouterInfo.h

4
RouterInfo.cpp

@ -133,6 +133,8 @@ namespace data @@ -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 @@ -164,6 +166,8 @@ namespace data
}
else if (!strcmp (key, "port"))
address.port = boost::lexical_cast<int>(value);
else if (!strcmp (key, "mtu"))
address.mtu = boost::lexical_cast<int>(value);
else if (!strcmp (key, "key"))
Base64ToByteStream (value, strlen (value), address.key, 32);
else if (!strcmp (key, "caps"))

2
RouterInfo.h

@ -69,7 +69,7 @@ namespace data @@ -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

Loading…
Cancel
Save