Lines Matching +full:three +full:- +full:state
34 .Fn tcp:::accept-established "pktinfo_t *" "csinfo_t *" "ipinfo_t *" \
36 .Fn tcp:::accept-refused "pktinfo_t *" "csinfo_t *" "ipinfo_t *" \
38 .Fn tcp:::connect-established "pktinfo_t *" "csinfo_t *" "ipinfo_t *" \
40 .Fn tcp:::connect-refused "pktinfo_t *" "csinfo_t *" "ipinfo_t *" \
42 .Fn tcp:::connect-request "pktinfo_t *" "csinfo_t *" "ipinfo_t *" \
48 .Fn tcp:::state-change "void *" "csinfo_t *" "void *" "tcpsinfo_t *" "void *" \
66 .Fn tcp:::state-change
70 The last three arguments are used to describe a TCP segment: the
72 argument exposes the version-agnostic fields of the IP header, while the
76 argument describes details of the corresponding TCP connection state, if any.
80 .Fn tcp:::accept-established
81 probe fires when a remotely-initiated active TCP open succeeds.
82 At this point the new connection is in the ESTABLISHED state, and the probe
83 arguments expose the headers associated with the final ACK of the three-way
86 .Fn tcp:::accept-refused
92 .Fn tcp:::connect-established ,
93 .Fn tcp:::connect-refused ,
95 .Fn tcp:::connect-request
98 probes, except that they correspond to locally-initiated TCP connections.
100 .Fn tcp:::connect-established
101 probe fires when the SYN-ACK segment of a three-way handshake is received from
103 This occurs immediately after the local connection state transitions from
104 SYN-SENT to ESTABLISHED.
105 The probe arguments describe the headers associated with the received SYN-ACK
108 .Fn tcp:::connect-refused
114 .Fn tcp:::connect-request
116 three-way handshake.
133 .Fn tcp:::state-change
134 probe fires upon local TCP connection state transitions.
137 Its last argument describes the from-state in the transition, and the to-state
139 .Dv args[3]->tcps_state .
155 .Bl -tag -width "uinptr_t pkt_addr" -offset indent
165 .Bl -tag -width "uintptr_t cs_addr" -offset indent
179 type is a version-agnostic representation of fields from an IP header.
186 type is used to provide a stable representation of TCP connection state.
190 .Fn tcp:::accept-refused ,
195 .Bl -tag -width "uint16_t tcps_lport" -offset indent
202 Currently unimplemented and always set to -1.
205 Currently unimplemented and always set to -1.
215 Current TCP state.
216 The valid TCP state values are given by the constants prefixed with
248 Round-trip timeout, in milliseconds.
254 Smoothed round-trip time.
261 .Bl -tag -width "struct tcphdr *tcp_hdr" -offset indent
287 .Fn tcp:::state-change
288 probe to provide the from-state of a transition.
290 .Bl -tag -width "int32_t tcps_state" -offset indent
292 A TCP state.
293 The valid TCP state values are given by the constants prefixed with
303 probe to provide the state of the TCP connection.
305 .Bl -tag -width "u_int sent_inflight_bytes" -offset indent
342 A TCP state.
343 The valid TCP state values are given by the constants prefixed with
371 The current number of unacknowledged bytes in-flight.
388 .Bl -tag -width "/usr/lib/dtrace/siftr.d" -compact
404 .Bd -literal -offset indent
410 printf(" %3s %15s:%-5s %15s:%-5s %6s %s\\n", "CPU",
416 this->length = args[2]->ip_plength - args[4]->tcp_offset;
417 printf(" %3d %16s:%-5d -> %16s:%-5d %6d (", cpu, args[2]->ip_saddr,
418 args[4]->tcp_sport, args[2]->ip_daddr, args[4]->tcp_dport,
419 this->length);
420 printf("%s", args[4]->tcp_flags & TH_FIN ? "FIN|" : "");
421 printf("%s", args[4]->tcp_flags & TH_SYN ? "SYN|" : "");
422 printf("%s", args[4]->tcp_flags & TH_RST ? "RST|" : "");
423 printf("%s", args[4]->tcp_flags & TH_PUSH ? "PUSH|" : "");
424 printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
425 printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
426 printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
432 this->length = args[2]->ip_plength - args[4]->tcp_offset;
433 printf(" %3d %16s:%-5d <- %16s:%-5d %6d (", cpu,
434 args[2]->ip_daddr, args[4]->tcp_dport, args[2]->ip_saddr,
435 args[4]->tcp_sport, this->length);
436 printf("%s", args[4]->tcp_flags & TH_FIN ? "FIN|" : "");
437 printf("%s", args[4]->tcp_flags & TH_SYN ? "SYN|" : "");
438 printf("%s", args[4]->tcp_flags & TH_RST ? "RST|" : "");
439 printf("%s", args[4]->tcp_flags & TH_PUSH ? "PUSH|" : "");
440 printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
441 printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
442 printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
446 The following script logs TCP connection state changes as they occur:
447 .Bd -literal -offset indent
455 printf(" %12s %-20s %-20s %s\\n",
459 tcp:::state-change
461 this->elapsed = (timestamp - last[args[1]->cs_cid]) / 1000;
462 printf(" %12d %-20s -> %-20s %d\\n", this->elapsed,
463 tcp_state_string[args[5]->tcps_state],
464 tcp_state_string[args[3]->tcps_state], timestamp);
465 last[args[1]->cs_cid] = timestamp;
468 tcp:::state-change
469 /last[args[1]->cs_cid] == 0/
471 printf(" %12s %-20s -> %-20s %d\\n", "-",
472 tcp_state_string[args[5]->tcps_state],
473 tcp_state_string[args[3]->tcps_state], timestamp);
474 last[args[1]->cs_cid] = timestamp;
479 .Bd -literal -offset indent
485 printf(" %3s %16s:%-5s %16s:%-5s %10s %10s\\n",
491 printf(" %3s %16s:%-5d %16s:%-5d %10u %10u\\n",
492 siftr_dir_string[args[0]->direction],
493 args[0]->laddr, args[0]->lport, args[0]->raddr, args[0]->rport,
494 args[0]->snd_cwnd, args[0]->snd_ssthresh);