Re: [ns] Disabling ARP protocol for MAC evaluation

2006-11-08 Thread Michael Timmers

first you need to get a tcl reference for the arp-table:

e.g. ($val(nn) = number of nodes in simulation)

for {set i 0} {$i  $val(nn) } { incr i } {
set ll($i) [$node_($i) set ll_(0)]
set arp($i) [$ll($i) get-arptable]
}

then you can put entries in the arp-table.

for {set i 0} {$i  $val(nn) } { incr i } {
for {set j 0} {$j  $val(nn) } { incr j } {
if { $j != $i } then {
$arp($i) putentry_mobile $node_($j) $ll($j)


}
}
}

now you have fixed all the arp-tables.

I hope this helps.

grtz,

Michael


[ns] question concerning mac-timers.cc

2006-11-06 Thread Michael Timmers

Hello,

I am using ns-2.29 and I have a problem where an event is being scheduled
with a positive UID. It only happens in one simulation, but still I would
like to know, because this could also have impact on other results.


Detailed Info:

- Warning

---
 Scheduler: Event UID not valid!
---

  This warning comes from the method Scheduler::schedule(Handler* h, Event*
e, double delay) in /common/scheduler.cc (using CalendarScheduler) when
called from the method DeferTimer::start(double time) in /mac/mac-timers.cc

- Tracing
  I have traced the uid's in DeferTimer::start

 New Event ID = 27242 (given by Scheduler::schedule)
Event ID = -27242 (before calling Scheduler::schedule)
 New Event ID = 27250
Event ID = -27250
 New Event ID = 27282
Event ID = -27282
 New Event ID = 27287
Event ID = -27287
 New Event ID = 27312
Event ID = 27312

  - this is the event causing the warning + abort()
  - we are 12 seconds into simulation
  - normal procedure (i believe):
 * intr.uid_ (the event to be scheduled) is negative, because it has
been dispatched.
 * The scheduler assigns a new (positive and unique) uid to intr.
 * The scheduler dispatches the event and makes the ID negative.

  - because event 27132 seems not to be dispatched, the new event has a
positive ID

Does anybody know in what situation this might happen or how to prevent this
situation, because I cannot tell how mac-timers.cc can make sure that the
'intr' event is always dispatched before scheduling a new event?

Many thanks,

Michael