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

[ns] Order of operation



Hi all,
I've created a new queue type under ns. To do so I have modified <packet.h>
adding a new field: dead_.
I added also, a function to read dead_ and ones to modify this variable. In
my code the enque method is like this..

[...]
  (hdr_cmn *) hdr=(hdr_cmn*)p-> access(off_cmn_);
  hdr->set_label (value);
  q_->enque (p);
[...]

I modified, also, trace.cc adding as last field the contents of dead_ to see
if it assumes the right value.

In out.tr, that is the tracefile, I can see that changes to dead_ occurs at
"-" operation rather then "+" !!!!
Moreover when I new packet is created from source it has the  dead_ value of
the last packet has been created!!
What is wrong in my code? Do I need to make some other changes!! The
selection of packet is made according to
dead_ value...so it is very important that the assignment is made at the
right event!!!


Thanks
@nto