From 02111515c68af63894a76df742e1eb7ce1c48070 Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Fri, 14 Jun 2024 13:25:17 -0700 Subject: Expose TCP_INFO fields as pub --- .bleep | 2 +- pingora-core/src/protocols/l4/ext.rs | 104 +++++++++++++++++------------------ 2 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.bleep b/.bleep index 1839be6..ba56d41 100644 --- a/.bleep +++ b/.bleep @@ -1 +1 @@ -bc0d789447bc0704c6cf01210eaae7ba77c8dad9 \ No newline at end of file +ad58f28eff9c05ac86bfe5ccbb6b1036fbece9ea \ No newline at end of file diff --git a/pingora-core/src/protocols/l4/ext.rs b/pingora-core/src/protocols/l4/ext.rs index 5efb1f3..f68cdcf 100644 --- a/pingora-core/src/protocols/l4/ext.rs +++ b/pingora-core/src/protocols/l4/ext.rs @@ -31,60 +31,60 @@ use tokio::net::{TcpSocket, TcpStream, UnixStream}; #[repr(C)] #[derive(Copy, Clone, Debug)] pub struct TCP_INFO { - tcpi_state: u8, - tcpi_ca_state: u8, - tcpi_retransmits: u8, - tcpi_probes: u8, - tcpi_backoff: u8, - tcpi_options: u8, - tcpi_snd_wscale_4_rcv_wscale_4: u8, - tcpi_delivery_rate_app_limited: u8, - tcpi_rto: u32, - tcpi_ato: u32, - tcpi_snd_mss: u32, - tcpi_rcv_mss: u32, - tcpi_unacked: u32, - tcpi_sacked: u32, - tcpi_lost: u32, - tcpi_retrans: u32, - tcpi_fackets: u32, - tcpi_last_data_sent: u32, - tcpi_last_ack_sent: u32, - tcpi_last_data_recv: u32, - tcpi_last_ack_recv: u32, - tcpi_pmtu: u32, - tcpi_rcv_ssthresh: u32, + pub tcpi_state: u8, + pub tcpi_ca_state: u8, + pub tcpi_retransmits: u8, + pub tcpi_probes: u8, + pub tcpi_backoff: u8, + pub tcpi_options: u8, + pub tcpi_snd_wscale_4_rcv_wscale_4: u8, + pub tcpi_delivery_rate_app_limited: u8, + pub tcpi_rto: u32, + pub tcpi_ato: u32, + pub tcpi_snd_mss: u32, + pub tcpi_rcv_mss: u32, + pub tcpi_unacked: u32, + pub tcpi_sacked: u32, + pub tcpi_lost: u32, + pub tcpi_retrans: u32, + pub tcpi_fackets: u32, + pub tcpi_last_data_sent: u32, + pub tcpi_last_ack_sent: u32, + pub tcpi_last_data_recv: u32, + pub tcpi_last_ack_recv: u32, + pub tcpi_pmtu: u32, + pub tcpi_rcv_ssthresh: u32, pub tcpi_rtt: u32, - tcpi_rttvar: u32, - tcpi_snd_ssthresh: u32, - tcpi_snd_cwnd: u32, - tcpi_advmss: u32, - tcpi_reordering: u32, - tcpi_rcv_rtt: u32, + pub tcpi_rttvar: u32, + pub tcpi_snd_ssthresh: u32, + pub tcpi_snd_cwnd: u32, + pub tcpi_advmss: u32, + pub tcpi_reordering: u32, + pub tcpi_rcv_rtt: u32, pub tcpi_rcv_space: u32, - tcpi_total_retrans: u32, - tcpi_pacing_rate: u64, - tcpi_max_pacing_rate: u64, - tcpi_bytes_acked: u64, - tcpi_bytes_received: u64, - tcpi_segs_out: u32, - tcpi_segs_in: u32, - tcpi_notsent_bytes: u32, - tcpi_min_rtt: u32, - tcpi_data_segs_in: u32, - tcpi_data_segs_out: u32, - tcpi_delivery_rate: u64, - tcpi_busy_time: u64, - tcpi_rwnd_limited: u64, - tcpi_sndbuf_limited: u64, - tcpi_delivered: u32, - tcpi_delivered_ce: u32, - tcpi_bytes_sent: u64, - tcpi_bytes_retrans: u64, - tcpi_dsack_dups: u32, - tcpi_reord_seen: u32, - tcpi_rcv_ooopack: u32, - tcpi_snd_wnd: u32, + pub tcpi_total_retrans: u32, + pub tcpi_pacing_rate: u64, + pub tcpi_max_pacing_rate: u64, + pub tcpi_bytes_acked: u64, + pub tcpi_bytes_received: u64, + pub tcpi_segs_out: u32, + pub tcpi_segs_in: u32, + pub tcpi_notsent_bytes: u32, + pub tcpi_min_rtt: u32, + pub tcpi_data_segs_in: u32, + pub tcpi_data_segs_out: u32, + pub tcpi_delivery_rate: u64, + pub tcpi_busy_time: u64, + pub tcpi_rwnd_limited: u64, + pub tcpi_sndbuf_limited: u64, + pub tcpi_delivered: u32, + pub tcpi_delivered_ce: u32, + pub tcpi_bytes_sent: u64, + pub tcpi_bytes_retrans: u64, + pub tcpi_dsack_dups: u32, + pub tcpi_reord_seen: u32, + pub tcpi_rcv_ooopack: u32, + pub tcpi_snd_wnd: u32, pub tcpi_rcv_wnd: u32, // and more, see include/linux/tcp.h } -- cgit v1.2.3