Lines Matching +full:p +full:- +full:state

31  * Convert a TCP state value to a string.
102 /* TCP connection state strings. */
104 inline string tcp_state_string[int32_t state] =
105 state == TCPS_CLOSED ? "state-closed" :
106 state == TCPS_LISTEN ? "state-listen" :
107 state == TCPS_SYN_SENT ? "state-syn-sent" :
108 state == TCPS_SYN_RECEIVED ? "state-syn-received" :
109 state == TCPS_ESTABLISHED ? "state-established" :
110 state == TCPS_CLOSE_WAIT ? "state-close-wait" :
111 state == TCPS_FIN_WAIT_1 ? "state-fin-wait-1" :
112 state == TCPS_CLOSING ? "state-closing" :
113 state == TCPS_LAST_ACK ? "state-last-ack" :
114 state == TCPS_FIN_WAIT_2 ? "state-fin-wait-2" :
115 state == TCPS_TIME_WAIT ? "state-time-wait" :
129 int32_t tcps_state; /* TCP state */
150 uint32_t tcps_rto; /* round-trip timeout, msec */
163 * tcplsinfo provides the old tcp state for state changes.
166 int32_t tcps_state; /* previous TCP state */
187 * overwrites some fields of the TCP header with their host-order equivalents.
205 translator csinfo_t < struct tcpcb *p > {
207 cs_cid = (uint64_t)(p == NULL ? 0 : &p->t_inpcb);
213 translator tcpsinfo_t < struct tcpcb *p > {
214 tcps_addr = (uintptr_t)p;
215 tcps_local = -1; /* XXX */
216 tcps_active = -1; /* XXX */
217 tcps_lport = p == NULL ? 0 : ntohs(p->t_inpcb.inp_inc.inc_ie.ie_lport);
218 tcps_rport = p == NULL ? 0 : ntohs(p->t_inpcb.inp_inc.inc_ie.ie_fport);
219 tcps_laddr = p == NULL ? "<unknown>" :
220 p->t_inpcb.inp_vflag == INP_IPV4 ?
221 inet_ntoa(&p->t_inpcb.inp_inc.inc_ie.ie_dependladdr.id46_addr.ia46_addr4.s_addr) :
222 inet_ntoa6(&p->t_inpcb.inp_inc.inc_ie.ie_dependladdr.id6_addr);
223 tcps_raddr = p == NULL ? "<unknown>" :
224 p->t_inpcb.inp_vflag == INP_IPV4 ?
225 inet_ntoa(&p->t_inpcb.inp_inc.inc_ie.ie_dependfaddr.id46_addr.ia46_addr4.s_addr) :
226 inet_ntoa6(&p->t_inpcb.inp_inc.inc_ie.ie_dependfaddr.id6_addr);
227 tcps_state = p == NULL ? -1 : p->t_state;
228 tcps_iss = p == NULL ? 0 : p->iss;
229 tcps_irs = p == NULL ? 0 : p->irs;
230 tcps_suna = p == NULL ? 0 : p->snd_una;
231 tcps_smax = p == NULL ? 0 : p->snd_max;
232 tcps_snxt = p == NULL ? 0 : p->snd_nxt;
233 tcps_rack = p == NULL ? 0 : p->last_ack_sent;
234 tcps_rnxt = p == NULL ? 0 : p->rcv_nxt;
235 tcps_swnd = p == NULL ? -1 : p->snd_wnd;
236 tcps_snd_ws = p == NULL ? -1 : p->snd_scale;
237 tcps_swl1 = p == NULL ? -1 : p->snd_wl1;
238 tcps_swl2 = p == NULL ? -1 : p->snd_wl2;
239 tcps_radv = p == NULL ? -1 : p->rcv_adv;
240 tcps_rwnd = p == NULL ? -1 : p->rcv_wnd;
241 tcps_rup = p == NULL ? -1 : p->rcv_up;
242 tcps_rcv_ws = p == NULL ? -1 : p->rcv_scale;
243 tcps_cwnd = p == NULL ? -1 : p->snd_cwnd;
244 tcps_cwnd_ssthresh = p == NULL ? -1 : p->snd_ssthresh;
245 tcps_srecover = p == NULL ? -1 : p->snd_recover;
246 tcps_sack_fack = p == NULL ? 0 : p->snd_fack;
247 tcps_sack_snxt = p == NULL ? 0 : p->snd_recover;
248 tcps_rto = p == NULL ? -1 : (p->t_rxtcur * 1000) / `hz;
249 tcps_mss = p == NULL ? -1 : p->t_maxseg;
250 tcps_retransmit = p == NULL ? -1 : p->t_rxtshift > 0 ? 1 : 0;
251 tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */
252 tcps_debug = p == NULL ? 0 :
253 p->t_inpcb.inp_socket->so_options & 1;
254 tcps_cookie = p == NULL ? -1 :
255 p->t_inpcb.inp_socket->so_user_cookie;
256 tcps_dupacks = p == NULL ? -1 : p->t_dupacks;
257 tcps_rtttime = p == NULL ? -1 : p->t_rtttime;
258 tcps_rtseq = p == NULL ? -1 : p->t_rtseq;
259 tcps_ts_recent = p == NULL ? -1 : p->ts_recent;
263 translator tcpinfo_t < struct tcphdr *p > {
264 tcp_sport = p == NULL ? 0 : ntohs(p->th_sport);
265 tcp_dport = p == NULL ? 0 : ntohs(p->th_dport);
266 tcp_seq = p == NULL ? -1 : ntohl(p->th_seq);
267 tcp_ack = p == NULL ? -1 : ntohl(p->th_ack);
268 tcp_offset = p == NULL ? -1 : (p->th_off << 2);
269 tcp_flags = p == NULL ? 0 : ((p->th_x2 << 8) | p->th_flags);
270 tcp_window = p == NULL ? 0 : ntohs(p->th_win);
271 tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum);
272 tcp_urgent = p == NULL ? 0 : ntohs(p->th_urp);
273 tcp_hdr = (struct tcphdr *)p;
282 translator tcpinfoh_t < struct tcphdr *p > {
283 tcp_sport = p == NULL ? 0 : ntohs(p->th_sport);
284 tcp_dport = p == NULL ? 0 : ntohs(p->th_dport);
285 tcp_seq = p == NULL ? -1 : p->th_seq;
286 tcp_ack = p == NULL ? -1 : p->th_ack;
287 tcp_offset = p == NULL ? -1 : (p->th_off << 2);
288 tcp_flags = p == NULL ? 0 : ((p->th_x2 << 8) | p->th_flags);
289 tcp_window = p == NULL ? 0 : p->th_win;
290 tcp_checksum = p == NULL ? 0 : ntohs(p->th_sum);
291 tcp_urgent = p == NULL ? 0 : p->th_urp;
292 tcp_hdr = (struct tcphdr *)p;