ipv4info_t Structure

The ipv4info_t structure is a DTrace translated version of the IPv4 header.

typedef struct ipv4info {
        uint8_t ipv4_ver;               /* IP version (4) */
        uint8_t ipv4_ihl;               /* header length, bytes */
        uint8_t ipv4_tos;               /* type of service field */
        uint16_t ipv4_length;           /* length (header + payload) */
        uint16_t ipv4_ident;            /* identification */
        uint8_t ipv4_flags;             /* IP flags */
        uint16_t ipv4_offset;           /* fragment offset */
        uint8_t ipv4_ttl;               /* time to live */
        uint8_t ipv4_protocol;          /* next level protocol */
        string ipv4_protostr;           /* next level protocol, as a string */
        uint16_t ipv4_checksum;         /* header checksum */
        ipaddr_t ipv4_src;              /* source address */
        ipaddr_t ipv4_dst;              /* destination address */
        string ipv4_saddr;              /* source address, string */
        string ipv4_daddr;              /* destination address, string */
        ipha_t *ipv4_hdr;               /* pointer to raw header */
} ipv4info_t;

Table 11-51 ipv4info_t Members

Member Description

ipv4_ver

IP version 4.

ipv4_ihl

IPv4 header length, in bytes.

ipv4_tos

Contents of IPv4 type of service field.

ipv4_length

IPv4 packet length (header + payload) at time of tracing, in bytes.

ipv4_ident

IPv4 identification field.

ipv4_flags

IPv4 flags. See the ipv4_flags table below for bitwise values.

ipv4_offset

IPv4 fragment offset, in bytes.

ipv4_ttl

IPv4 time to live.

ipv4_protocol

IPv4 encapsulated protocol number. See /usr/include/netinet/in.h for the protocol list (IPPROTO_*).

ipv4_protostr

IPv4 encapsulated protocol, as a string. For example, "TCP".

ipv4_checksum

IPv4 header checksum, if available at time of tracing.

ipv4_src

IPv4 source address, as an ipaddr_t.

ipv4_dst

IPv4 destination address, as an ipaddr_t.

ipv4_saddr

IPv4 source address, as a dotted decimal quad string.

ipv4_daddr

IPv4 destination address, as a dotted decimal quad string.

ipv4_hdr

Pointer to raw IPv4 header at the time of tracing.

See RFC 791 for a detailed explanation for these IPv4 header fields. If the packet is IPv6, these members are either "<null>", 0, or NULL depending on type.

Table 11-52 ipv4_flags Values

Value Description

IPH_DF

Do not fragment

IPH_MF

More fragments