Add try/catch in LFDB and add introspection into multicast subscriptions in client network status API

This commit is contained in:
Adam Ierymenko 2019-08-06 15:22:57 -05:00
parent 6174c0c103
commit 3db0197865
No known key found for this signature in database
GPG key ID: 1657198823E52A61
4 changed files with 87 additions and 28 deletions

View file

@ -273,6 +273,15 @@ static void _networkToJson(nlohmann::json &nj,const ZT_VirtualNetworkConfig *nc,
ra.push_back(rj);
}
nj["routes"] = ra;
nlohmann::json mca = nlohmann::json::array();
for(unsigned int i=0;i<nc->multicastSubscriptionCount;++i) {
nlohmann::json m;
m["mac"] = MAC(nc->multicastSubscriptions[i].mac).toString(tmp);
m["adi"] = nc->multicastSubscriptions[i].adi;
mca.push_back(m);
}
nj["multicastSubscriptions"] = mca;
}
static void _peerToJson(nlohmann::json &pj,const ZT_Peer *peer)