[Click] A new question

Beyers Cronje bcronje at gmail.com
Wed Aug 8 10:48:00 EDT 2007


Hi,

Please forward questions to the Click mailing list in the future, that's why
it's there for.

To answer your question. It seems that Click does not assign the ethernet
header annotation automatically, arpquerier and arpresponder does though.

So to get a pointer to your ethernet header just cast from p->data(), given
you have not used Strip before your element.

See EtherMirror source for an example.

Beyers



On 8/8/07, Muddassir Khan <muddassir.khan at gmail.com> wrote:
>
> hello
>
> sorry for botherin u again
>
> i made an element which accepts a packet and then i make a writablepacket
> out of it
>
> writablePacket * p;
> struct click_ether * eth_h;
> p = p_in->uniqueify;
>
> eth_h = p->ether_header();
>
> assert(eth_h);
>
> and then iget error at the assert. can  u explain y i cant get the
> ether_header into the struct click_ether.
>
> thanks alot
>
>


More information about the click mailing list