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

Re: [ns] 12ms




send_packet(..) {
  ..
  PacketData* data = (PacketData *)pkt->userdata();
  total_bytes_ += data->size();   //culprit line
  ..
}

The program was segment faulting within the "culprit" line. Once I removed
it, everything works fine. But this doesn't explain the seg fault. 

Platform:
Linux  2.2.12-20smp #1 SMP Mon Sep 27 10:34:45 EDT 1999 i686 unknown

NS Version:
2.1b6

Thanks,
Apu

> On Wed, 2 Aug 2000, Apu Kapadia wrote:
> 
> > I haven't been getting responses to this problem, and I believe this is
> > important. 
> > 
> > 12ms seems to be an important time interval in NS. Whenever I try to run
> > simulations with a granularity of under 12ms (for example, timers that
> > trigger event every x microseconds), I get segmentation faults. Also, I
> > noticed that when TCP sent data as fast as possible, the time between two
> > sends was 12ms. 
> > 
> > Is this an NS quirk?
> 
> Please post an example script and describe your platform.
> 
> Here's the ns satellite code executing events every tenth of a
> millisecond using $cbr0 set interval_ 0.0001:
> 
> + 522.0030 66 26 cbr 210 ------- 0 66.0 67.0 0 0 37.90 -122.30 17.87
> -120.14
> - 522.0030 66 26 cbr 210 ------- 0 66.0 67.0 0 0 37.90 -122.30 17.87
> -120.14
> + 522.0031 66 26 cbr 210 ------- 0 66.0 67.0 1 1 37.90 -122.30 17.87
> -120.14
> - 522.0032 66 26 cbr 210 ------- 0 66.0 67.0 1 1 37.90 -122.30 17.87
> -120.14
> 
> L.
> 
> <[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
>