tcpinfo_t Structure

The tcpinfo_t structure is a DTrace translated version of the TCP header.

typedef struct tcpinfo {
        uint16_t tcp_sport;             /* source port */
        uint16_t tcp_dport;             /* destination port */
        uint32_t tcp_seq;               /* sequence number */
        uint32_t tcp_ack;               /* acknowledgment number */
        uint8_t tcp_offset;             /* data offset, in bytes */
        uint8_t tcp_flags;              /* flags */
        uint16_t tcp_window;            /* window size */
        uint16_t tcp_checksum;          /* checksum */
        uint16_t tcp_urgent;            /* urgent data pointer */
        tcph_t *tcp_hdr;                /* raw TCP header */
} tcpinfo_t;

Table 11-69 tcpinfo_t Members

Member Description

tcp_sport

TCP source port.

tcp_dport

TCP destination port.

tcp_seq

TCP sequence number.

tcp_ack

TCP acknowledgment number.

tcp_offset

Payload data offset, in bytes not 32-bit words.

tcp_flags

TCP flags. See the tcp_flagstable below for available macros.

tcp_window

TCP window size, bytes.

tcp_checksum

Checksum of TCP header and payload.

tcp_urgent

TCP urgent data pointer, bytes.

tcp_hdr

Pointer to raw TCP header at time of tracing.

Table 11-70 tcp_flags Values

Value Description

TH_FIN

No more data from sender (finish).

TH_SYN

Synchronize sequence numbers (connect).

TH_RST

Reset the connection.

TH_PUSH

TCP push function.

TH_ACK

Acknowledgment field is set.

TH_URG

Urgent pointer field is set.

TH_ECE

Explicit congestion notification echo. For more information, see RFC 3168.

TH_CWR

Congestion window reduction.

See RFC 793 for a detailed explanation of the standard TCP header fields and flags.