19 : maxRtx(maxRtx1),
myAdr(myAdr1), ctt(ctt1) {
20 rteMap =
new HashMap<uint64_t,Vset,Hash::u64>(
maxRtx,
false);
21 clMap =
new HashMap<uint64_t,Vset,Hash::u64>(
maxRtx,
false);
38 if (rtx == 0)
return 0;
39 if (cLnk == 0)
return rtx;
40 rteMap->getValue(rtx).insert(cLnk);
42 uint64_t kee =
cmKey(comt,cLnk);
43 int x = clMap->find(kee);
46 x = clMap->put(kee,new_routes);
48 Vset& routes = clMap->getValue(x);
58 Vset& lset =
rteMap->getValue(rtx);
59 for (
int cLnk = lset.first(); cLnk != 0; cLnk = lset.next(cLnk)) {
61 Vset& routes = clMap->get(kee);
63 if (routes.size() == 0) clMap->remove(kee);
76 uint64_t kee =
cmKey(comt,cLnk);
77 Vset& routes = clMap->get(kee);
78 for (
int rtx = routes.first(); rtx != 0; rtx = routes.next(rtx)) {
79 Vset& lset =
rteMap->getValue(rtx);
104 if (rtx == 0)
return false;
107 if (!Util::readInt(in,lnk)) {
111 if (cLnk == 0)
return false;
113 }
while (Util::verify(in,
','));
115 if (!Util::readInt(in,lnk)) {
120 if (cLnk == 0)
return false;
135 if (!Util::readInt(in,num))
return false;
137 for (
int i = 1; i <= num; i++) {
139 cerr <<
"Error in route table entry # " << i << endl;
155 if (
noLinks(rtx)) { ss <<
"-\n";
return ss.str(); }
156 Vset& lset =
rteMap->getValue(rtx);
157 for (
int cLnk = lset.first(); cLnk != 0; cLnk = lset.next(cLnk)) {
158 if (cLnk != lset.first()) ss <<
",";
172 ss <<
rteMap->size() << endl;