ns-allinone-2.35/satellite/sathandoff.cc
SatLinkHead* LinkHandoffMgr::get_peer_next_linkhead(SatNode* np)
{
	LinkHead* lhp;
	SatLinkHead* slhp;
	for (lhp = np->linklisthead().lh_first; lhp; 
	    lhp = lhp->nextlinkhead() ) {
		slhp = (SatLinkHead*) lhp;
		if (slhp->type() == LINK_ISL_CROSSSEAM) {
			if (!slhp->phy_tx()->channel() && 
			    !slhp->phy_rx()->channel() ) 
				return slhp;
		}
	}
	printf("Error, couldn't find an empty crossseam stack for handoff\n");
	return 0;
}
// Each crossseam satellite will have two net stacks-- at most one will
// be occupied.  This procedure finds an unoccupied stack on the node.
Each crossseam satellite will have two net stacks-- at most one will
be occupied.  This procedure finds an unoccupied stack on the node.
Each crossseam satellite will have two net stacks -- at most one will be occupied . This procedure finds an unoccupied stack on the node .
SatLinkHead* LinkHandoffMgr::get_peer_next_linkhead(SatNode* np)
{
	LinkHead* lhp;
	SatLinkHead* slhp;
	for (lhp = np->linklisthead().lh_first; lhp; 
	    lhp = lhp->nextlinkhead() ) {
		slhp = (SatLinkHead*) lhp;
		if (slhp->type() == LINK_ISL_CROSSSEAM) {
			if (!slhp->phy_tx()->channel() && 
			    !slhp->phy_rx()->channel() ) 
				return slhp;
		}
	}
	printf("Error, couldn't find an empty crossseam stack for handoff\n");
	return 0;
}
SatLinkHead * LinkHandoffMgr :: get_peer_next_linkhead ( SatNode * np ) { LinkHead * lhp ; SatLinkHead * slhp ; for ( lhp = np -> linklisthead ( ) . lh_first ; lhp ; lhp = lhp -> nextlinkhead ( ) ) { slhp = ( SatLinkHead * ) lhp ; if ( slhp -> type ( ) == LINK_ISL_CROSSSEAM ) { if ( ! slhp -> phy_tx ( ) -> channel ( ) && ! slhp -> phy_rx ( ) -> channel ( ) ) return slhp ; } } printf ( " \n " ) ; return 0 ; }
Each crossseam satellite will have two net stacks-- at most one will
be occupied.
Each crossseam satellite will have two net stacks -- at most one will be occupied .