Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F3448625
tcptest.d
tuexen (Michael Tuexen)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
tuexen
Jun 16 2018, 5:46 PM
2018-06-16 17:46:45 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
tcptest.d
View Options
#
!/
usr
/
sbin
/
dtrace
-
s
#
pragma
D
option
quiet
#
pragma
D
option
switchrate
=
10
hz
dtrace
:::
BEGIN
{
printf
(
" %3s %15s:%-5s %15s:%-5s %6s %s\n"
,
"CPU"
,
"LADDR"
,
"LPORT"
,
"RADDR"
,
"RPORT"
,
"BYTES"
,
"FLAGS"
);
}
tcp
:::
send
{
printf
(
" %3d %16s:%-5d -> %16s:%-5d %6d ("
,
cpu
,
args
[
3
]->
tcps_laddr
,
args
[
3
]->
tcps_lport
,
args
[
3
]->
tcps_laddr
,
args
[
3
]->
tcps_rport
,
args
[
2
]->
ip_plength
);
}
tcp
:::
receive
{
printf
(
" %3d %16s:%-5d <- %16s:%-5d %6d ("
,
cpu
,
args
[
3
]->
tcps_laddr
,
args
[
3
]->
tcps_lport
,
args
[
3
]->
tcps_raddr
,
args
[
3
]->
tcps_rport
,
args
[
2
]->
ip_plength
);
}
tcp
:::
send
,
tcp
:::
receive
{
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_FIN
?
"FIN|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_SYN
?
"SYN|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_RST
?
"RST|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_PUSH
?
"PUSH|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_ACK
?
"ACK|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_URG
?
"URG|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_ECE
?
"ECE|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
&
TH_CWR
?
"CWR|"
:
""
);
printf
(
"%s"
,
args
[
4
]->
tcp_flags
==
0
?
"null "
:
""
);
printf
(
"\b)\n"
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1396654
Default Alt Text
tcptest.d (1 KB)
Attached To
Mode
D15855: Fix dtrace output of IP addresses as strings
Attached
Detach File
Event Timeline
Log In to Comment