Handling UDP packets
Juan Luis Baptiste
juancho at linuxmail.org
Mon Nov 4 04:38:06 EST 2002
Hi,
When handling UDP packets, how I get to the packets contents? I'm doing it like this, but I'm getting the wrong values:
const click_ip6 *ip6h = p->ip6_header();
// const click_udp *udph = (click_udp *)(ip6h + 1);
const click_udp *udph = p->udp_header();
const unsigned char *data = (unsigned char *)udph + udph->uh_ulen;
unsigned len = p->length() - p->ip6_header_offset();
Any ideas? or where can I find an example where to look how to handle data in udp packets?
As always, thanks!
Juan Luis Baptiste M.
--
Powered by Outblaze
More information about the click
mailing list