Lines Matching refs:net

135     struct sctp_nets *net, uint16_t threshold)  in sctp_threshold_management()  argument
137 if (net) { in sctp_threshold_management()
138 net->error_count++; in sctp_threshold_management()
142 net, net->error_count, in sctp_threshold_management()
143 net->failure_threshold); in sctp_threshold_management()
146 if (net->error_count >= net->failure_threshold) { in sctp_threshold_management()
148 if (net->dest_state & SCTP_ADDR_REACHABLE) { in sctp_threshold_management()
149 net->dest_state &= ~SCTP_ADDR_REACHABLE; in sctp_threshold_management()
150 net->dest_state |= SCTP_ADDR_NOT_REACHABLE; in sctp_threshold_management()
151 if (net == stcb->asoc.primary_destination) { in sctp_threshold_management()
152 net->dest_state |= SCTP_ADDR_WAS_PRIMARY; in sctp_threshold_management()
157 (void *)net); in sctp_threshold_management()
170 if (net) { in sctp_threshold_management()
171 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) { in sctp_threshold_management()
183 ((net == NULL) ? (u_int)0 : (u_int)net->dest_state)); in sctp_threshold_management()
213 struct sctp_nets *net) in sctp_find_alternate_net() argument
224 mnet = net; in sctp_find_alternate_net()
260 mnet = net; in sctp_find_alternate_net()
271 (alt != net)) { in sctp_find_alternate_net()
279 return (net); in sctp_find_alternate_net()
286 struct sctp_nets *net, in sctp_backoff_on_timeout() argument
293 oldRTO = net->RTO; in sctp_backoff_on_timeout()
295 net->RTO <<= 1; in sctp_backoff_on_timeout()
299 oldRTO, net->RTO); in sctp_backoff_on_timeout()
303 if (net->RTO > stcb->asoc.maxrto) { in sctp_backoff_on_timeout()
304 net->RTO = stcb->asoc.maxrto; in sctp_backoff_on_timeout()
308 net->RTO); in sctp_backoff_on_timeout()
317 int old_cwnd=net->cwnd; in sctp_backoff_on_timeout()
319 net->ssthresh = net->cwnd >> 1; in sctp_backoff_on_timeout()
320 if (net->ssthresh < (net->mtu << 1)) { in sctp_backoff_on_timeout()
321 net->ssthresh = (net->mtu << 1); in sctp_backoff_on_timeout()
323 net->cwnd = net->mtu; in sctp_backoff_on_timeout()
325 if (net->cwnd < net->mtu) in sctp_backoff_on_timeout()
326 net->cwnd = net->mtu; in sctp_backoff_on_timeout()
328 sctp_log_cwnd(net, net->cwnd-old_cwnd, SCTP_CWND_LOG_FROM_RTX); in sctp_backoff_on_timeout()
331 net->partial_bytes_acked = 0; in sctp_backoff_on_timeout()
335 net->ssthresh); in sctp_backoff_on_timeout()
345 struct sctp_nets *net, in sctp_mark_all_for_resend() argument
375 cur_rto = (((net->lastsa >> 2) + net->lastsv) >> 1); in sctp_mark_all_for_resend()
405 if (stcb->asoc.total_flight >= net->flight_size) { in sctp_mark_all_for_resend()
406 stcb->asoc.total_flight -= net->flight_size; in sctp_mark_all_for_resend()
415 orig_flight = net->flight_size; in sctp_mark_all_for_resend()
416 stcb->asoc.peers_rwnd += net->flight_size; in sctp_mark_all_for_resend()
417 net->flight_size = 0; in sctp_mark_all_for_resend()
418 net->rto_pending = 0; in sctp_mark_all_for_resend()
419 net->fast_retran_ip= 0; in sctp_mark_all_for_resend()
458 if ((chk->whoTo == net) && (chk->sent < SCTP_DATAGRAM_ACKED)) { in sctp_mark_all_for_resend()
556 if (alt != net) { in sctp_mark_all_for_resend()
614 if ((chk->whoTo == net) && in sctp_mark_all_for_resend()
626 (orig_flight <= net->mtu)) { in sctp_mark_all_for_resend()
636 orig_flight, net->mtu); in sctp_mark_all_for_resend()
645 net); in sctp_mark_all_for_resend()
691 struct sctp_nets *net, in sctp_move_all_chunks_to_alt() argument
698 if (net == alt) in sctp_move_all_chunks_to_alt()
711 if (chk->whoTo == net) { in sctp_move_all_chunks_to_alt()
720 if (chk->whoTo == net) { in sctp_move_all_chunks_to_alt()
732 struct sctp_nets *net) in sctp_t3rxt_timer() argument
742 alt = sctp_find_alternate_net(stcb, net); in sctp_t3rxt_timer()
743 win_probe = sctp_mark_all_for_resend(stcb, net, alt, &num_mk); in sctp_t3rxt_timer()
755 sctp_backoff_on_timeout(stcb, net, win_probe, num_mk); in sctp_t3rxt_timer()
758 if (sctp_threshold_management(inp, stcb, net, in sctp_t3rxt_timer()
763 if (net != stcb->asoc.primary_destination) { in sctp_t3rxt_timer()
768 if (net->last_sent_time.tv_sec) { in sctp_t3rxt_timer()
769 ms_goneby = (now.tv_sec - net->last_sent_time.tv_sec) * 1000; in sctp_t3rxt_timer()
773 if ((ms_goneby > net->RTO) || (net->RTO == 0)) { in sctp_t3rxt_timer()
775 sctp_send_hb(stcb, 1, net); in sctp_t3rxt_timer()
792 if (net->dest_state & SCTP_ADDR_NOT_REACHABLE) { in sctp_t3rxt_timer()
794 sctp_move_all_chunks_to_alt(stcb, net, alt); in sctp_t3rxt_timer()
796 if ((stcb->asoc.primary_destination == net) && (alt != net)) { in sctp_t3rxt_timer()
807 net->dest_state |= SCTP_ADDR_WAS_PRIMARY; in sctp_t3rxt_timer()
808 net->src_addr_selected = 0; in sctp_t3rxt_timer()
826 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_t3rxt_timer()
858 struct sctp_nets *net) in sctp_t1init_timer() argument
870 if (sctp_threshold_management(inp, stcb, net, in sctp_t1init_timer()
877 if (stcb->asoc.initial_init_rto_max < net->RTO) { in sctp_t1init_timer()
878 net->RTO = stcb->asoc.initial_init_rto_max; in sctp_t1init_timer()
901 struct sctp_nets *net) in sctp_cookie_timer() argument
965 struct sctp_nets *net) in sctp_strreset_timer() argument
1008 if ((chk->whoTo == net) && in sctp_strreset_timer()
1019 if (net->dest_state & SCTP_ADDR_NOT_REACHABLE) { in sctp_strreset_timer()
1024 sctp_move_all_chunks_to_alt(stcb, net, alt); in sctp_strreset_timer()
1037 struct sctp_nets *net) in sctp_asconf_timer() argument
1045 sctp_send_asconf(stcb, net); in sctp_asconf_timer()
1087 sctp_asconf_cleanup(stcb, net); in sctp_asconf_timer()
1102 if ((chk->whoTo == net) && in sctp_asconf_timer()
1114 if (net->dest_state & SCTP_ADDR_NOT_REACHABLE) { in sctp_asconf_timer()
1119 sctp_move_all_chunks_to_alt(stcb, net, alt); in sctp_asconf_timer()
1137 struct sctp_nets *net) in sctp_shutdown_timer() argument
1141 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdown_timer()
1146 alt = sctp_find_alternate_net(stcb, net); in sctp_shutdown_timer()
1171 struct sctp_nets *net) in sctp_shutdownack_timer() argument
1175 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdownack_timer()
1180 alt = sctp_find_alternate_net(stcb, net); in sctp_shutdownack_timer()
1240 struct sctp_nets *net) in sctp_heartbeat_timer() argument
1244 if (net) { in sctp_heartbeat_timer()
1245 if (net->hb_responded == 0) { in sctp_heartbeat_timer()
1246 sctp_backoff_on_timeout(stcb, net, 1, 0); in sctp_heartbeat_timer()
1249 if (net->partial_bytes_acked) { in sctp_heartbeat_timer()
1250 net->partial_bytes_acked = 0; in sctp_heartbeat_timer()
1253 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { in sctp_heartbeat_timer()
1254 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) && in sctp_heartbeat_timer()
1255 (net->dest_state & SCTP_ADDR_REACHABLE)) { in sctp_heartbeat_timer()
1326 struct sctp_nets *net) in sctp_pathmtu_timer() argument
1332 next_mtu = sctp_getnext_mtu(inp, net->mtu); in sctp_pathmtu_timer()
1333 if (next_mtu <= net->mtu) { in sctp_pathmtu_timer()
1337 rt = rtcache_validate(&net->ro); in sctp_pathmtu_timer()
1347 net->mtu = next_mtu; in sctp_pathmtu_timer()
1350 rtcache_unref(rt, &net->ro); in sctp_pathmtu_timer()
1353 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net); in sctp_pathmtu_timer()
1358 struct sctp_nets *net) in sctp_autoclose_timer() argument
1425 net); in sctp_autoclose_timer()