19 #include "UiSetPair.h"
54 enum statusType { UP, DOWN, BOOTING };
107 bool getIfLinks(
int,
int,pair<int,int>&)
const;
190 static int const UNDEF_LAT = 91;
191 static int const UNDEF_LONG = 361;
335 map<string,int>::iterator p =
nameNodeMap->find(s);
336 return ((p !=
nameNodeMap->end()) ? p->second : 0);
345 map<fAdr_t,int>::iterator p =
adrNodeMap->find(adr);
346 return ((p !=
adrNodeMap->end()) ? p->second : 0);
355 (
isRouter(n) ? rtr[n].nType : Forest::UNDEF_NODE));
369 (*nameNodeMap)[nam] = n;
383 (*adrNodeMap)[adr] = n;
397 rtr[n].
latitude = (int) 1000000*loc.first;
398 rtr[n].
longitude = (
int) 1000000*loc.second;
409 else rtr[n].
status = status;
420 return (n <= maxRtr ? 0 : leaves->isIn(n -
maxRtr));
440 return (nxt != 0 ?
maxRtr + nxt : 0);
481 return isRouter(r) && (1 <= iface && iface <= rtr[r].
numIf &&
529 return (
isRouter(r) ? rtr[r].numIf : 0);
560 loc.first = rtr[n].
latitude/1000000.0;
572 else return rtr[n].
status;
582 return (
validIf(n,iface) ? rtr[n].iface[iface].ipAdr : 0);
592 return (
validIf(n,iface) ? rtr[n].iface[iface].port : 0);
611 if (!
validIf(r,iface))
return false;
649 if (!
validIf(r,iface))
return false;
687 return netTopo->validEdge(lnk);
778 return ((lnk != 0 &&
isRouter(r)) ? link[lnk].leftLnum : 0);
789 return ((lnk != 0 &&
isRouter(r)) ? link[lnk].rightLnum : 0);
797 return (
validLink(lnk) ? link[lnk].nonce : 0);
805 return link[lnk].
rates;
875 link[lnk].
nonce = nonce;
917 return (uint64_t(r) << 32) | (uint64_t(llnk) & 0xffffffff);