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

[ns] POINTER PROBLEM (fwd)



hi,
  i had sent this mail earlier but didn't realise that i wasn't on the
mailing list anymore. so if someone did have any suggestions could u
please mail again. 
thanks,
Shailesh Sheoran
M.ASc. 
Department of Electrical Engineering
University of British Columbia

---------- Forwarded message ----------
Date: Thu, 22 Feb 2001 19:52:51 -0800 (PST)
From: shailesh sheoran <shailesh@shannon.ece.ubc.ca>
To: ns-users@ISI.EDU
Subject: POINTER PROBLEM

Hi,
  i am having a really peculiar problem with my peculiar design.
This is what i am doing:
  IN the emulation mode, when a packet comes in , i created two copies of
it : a timer and a bufferable packet, and send them in addition to the
original packet to the link layer.
  The link layer then shedules the packet "TIMER" for a later time and
stores the packet type "BUFFER" into a local (local to link layer) array
of pointers.
  However when the next packet comes in , it sometimes writes on to one of
the pointers the link layer is supposed to have in its array. i.e. it
uses up the memory space already occupied by the array of pointers in
the link layer. As a result i loose the buffered packet.

  Could some please please tell me why my tap agent overwrites the pointer
array in Link Layer? Shouldn't the pointers being used by the link layer
be somehow 'protected' so no one else can use them until they are
'freed'?
  This think is bugging the hell out of me, so could someone please help
Thanks,
Shailesh Sheoran
M.ASc. 
Department of Electrical Engineering
University of British Columbia