diff options
Diffstat (limited to 'static/freebsd/man4/dtrace_sctp.4 3.html')
| -rw-r--r-- | static/freebsd/man4/dtrace_sctp.4 3.html | 247 |
1 files changed, 247 insertions, 0 deletions
diff --git a/static/freebsd/man4/dtrace_sctp.4 3.html b/static/freebsd/man4/dtrace_sctp.4 3.html new file mode 100644 index 00000000..6cf33abc --- /dev/null +++ b/static/freebsd/man4/dtrace_sctp.4 3.html @@ -0,0 +1,247 @@ +<table class="head"> + <tr> + <td class="head-ltitle">DTRACE_SCTP(4)</td> + <td class="head-vol">Device Drivers Manual</td> + <td class="head-rtitle">DTRACE_SCTP(4)</td> + </tr> +</table> +<div class="manual-text"> +<section class="Sh"> +<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> +<p class="Pp"><code class="Nm">dtrace_sctp</code> — <span class="Nd">a + DTrace provider for tracing events related to the <a class="Xr">sctp(4)</a> + protocol</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> +<p class="Pp"><code class="Fn">sctp:cwnd::init</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::ack</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::rttvar</code>(<var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::rttstep</code>(<var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>, + <var class="Fa" style="white-space: nowrap;">uint64_t</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::fr</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::to</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::bl</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::ecn</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:cwnd::pd</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:rwnd:assoc:val</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:flightsize:net:val</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uintptr_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:flightsize:assoc:val</code>(<var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">uint32_t</var>, + <var class="Fa" style="white-space: nowrap;">int</var>, + <var class="Fa" style="white-space: nowrap;">int</var>);</p> +<p class="Pp"><code class="Fn">sctp:::receive</code>(<var class="Fa" style="white-space: nowrap;">pktinfo_t + *</var>, <var class="Fa" style="white-space: nowrap;">csinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">ipinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">sctpsinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">sctpinfo_t *</var>);</p> +<p class="Pp"><code class="Fn">sctp:::send</code>(<var class="Fa" style="white-space: nowrap;">pktinfo_t + *</var>, <var class="Fa" style="white-space: nowrap;">csinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">ipinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">sctpsinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">sctpinfo_t *</var>);</p> +<p class="Pp"><code class="Fn">sctp:::state-change</code>(<var class="Fa" style="white-space: nowrap;">void + *</var>, <var class="Fa" style="white-space: nowrap;">csinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">void *</var>, + <var class="Fa" style="white-space: nowrap;">sctpsinfo_t *</var>, + <var class="Fa" style="white-space: nowrap;">void *</var>, + <var class="Fa" style="white-space: nowrap;">sctplsinfo_t *</var>);</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> +<p class="Pp">The DTrace <code class="Nm">sctp</code> provider allows users to + trace events in the <a class="Xr">sctp(4)</a> protocol implementation. This + provider is similar to the <a class="Xr">dtrace_ip(4)</a> and + <a class="Xr">dtrace_udp(4)</a> providers, but additionally contains probes + corresponding to protocol events at a level higher than packet reception and + transmission.</p> +<p class="Pp" id="sctp:cwnd::">The + <a class="permalink" href="#sctp:cwnd::"><code class="Fn">sctp:cwnd::</code></a>() + probes track changes in the congestion window on a netp. The + <a class="permalink" href="#sctp:rwnd::"><code class="Fn" id="sctp:rwnd::">sctp:rwnd::</code></a>() + probes track changes in the receiver window for an assoc. The + <a class="permalink" href="#sctp:flightsize:net:val"><code class="Fn" id="sctp:flightsize:net:val">sctp:flightsize:net:val</code></a>() + probe tracks changes in the flight size on a net or assoc and the + <a class="permalink" href="#sctp:flightsize:assoc:val"><code class="Fn" id="sctp:flightsize:assoc:val">sctp:flightsize:assoc:val</code></a>() + probe provides the total flight version.</p> +<p class="Pp" id="sctp:cwnd::rtt*">The arguments of all + <code class="Nm">sctp</code> probes except for + <a class="permalink" href="#sctp:cwnd::rtt*"><code class="Fn">sctp:cwnd::rtt*</code></a>() + and + <a class="permalink" href="#sctp::assoc:val"><code class="Fn" id="sctp::assoc:val">sctp::assoc:val</code></a>() + are the Vtag for this end, the port number of the local side, the pointer to + <code class="Dv">struct sctp_nets *changing</code>, the old value of the + cwnd, and the new value of the cwnd.</p> +<p class="Pp" id="sctp:::val">The arguments of + <a class="permalink" href="#sctp:::val"><code class="Fn">sctp:::val</code></a>() + are similar to the above except the fourth argument is the up/down + amount.</p> +<p class="Pp" id="sctp:cwnd::rtt*~2">The + <a class="permalink" href="#sctp:cwnd::rtt*~2"><code class="Fn">sctp:cwnd::rtt*</code></a>() + probe arguments are a bitmap of <code class="Dv">Vtag << 32</code> | + <code class="Dv">localport << 16</code> | + <code class="Dv">remoteport</code>, a bitmap of <code class="Dv">obw</code> + | <code class="Dv">nbw</code>, a bitmap of <code class="Dv">bwrtt</code> | + <code class="Dv">newrtt</code>, <code class="Dv">flight</code>, and a bitmap + of <code class="Dv">(cwnd << 32)</code> | <code class="Dv">point + << 16</code> | <code class="Dv">retval(0/1)</code>.</p> +<p class="Pp" id="sctp:cwnd::init">The + <a class="permalink" href="#sctp:cwnd::init"><code class="Fn">sctp:cwnd::init</code></a>() + probe fires when a remotely-initiated active SCTP open succeeds. At this + point the new connection is in the ESTABLISHED state, and the probe + arguments expose the headers associated with the final ACK of the four-way + handshake.</p> +<p class="Pp" id="sctp:::send">The + <a class="permalink" href="#sctp:::send"><code class="Fn">sctp:::send</code></a>() + and + <a class="permalink" href="#sctp:::receive"><code class="Fn" id="sctp:::receive">sctp:::receive</code></a>() + probes fire when the host sends or receives an SCTP packet, respectively. As + with the <a class="Xr">dtrace_udp(4)</a> provider, + <code class="Nm">sctp</code> probes fire only for packets sent by or to the + local host; forwarded packets are handled in the IP layer and are only + visible to the <a class="Xr">dtrace_ip(4)</a> provider.</p> +<p class="Pp" id="sctp:::state-change">The + <a class="permalink" href="#sctp:::state-change"><code class="Fn">sctp:::state-change</code></a>() + probe fires upon local SCTP association state transitions. Its first, third + and fifth arguments are currently always <code class="Dv">NULL</code>. Its + last argument describes the from-state in the transition, and the to-state + can be obtained from <code class="Dv">args[3]->sctps_state</code>.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1> +<dl class="Bl-tag Bl-compact"> + <dt><span class="Pa">/usr/lib/dtrace/sctp.d</span></dt> + <dd>DTrace type and translator definitions for the + <code class="Nm">sctp</code> provider.</dd> +</dl> +</section> +<section class="Sh"> +<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1> +<p class="Pp">A script that logs SCTP packets in real time:</p> +<div class="Bd Pp Bd-indent Li"> +<pre>#pragma D option quiet +#pragma D option switchrate=10hz + +dtrace:::BEGIN +{ + printf(" %3s %15s:%-5s %15s:%-5s\n", "CPU", + "LADDR", "LPORT", "RADDR", "RPORT"); +} + +sctp:::send +{ + printf(" %3d %16s:%-5d -> %16s:%-5d\n", cpu, + args[2]->ip_saddr, args[4]->sctp_sport, + args[2]->ip_daddr, args[4]->sctp_dport); +} + +sctp:::receive +{ + printf(" %3d %16s:%-5d <- %16s:%-5d\n", cpu, + args[2]->ip_daddr, args[4]->sctp_dport, + args[2]->ip_saddr, args[4]->sctp_sport); +}</pre> +</div> +A script that logs SCTP association state changes as they occur: +<div class="Bd Pp Bd-indent Li"> +<pre>#pragma D option quiet +#pragma D option switchrate=10 + +int last[int]; + +dtrace:::BEGIN +{ + printf(" %3s %12s %-25s %-25s\n", + "CPU", "DELTA(us)", "OLD", "NEW"); +} + +sctp:::state-change +/ last[args[1]->cs_cid] / +{ + this->elapsed = (timestamp - last[args[1]->cs_cid]) / 1000; + printf(" %3d %12d %-25s -> %-25s\n", cpu, this->elapsed, + sctp_state_string[args[5]->sctps_state], + sctp_state_string[args[3]->sctps_state]); + last[args[1]->cs_cid] = timestamp; +} + +sctp:::state-change +/ last[args[1]->cs_cid] == 0 / +{ + printf(" %3d %12s %-25s -> %-25s\n", cpu, "-", + sctp_state_string[args[5]->sctps_state], + sctp_state_string[args[3]->sctps_state]); + last[args[1]->cs_cid] = timestamp; +}</pre> +</div> +</section> +<section class="Sh"> +<h1 class="Sh" id="COMPATIBILITY"><a class="permalink" href="#COMPATIBILITY">COMPATIBILITY</a></h1> +<p class="Pp">The <code class="Fn">sctp:::send</code>(), + <code class="Fn">sctp:::receive</code>(), and + <code class="Fn">sctp:::state-change</code>() probes are compatible with the + <code class="Nm">sctp</code> provider in Solaris. All other probes are only + available in FreeBSD.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE + ALSO</a></h1> +<p class="Pp"><a class="Xr">dtrace(1)</a>, <a class="Xr">dtrace_ip(4)</a>, + <a class="Xr">dtrace_udp(4)</a>, <a class="Xr">dtrace_udplite(4)</a>, + <a class="Xr">sctp(4)</a>, <a class="Xr">SDT(9)</a></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> +<p class="Pp">This manual page was written by <span class="An">Devin + Teske</span> + <<a class="Mt" href="mailto:dteske@FreeBSD.org">dteske@FreeBSD.org</a>>.</p> +</section> +</div> +<table class="foot"> + <tr> + <td class="foot-date">June 29, 2023</td> + <td class="foot-os">FreeBSD 15.0</td> + </tr> +</table> |
