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

Function sctp_shutdown_timer

freebsd/netinet/sctp_timer.c:1300–1321  ·  view source on GitHub ↗

* For the shutdown and shutdown-ack, we do not keep one around on the * control queue. This means we must generate a new one and call the general * chunk output routine, AFTER having done threshold management. * It is assumed that net is non-NULL. */

Source from the content-addressed store, hash-verified

1298 * It is assumed that net is non-NULL.
1299 */
1300int
1301sctp_shutdown_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
1302 struct sctp_nets *net)
1303{
1304 struct sctp_nets *alt;
1305
1306 /* first threshold management */
1307 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1308 /* Assoc is over */
1309 return (1);
1310 }
1311 sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
1312 /* second select an alternative */
1313 alt = sctp_find_alternate_net(stcb, net, 0);
1314
1315 /* third generate a shutdown into the queue for out net */
1316 sctp_send_shutdown(stcb, alt);
1317
1318 /* fourth restart timer */
1319 sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, alt);
1320 return (0);
1321}
1322
1323int
1324sctp_shutdownack_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb,

Callers 1

sctp_timeout_handlerFunction · 0.85

Calls 5

sctp_backoff_on_timeoutFunction · 0.85
sctp_find_alternate_netFunction · 0.85
sctp_send_shutdownFunction · 0.85
sctp_timer_startFunction · 0.85

Tested by

no test coverage detected