Beyers, Good point! I was also able to get rid of a bunch of casts for the same reason. This is now checked in. And in writing this message, it occurred to me that the sizeof(click_ip) was also a problem, so I fixed that as well.
Thanks, Cliff On Thu, Sep 30, 2010 at 4:08 AM, Beyers Cronje <[email protected]> wrote: > Hi Cliff, > > A small comment from my side, it does not seem that the element takes ip > header options in consideration when gaining a pointer to the tcp header. > I would change: > > const click_tcp *tcp = reinterpret_cast<const click_tcp *>(ip + 1); > > To: > > const click_tcp *tcp = p->tcp_header(); > > This ensures accurate offset to the tcp header even when ip options are > present. > > Beyers > > > On Thu, Sep 30, 2010 at 2:29 AM, Cliff Frey <[email protected]> wrote: > >> I am planning on adding this element to click. If anyone has any >> comments/feedback on it, let me know. >> >> Cliff >> >> _______________________________________________ >> click mailing list >> [email protected] >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click >> >> > _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
