15 map =
new HashMap<uint64_t,Entry,Hash::u64>(
maxLnk,
false);
47 if (lnk == 0) lnk =
map->put(nonce,e);
48 else lnk =
map->put(nonce,e,lnk);
60 if (!
valid(lnk))
return false;
63 if (
map->find(e.
nonce) != lnk)
return false;
64 if (!
map->rekey(lnk,
hashkey(peerIp,peerPort)))
return false;
74 if (!
valid(lnk))
return false;
88 if (!
valid(lnk))
return;
92 if (adr != 0)
padrMap->insert(adr,lnk);
101 if (!
valid(lnk))
return false;
131 ipa_t peerIp;
int peerPort;
136 if ( !Util::readInt(in,lnk) ||
137 !Util::readInt(in,iface) ||
139 !Util::readInt(in,peerPort) ||
140 !Util::readWord(in,typStr) ||
147 peerType = Forest::getNodeType(typStr);
148 if (peerType == Forest::UNDEF_NODE)
return 0;
150 if (!
addEntry(lnk,peerIp,peerPort,0))
return 0;
175 if (!Util::readInt(in,num))
return false;
177 for (
int i = 1; i <= num; i++) {
179 cerr <<
"LinkTable::read: could not read "
180 << i <<
"-th table entry" << endl;
193 if (!
valid(lnk)) {
return ""; }
195 ss << setw(5) << right << lnk;
206 ss <<
map->size() << endl;
207 ss <<
"# link iface peerIp:port peerType peerAdr ";
208 ss <<
" rates avail rates comtree count\n";