[Click] strange?

Koen Segers KoenSegers at scarlet.be
Tue Dec 27 19:35:39 EST 2005


2 things are quite odd for me. Maybe you could explain me?

1) every time I change the code of one of my elements I need to recompile 
click (ofcourse), but also ns in order to use the latest version in nsclick. 
Is this normal? I run the install script that is located in the ns-allinone 
directory.

2)Do I receive a pointer to the starting address of the ip header when I 
execute p->ip_header() on a packet* p?
When I do ((char *) p->ip_header())+sizeof(click_ip)+sizeof(click_udp)) my 
pointer is 14 digits to low.
((char*)p->ip_header())+sizeof(click_ether)+sizeof(click_ip)+sizeof(click_udp)) 
solved this. But is this usual? I'm sure the packet is a udp/ip packet with 
an ethernet header. Is there a nicer way to do this?
BTW: I did not strip any bytes of the packet yet.

Thanks in advance!

-- 

Koen Segers


More information about the click mailing list