In C, if I want to parse a UDP packet, I need to build my own offsets into data based off constants in:
net/ethernet.h
netinet/udp.h

Things like:

#define PACKET_DATA_OFFSET_DEFAULT (
     ETHER_HDR_LEN + sizeof(struct iphdr) + \
     sizeof(struct udphdr))

That would be easy to port to D, if I had access to those structs and defines, but it doesn't seem like these have been ported over. Am I missing something obvious?

Thanks.

--
Matthew Caron, Software Build Engineer
Sixnet, a Red Lion business | www.sixnet.com
+1 (518) 877-5173 x138 office

Reply via email to