diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2023-07-02 01:08:51 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2023-07-02 01:08:51 +0000 |
commit | 2176c9ab71c85efd90a6c7af4a9e04fe8e3d49ca (patch) | |
tree | f9c8a9569d4dabee9d14bfe31ec027867cc7f5cf /cddl | |
parent | ccc806a049383e5611b3752e6f384cf03a208039 (diff) | |
download | src-2176c9ab71c85efd90a6c7af4a9e04fe8e3d49ca.tar.gz src-2176c9ab71c85efd90a6c7af4a9e04fe8e3d49ca.zip |
Diffstat (limited to 'cddl')
-rw-r--r-- | cddl/lib/libdtrace/siftr.d | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/cddl/lib/libdtrace/siftr.d b/cddl/lib/libdtrace/siftr.d index 791693db7638..ecb307822671 100644 --- a/cddl/lib/libdtrace/siftr.d +++ b/cddl/lib/libdtrace/siftr.d @@ -21,6 +21,7 @@ * $FreeBSD$ */ +#pragma D depends_on library ip.d #pragma D depends_on module kernel #pragma D depends_on module siftr #pragma D depends_on provider tcp @@ -44,20 +45,22 @@ typedef struct siftrinfo { struct timeval tval; uint8_t direction; uint8_t ipver; - uint16_t tcp_localport; - uint16_t tcp_foreignport; + uint16_t lport; + uint16_t rport; + string laddr; + string raddr; uint32_t snd_cwnd; uint32_t snd_wnd; uint32_t rcv_wnd; uint32_t t_flags2; uint32_t snd_ssthresh; int conn_state; - u_int max_seg_size; + uint32_t mss; uint32_t srtt; u_char sack_enabled; u_char snd_scale; u_char rcv_scale; - u_int flags; + u_int t_flags; uint32_t rto; u_int snd_buf_hiwater; u_int snd_buf_cc; @@ -73,20 +76,28 @@ typedef struct siftrinfo { translator siftrinfo_t < struct pkt_node *p > { direction = p == NULL ? 0 : p->direction; ipver = p == NULL ? 0 : p->ipver; - tcp_localport = p == NULL ? 0 : ntohs(p->tcp_localport); - tcp_foreignport = p == NULL ? 0 : ntohs(p->tcp_foreignport); + lport = p == NULL ? 0 : ntohs(p->lport); + rport = p == NULL ? 0 : ntohs(p->fport); + laddr = p == NULL ? "<unknown>" : + p->ipver == INP_IPV4 ? + inet_ntoa(&p->laddr.id46_addr.ia46_addr4.s_addr) : + inet_ntoa6(&p->laddr.id6_addr); + raddr = p == NULL ? "<unknown>" : + p->ipver == INP_IPV4 ? + inet_ntoa(&p->faddr.id46_addr.ia46_addr4.s_addr) : + inet_ntoa6(&p->faddr.id6_addr); snd_cwnd = p == NULL ? 0 : p->snd_cwnd; snd_wnd = p == NULL ? 0 : p->snd_wnd; rcv_wnd = p == NULL ? 0 : p->rcv_wnd; t_flags2 = p == NULL ? 0 : p->t_flags2; snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh; conn_state = p == NULL ? 0 : p->conn_state; - max_seg_size = p == NULL ? 0 : p->max_seg_size; + mss = p == NULL ? 0 : p->mss; srtt = p == NULL ? 0 : p->srtt; sack_enabled = p == NULL ? 0 : p->sack_enabled; snd_scale = p == NULL ? 0 : p->snd_scale; rcv_scale = p == NULL ? 0 : p->rcv_scale; - flags = p == NULL ? 0 : p->flags; + t_flags = p == NULL ? 0 : p->t_flags; rto = p == NULL ? 0 : p->rto; snd_buf_hiwater = p == NULL ? 0 : p->snd_buf_hiwater; snd_buf_cc = p == NULL ? 0 : p->snd_buf_cc; |