ns-allinone-2.35/ns-2.35/mac/mac-multihop.cc
void MultihopMac::send(Packet *p)
{
	Scheduler& s = Scheduler::instance();
	if (mode_ != MAC_SND)
		return;

	double txt = txtime(p);
	hdr_mac::access(p)->txtime() = txt;
	channel_->send(p, txt); // target is peer's mac handler
	s.schedule(callback_, &intr_, txt); // callback to higher layer (LL)
	mode_ = MAC_IDLE;
}
/*
 * Actually send the data frame.
 */
Actually send the data frame.
Actually send the data frame .
void MultihopMac::send(Packet *p)
{
	Scheduler& s = Scheduler::instance();
	if (mode_ != MAC_SND)
		return;
	double txt = txtime(p);
	hdr_mac::access(p)->txtime() = txt;
	channel_->send(p, txt); 
	s.schedule(callback_, &intr_, txt); 
	mode_ = MAC_IDLE;
}
void MultihopMac :: send ( Packet * p ) { Scheduler & s = Scheduler :: instance ( ) ; if ( mode_ != MAC_SND ) return ; double txt = txtime ( p ) ; hdr_mac :: access ( p ) -> txtime ( ) = txt ; channel_ -> send ( p , txt ) ; s . schedule ( callback_ , & intr_ , txt ) ; mode_ = MAC_IDLE ; }
Actually send the data frame.
Actually send the data frame .
// target is peer's mac handler // callback to higher layer (LL)