I just made some progress with this... i still have the problem, but a
better idea where it comes from.  Basically, its that i get a blank packet
of the IFQ... i don't know why?

What is happening is that node 1 is sending a packet to node 0.  Node 0
replies with an Ack to node 1.  Node 1 receives the Ack in Mac802_11::recv
which then schedules the packet to be received in Mac802_11::recv_timer.
This then calls Mac802_11::recvAck and a packet is dequeued from the IFQ...
but this packet that is being dequeued from the IFQ is blank.

So, the MAC layer receives this blank packet... and one of the first things
it checks is the direction it is supposed to be going... usually it should
be DOWN and this then goes off to the send procedure... but because it is
blank it is skipping over the send function and going to the part of the
MAC802_11::recv function that deals with packets with direction UP...
anyways... this leads to a collision and some other stuff and eventually the
pktRx is placed on the calendar and then deleted... so what happens when it
comes off the calendar is that looking at its common header

struct hdr_cmn *hdr = HDR_CMN(pktRx_);

results in a segmentation fault because pktRx is literally stored as
0x00000000 in memory.

The original cause of the problem is this blank packet that comes off the
IFQ?

On Mon, Mar 8, 2010 at 4:15 PM, Ariel Goldberg <[email protected]>wrote:

> I'm running into a segmentation fault in my simulation.  The essence of the
> problem is that i am putting a packet into the IFQ of a node, but when i
> take the packet off the queue to be processed by the MAC layer... it is
> blank.
>
> When the simulation tries to read the common header of the packet it
> results in a segmentation fault.
>
> Do you have any idea what could be happening to the packet while it is in
> the IFQ... or where this blank packet could be coming from.  I am trying to
> monitor the queue by looking at the packets inserted before and after the
> packet... but i can't really make much sense of it right now.
>
> By looking at the memory addresses of the packets, i thought i would be
> able to track the packets as they are added to the queue from the
> LL::sendDown method in llc.cc and then see them in that order in the queue
> by looking at the next_ variable... but what i have found is that the order
> of the packets in the queue does not correspond to the order of the packets
> that came through llc.cc?
>
> I don't understand this?  Surely all packets in the IFQ must be coming
> through the LL::sendDown method?
>
> Kind Regards
>
> Ariel Goldberg
>
> Mobile: +27 82 998 7122
> Phone: +27 21 940 9757
> Mail: [email protected]
>



-- 
Kind Regards

Ariel Goldberg

Mobile: +27 82 998 7122
Phone: +27 21 940 9757
Mail: [email protected]

Reply via email to