Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107585437
D34672.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D34672.diff
View Options
diff --git a/share/man/man4/siftr.4 b/share/man/man4/siftr.4
--- a/share/man/man4/siftr.4
+++ b/share/man/man4/siftr.4
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 7, 2019
+.Dd April 7, 2022
.Dt SIFTR 4
.Os
.Sh NAME
@@ -209,7 +209,7 @@
The data is CSV formatted.
.Bd -literal -offset indent
o,0xbec491a5,1238556193.463551,172.16.7.28,22,172.16.2.5,55931, \\
-1073725440,172312,6144,66560,66608,8,1,4,1448,936,1,996,255, \\
+1073725440,172312,34,66560,66608,8,1,4,1448,936,1,996,255, \\
33304,208,66608,0,208,0
.Ed
.Pp
@@ -262,7 +262,7 @@
.El
.Bl -tag -offset indent -width Va
.It Va 10
-The current bandwidth-controlled window for the flow, in bytes.
+The current state of the t_flags2 field for the flow.
.El
.Bl -tag -offset indent -width Va
.It Va 11
diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c
--- a/sys/netinet/siftr.c
+++ b/sys/netinet/siftr.c
@@ -132,7 +132,7 @@
* Hard upper limit on the length of log messages. Bump this up if you add new
* data fields such that the line length could exceed the below value.
*/
-#define MAX_LOG_MSG_LEN 200
+#define MAX_LOG_MSG_LEN 300
/* XXX: Make this a sysctl tunable. */
#define SIFTR_ALQ_BUFLEN (1000*MAX_LOG_MSG_LEN)
@@ -194,15 +194,15 @@
/* Foreign TCP port. */
uint16_t tcp_foreignport;
/* Congestion Window (bytes). */
- u_long snd_cwnd;
+ uint32_t snd_cwnd;
/* Sending Window (bytes). */
- u_long snd_wnd;
+ uint32_t snd_wnd;
/* Receive Window (bytes). */
- u_long rcv_wnd;
- /* Unused (was: Bandwidth Controlled Window (bytes)). */
- u_long snd_bwnd;
+ uint32_t rcv_wnd;
+ /* More tcpcb flags storage */
+ uint32_t t_flags2;
/* Slow Start Threshold (bytes). */
- u_long snd_ssthresh;
+ uint32_t snd_ssthresh;
/* Current state of the TCP FSM. */
int conn_state;
/* Max Segment Size (bytes). */
@@ -455,7 +455,7 @@
log_buf->ae_bytesused = snprintf(log_buf->ae_data,
MAX_LOG_MSG_LEN,
"%c,0x%08x,%zd.%06ld,%x:%x:%x:%x:%x:%x:%x:%x,%u,%x:%x:%x:"
- "%x:%x:%x:%x:%x,%u,%ld,%ld,%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,"
+ "%x:%x:%x:%x:%x,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,"
"%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n",
direction[pkt_node->direction],
pkt_node->hash,
@@ -481,7 +481,7 @@
ntohs(pkt_node->tcp_foreignport),
pkt_node->snd_ssthresh,
pkt_node->snd_cwnd,
- pkt_node->snd_bwnd,
+ pkt_node->t_flags2,
pkt_node->snd_wnd,
pkt_node->rcv_wnd,
pkt_node->snd_scale,
@@ -514,8 +514,8 @@
/* Construct an IPv4 log message. */
log_buf->ae_bytesused = snprintf(log_buf->ae_data,
MAX_LOG_MSG_LEN,
- "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%ld,%ld,"
- "%ld,%ld,%ld,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n",
+ "%c,0x%08x,%jd.%06ld,%u.%u.%u.%u,%u,%u.%u.%u.%u,%u,%u,%u,"
+ "%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n",
direction[pkt_node->direction],
pkt_node->hash,
(intmax_t)pkt_node->tval.tv_sec,
@@ -532,7 +532,7 @@
ntohs(pkt_node->tcp_foreignport),
pkt_node->snd_ssthresh,
pkt_node->snd_cwnd,
- pkt_node->snd_bwnd,
+ pkt_node->t_flags2,
pkt_node->snd_wnd,
pkt_node->rcv_wnd,
pkt_node->snd_scale,
@@ -782,7 +782,7 @@
pn->snd_cwnd = tp->snd_cwnd;
pn->snd_wnd = tp->snd_wnd;
pn->rcv_wnd = tp->rcv_wnd;
- pn->snd_bwnd = 0; /* Unused, kept for compat. */
+ pn->t_flags2 = tp->t_flags2;
pn->snd_ssthresh = tp->snd_ssthresh;
pn->snd_scale = tp->snd_scale;
pn->rcv_scale = tp->rcv_scale;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 17, 6:19 AM (10 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15835149
Default Alt Text
D34672.diff (3 KB)
Attached To
Mode
D34672: siftr: expose t_flags2 in siftr output
Attached
Detach File
Event Timeline
Log In to Comment