[Click] Problem with Queue element
Eddie Kohler
kohler at cs.ucla.edu
Mon Apr 3 11:52:13 EDT 2006
Ian,
I think this must be a bug in your element; perhaps it requires an IP header
annotation (by referring to p->ip_header()). The CheckIPHeader element sets
that annotation; if you don't set it, it's null.
Eddie
I.E.Pearce-02 at student.lboro.ac.uk wrote:
> Hi Eddie,
>
> Thanks a lot for the help. That seems to have fixed my problem.
>
> I was wondering if you could tell me why the below configuration returns a
> segmentation fault. I have on purposely made the Queue length small so
> there will be packet drops. When I run this config I get the below results.
>
> ok: 40 | 45000028 00000000 401177c3 01000001 02000002 13691369
> ok: 40 | 45000028 00000000 401177c3 01000001 02000002 13691369
> ok: 40 | 45000028 00000000 401177c3 01000001 02000002 13691369
> ok: 40 | 45000028 00000000 401177c3 01000001 02000002 13691369
> Segmentation fault
>
> But when I remove the Strip and CheckIPHeader elements this segmentation
> fault does not occur. Also if I only use one source and send the same
> amount of packets the segmentation fault does not occur. I have not changed
> these elements in any way. Do you have any idea why this is happening??
>
>
> require(sample);
>
> q1 :: Queue(10)
>
> InfiniteSource(DATA \<00 00 c0 ae 67 ef 00 00 00 00 00
> 00 08 00 45 00 00 28 00 00 00 00 40 11 77 c3 01 00 00 01
> 02 00 00 02 13 69 13 69 00 14 d6 41 55 44 50 20
> 70 61 63 6b 65 74 21 0a>, LIMIT 10, STOP true)
> ->Strip(14)
> ->CheckIPHeader()
> ->q1
>
> InfiniteSource(DATA \<00 00 c0 ae 67 ef 00 00 00 00 00
> 00 08 00 45 00 00 28 00 00 00 00 40 11 77 c3 01 00 00 01
> 02 00 00 02 13 69 13 69 00 14 d6 41 55 44 50 20
> 70 61 63 6b 65 74 21 0a>, LIMIT 10, STOP true)
> ->Strip(14)
> ->CheckIPHeader()
> ->q1
>
> InfiniteSource(DATA \<00 00 c0 ae 67 ef 00 00 00 00 00
> 00 08 00 45 00 00 28 00 00 00 00 40 11 77 c3 01 00 00 01
> 02 00 00 02 13 69 13 69 00 14 d6 41 55 44 50 20
> 70 61 63 6b 65 74 21 0a>, LIMIT 10, STOP true)
> ->Strip(14)
> ->CheckIPHeader()
> ->q1
>
> q1->Print(ok)->Discard;
>
More information about the click
mailing list