10 #define COMTREETABLE_H
46 bool isLink(
int,
int)
const;
67 pktx getPrunePkt(
int)
const;
81 bool addLink(
int,
int,
bool,
bool);
89 void setUpperBoundRates(
int, RateSpec&);
94 void cleanPktNums(
int);
139 string& links2string(
int,
string&)
const;
164 return clMap->validId(cLnk);
180 return clMap->validKey(
key(tbl[ctx].comt,lnk));
198 if (cLnk == 0)
return false;
200 return (rl.find(cLnk) != rl.end());
218 if (cLnk == 0)
return false;
220 return (cl.find(cLnk) != cl.end());
229 return (tbl[ctx].lock == 1);
232 inline pktx ComtreeTable::getPrunePkt(
int ctx)
const {
234 return tbl[ctx].
ppkt;
262 return tbl[ctx].
comt;
288 int cLnk =
clMap->getId(
key(comt,lnk));
321 return (cLnk != 0 ?
clTbl[cLnk].lnk : 0);
397 inline void ComtreeTable::cleanPktNums(
int ctx) {
424 int cLnk =
clMap->getId(
key(tbl[ctx].comt,plink));
427 tbl[ctx].
plnk = plink; tbl[ctx].
pCLnk =cLnk;
430 inline void ComtreeTable::setUpperBoundRates(
int ctx, RateSpec& rs) {
441 if (tbl[ctx].lock != lock) {
442 tbl[ctx].
lock = lock;
516 vector<pktx>::iterator pn;
517 for (pn = tbl[ctx].pktNums->begin(); pn != tbl[ctx].
pktNums->end(); pn++) {
522 tbl[ctx].
pktNums->push_back(px);
548 return (uint64_t(comt) << 32) | comt;
557 return (uint64_t(comt) << 32) | lnk;