diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-17 16:11:57 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-17 16:11:57 -0400 |
| commit | f9079a110ee8336a8403efe466e2a75620c95ab1 (patch) | |
| tree | 887584d8d1f538f517e1564479697745a1237d90 /netconf-service | |
| parent | 4c06fcfc9dd0ba25ec2c50ce03f10f1d93f168f5 (diff) | |
| download | infinitytier-f9079a110ee8336a8403efe466e2a75620c95ab1.tar.gz infinitytier-f9079a110ee8336a8403efe466e2a75620c95ab1.zip | |
Make network multicast breadth/depth parameters configurable on a per-net basis.
Diffstat (limited to 'netconf-service')
| -rw-r--r-- | netconf-service/netconf.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/netconf-service/netconf.cpp b/netconf-service/netconf.cpp index 6d1736ac..a4f22527 100644 --- a/netconf-service/netconf.cpp +++ b/netconf-service/netconf.cpp @@ -204,15 +204,19 @@ int main(int argc,char **argv) } bool isOpen = false; + unsigned int mcb = 3; + unsigned int mcd = 6; std::string name,desc; { Query q = dbCon->query(); - q << "SELECT name,`desc`,isOpen FROM Network WHERE id = " << nwid; + q << "SELECT name,`desc`,isOpen,multicastPropagationBreadth,multicastPropagationDepth FROM Network WHERE id = " << nwid; StoreQueryResult rs = q.store(); if (rs.num_rows() > 0) { name = rs[0]["name"].c_str(); desc = rs[0]["desc"].c_str(); isOpen = ((int)rs[0]["isOpen"] > 0); + mcb = (unsigned int)rs[0]["multicastPropagationBreadth"]; + mcd = (unsigned int)rs[0]["multicastPropagationDepth"]; } else { Dictionary response; response["peer"] = peerIdentity.address().toString(); @@ -293,6 +297,10 @@ int main(int argc,char **argv) sprintf(buf,"%llx",(unsigned long long)Utils::now()); netconf["ts"] = buf; netconf["peer"] = peerIdentity.address().toString(); + sprintf(buf,"%x",mcb); + netconf["mcb"] = mcb; + sprintf(buf,"%x",mcd); + netconf["mcd"] = mcd; if (!isOpen) { // TODO: handle closed networks, look up private membership, |
