[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CBR packet



> void CBR_Burst_Traffic::timeout()
> {
>         if (! running_)
>                 return;
> 
>         /* send a packet */
>         // The test tcl/ex/test-rcvr.tcl relies on the "NEW_BURST" flag
> being 
>         // set at the start of any exponential burst ("talkspurt").  
>         if (Burst_ == 0) 
>                 agent_->sendmsg(size_, "NEW_BURST");
>         else 
>                 agent_->sendmsg(size_);
> 
>         /* figure out when to send the next one */
>         nextPkttime_ = next_interval(size_);
>         /* schedule it */
>         if (nextPkttime_ > 0)
>                 timer_.resched(nextPkttime_);
> }
> 
> to mark the first packet of a burst. (I don't know if this function
> really do that?)

For this special purpose it'll work fine. 

> However I am not able to check in my OTcl program when I recieve a
> packet with the NEW_BURST flag.

One way is to modify udp.cc and add a recv() function so that it checks
the RTP_M flag. If it's true it'll call some global tcl function. 

- Haobo