MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bbr_set_state

Function bbr_set_state

freebsd/netinet/tcp_stacks/bbr.c:10351–10394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10349}
10350
10351static void
10352bbr_set_state(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t win)
10353{
10354 switch (tp->t_state) {
10355 case TCPS_SYN_SENT:
10356 bbr->r_state = TCPS_SYN_SENT;
10357 bbr->r_substate = bbr_do_syn_sent;
10358 break;
10359 case TCPS_SYN_RECEIVED:
10360 bbr->r_state = TCPS_SYN_RECEIVED;
10361 bbr->r_substate = bbr_do_syn_recv;
10362 break;
10363 case TCPS_ESTABLISHED:
10364 bbr->r_ctl.rc_init_rwnd = max(win, bbr->rc_tp->snd_wnd);
10365 bbr->r_state = TCPS_ESTABLISHED;
10366 bbr->r_substate = bbr_do_established;
10367 break;
10368 case TCPS_CLOSE_WAIT:
10369 bbr->r_state = TCPS_CLOSE_WAIT;
10370 bbr->r_substate = bbr_do_close_wait;
10371 break;
10372 case TCPS_FIN_WAIT_1:
10373 bbr->r_state = TCPS_FIN_WAIT_1;
10374 bbr->r_substate = bbr_do_fin_wait_1;
10375 break;
10376 case TCPS_CLOSING:
10377 bbr->r_state = TCPS_CLOSING;
10378 bbr->r_substate = bbr_do_closing;
10379 break;
10380 case TCPS_LAST_ACK:
10381 bbr->r_state = TCPS_LAST_ACK;
10382 bbr->r_substate = bbr_do_lastack;
10383 break;
10384 case TCPS_FIN_WAIT_2:
10385 bbr->r_state = TCPS_FIN_WAIT_2;
10386 bbr->r_substate = bbr_do_fin_wait_2;
10387 break;
10388 case TCPS_LISTEN:
10389 case TCPS_CLOSED:
10390 case TCPS_TIME_WAIT:
10391 default:
10392 break;
10393 };
10394}
10395
10396static void
10397bbr_substate_change(struct tcp_bbr *bbr, uint32_t cts, int32_t line, int dolog)

Callers 4

bbr_timeout_rackFunction · 0.85
bbr_timeout_tlpFunction · 0.85
bbr_remxt_tmrFunction · 0.85
bbr_do_segment_nounlockFunction · 0.85

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected