[ns] Fwd: Handoff in Satellite Networks
Rodolpho Iemini Atoji
ratoji at linux.ime.usp.br
Mon Jul 14 22:48:35 PDT 2008
Hello,
I'm trying to build a list of link durations of all interplane ISLs,
by modifying sathandoff.cc.
The idea is to know when a link between two satellites has been
established and when it has been dropped, among all the process of
handoffs.
I've been trying a code like this:
LinkHandoffMgr* changedLink = (...);
SatLinkHead* slhp;
SatNode *peer;
SatNode* node = (SatNode*)changedLink->node();
for (slhp = (SatLinkHead*) node->linklisthead().lh_first;
slhp;
slhp = (SatLinkHead*) slhp->nextlinkhead()) {
peer = changedLink->get_peer(slhp);
if (peer) {
if (slhp->linkup_) {
printf("Link UP between %d and %d at %d\n",
node->address(),
peer->address(), NOW);
} else {
printf("Link DOWN between %d and %d at %d\n",
node->address(),
peer->address(), NOW);
}
}
}
But I'm a little confused about 'if (slhp->linkup_)'.
This checking is done only when exists another node in the link.
Documentation says that linkup_ is TRUE when the link to another node
on the channel is up. But what means linkup_ == FALSE if peer != NULL?
Maybe this is not the correct way to achieve the results I want...
Corrections are welcome.
(I hope this is the correct list for posts like this)
Thanks in advance,
Rodolpho
More information about the Ns-users
mailing list