DTrace IP Provider [PSARC/2008/302 FastTrack timeout 05/07/2008]
Erik Nordmark
erik.nordmark at sun.com
Sun May 11 09:34:20 PDT 2008
Adam,
Overall this looks good. One nit though.
> /*
> * ipinfo contains common IP info for both IPv4 and IPv6.
> */
> typedef struct ipinfo {
> uint8_t ip_ver; /* IP version (4, 6) */
> uint16_t ip_plength; /* payload length */
> string ip_saddr; /* source address */
> string ip_daddr; /* destination address */
> } ipinfo_t;
I don't think "payload length" has a natural definition when trying to
look at what IP actually carries because of the IPv6 extension headers.
For instance, for a 100 byte IPv6 packet with a 8 byte hop-by-hop
options header, a fragment header, and a TCP header, what is the payload
length?
The IPv6 header field for payload length is just 40 less than the size
of the IPv6 packet. But the payload that IP delivers to TCP is less all
the extension headers. And some might think that "payload" refers to the
TCP payload.
Thus I think it would be more clear to have the IP provider expose the
IP packet length instead of payload length.
Sorry for not catching this earlier.
Erik
More information about the opensolaris-arc
mailing list