Lines Matching refs:net
87 struct sctp_nets *net, uint16_t threshold) in sctp_threshold_management() argument
92 if (net != NULL) { in sctp_threshold_management()
93 net->error_count++; in sctp_threshold_management()
95 (void *)net, net->error_count, in sctp_threshold_management()
96 net->failure_threshold); in sctp_threshold_management()
97 if (net->error_count > net->failure_threshold) { in sctp_threshold_management()
99 if (net->dest_state & SCTP_ADDR_REACHABLE) { in sctp_threshold_management()
100 net->dest_state &= ~SCTP_ADDR_REACHABLE; in sctp_threshold_management()
101 net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY; in sctp_threshold_management()
102 net->dest_state &= ~SCTP_ADDR_PF; in sctp_threshold_management()
105 (void *)net, SCTP_SO_NOT_LOCKED); in sctp_threshold_management()
107 } else if ((net->pf_threshold < net->failure_threshold) && in sctp_threshold_management()
108 (net->error_count > net->pf_threshold)) { in sctp_threshold_management()
109 if ((net->dest_state & SCTP_ADDR_PF) == 0) { in sctp_threshold_management()
110 net->dest_state |= SCTP_ADDR_PF; in sctp_threshold_management()
111 net->last_active = sctp_get_tick_count(); in sctp_threshold_management()
112 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_threshold_management()
114 inp, stcb, net, in sctp_threshold_management()
116 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); in sctp_threshold_management()
119 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) { in sctp_threshold_management()
142 ((net == NULL) ? (uint32_t)0 : (uint32_t)net->dest_state)); in sctp_threshold_management()
166 struct sctp_nets *net, in sctp_find_alternate_net() argument
216 if (mnet == net) { in sctp_find_alternate_net()
278 return (net); in sctp_find_alternate_net()
326 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { in sctp_find_alternate_net()
327 alt = TAILQ_NEXT(net, sctp_next); in sctp_find_alternate_net()
353 (alt != net)) { in sctp_find_alternate_net()
365 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { in sctp_find_alternate_net()
366 alt = TAILQ_NEXT(net, sctp_next); in sctp_find_alternate_net()
383 (alt != net)) { in sctp_find_alternate_net()
399 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { in sctp_find_alternate_net()
400 alt = net; in sctp_find_alternate_net()
411 struct sctp_nets *net, in sctp_backoff_on_timeout() argument
415 if (net->RTO == 0) { in sctp_backoff_on_timeout()
416 if (net->RTO_measured) { in sctp_backoff_on_timeout()
417 net->RTO = stcb->asoc.minrto; in sctp_backoff_on_timeout()
419 net->RTO = stcb->asoc.initial_rto; in sctp_backoff_on_timeout()
422 net->RTO <<= 1; in sctp_backoff_on_timeout()
423 if (net->RTO > stcb->asoc.maxrto) { in sctp_backoff_on_timeout()
424 net->RTO = stcb->asoc.maxrto; in sctp_backoff_on_timeout()
429 stcb->asoc.cc_functions.sctp_cwnd_update_after_timeout(stcb, net); in sctp_backoff_on_timeout()
482 struct sctp_nets *net, in sctp_mark_all_for_resend() argument
517 cur_rto = (net->lastsa >> SCTP_RTT_SHIFT) + net->lastsv; in sctp_mark_all_for_resend()
524 sctp_log_fr(net->flight_size, 0, 0, SCTP_FR_CWND_REPORT); in sctp_mark_all_for_resend()
525 sctp_log_fr(net->flight_size, net->cwnd, stcb->asoc.total_flight, SCTP_FR_CWND_REPORT); in sctp_mark_all_for_resend()
548 orig_flight = net->flight_size; in sctp_mark_all_for_resend()
551 net->fast_retran_ip = 0; in sctp_mark_all_for_resend()
577 if ((chk->whoTo == net) && (chk->sent < SCTP_DATAGRAM_ACKED)) { in sctp_mark_all_for_resend()
665 net->marked_retrans++; in sctp_mark_all_for_resend()
693 if (alt != net) { in sctp_mark_all_for_resend()
722 if ((orig_flight - net->flight_size) != (orig_tf - stcb->asoc.total_flight)) { in sctp_mark_all_for_resend()
749 if ((chk->whoTo == net) && in sctp_mark_all_for_resend()
782 (void *)net); in sctp_mark_all_for_resend()
814 struct sctp_nets *net) in sctp_t3rxt_timer() argument
826 if (net == lnet) { in sctp_t3rxt_timer()
835 (stcb->asoc.total_flight < net->mtu)) { in sctp_t3rxt_timer()
844 if (sctp_threshold_management(inp, stcb, net, in sctp_t3rxt_timer()
849 if (net != stcb->asoc.primary_destination) { in sctp_t3rxt_timer()
855 if (net->last_sent_time.tv_sec) { in sctp_t3rxt_timer()
856 ms_goneby = (uint32_t)(now.tv_sec - net->last_sent_time.tv_sec) * 1000; in sctp_t3rxt_timer()
860 if ((net->dest_state & SCTP_ADDR_PF) == 0) { in sctp_t3rxt_timer()
861 if ((ms_goneby > net->RTO) || (net->RTO == 0)) { in sctp_t3rxt_timer()
867 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_t3rxt_timer()
886 if (net->pf_threshold < net->failure_threshold) { in sctp_t3rxt_timer()
887 alt = sctp_find_alternate_net(stcb, net, 2); in sctp_t3rxt_timer()
894 alt = sctp_find_alternate_net(stcb, net, 1); in sctp_t3rxt_timer()
901 net->find_pseudo_cumack = 1; in sctp_t3rxt_timer()
902 net->find_rtx_pseudo_cumack = 1; in sctp_t3rxt_timer()
905 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_t3rxt_timer()
910 (void)sctp_mark_all_for_resend(stcb, net, alt, win_probe, in sctp_t3rxt_timer()
916 net->fast_retran_loss_recovery = 0; in sctp_t3rxt_timer()
918 (net->flight_size == 0)) { in sctp_t3rxt_timer()
919 (*stcb->asoc.cc_functions.sctp_cwnd_new_transmission_begins) (stcb, net); in sctp_t3rxt_timer()
929 sctp_backoff_on_timeout(stcb, net, win_probe, num_mk, num_abandoned); in sctp_t3rxt_timer()
930 if (((net->dest_state & SCTP_ADDR_REACHABLE) == 0) || in sctp_t3rxt_timer()
931 (net->dest_state & SCTP_ADDR_PF)) { in sctp_t3rxt_timer()
933 sctp_move_chunks_from_net(stcb, net); in sctp_t3rxt_timer()
939 if (net->ro._s_addr != NULL) { in sctp_t3rxt_timer()
940 sctp_free_ifa(net->ro._s_addr); in sctp_t3rxt_timer()
941 net->ro._s_addr = NULL; in sctp_t3rxt_timer()
943 net->src_addr_selected = 0; in sctp_t3rxt_timer()
946 RO_NHFREE(&net->ro); in sctp_t3rxt_timer()
949 if ((stcb->asoc.primary_destination == net) && (alt != net)) { in sctp_t3rxt_timer()
973 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_t3rxt_timer()
995 sctp_log_cwnd(stcb, net, net->cwnd, SCTP_CWND_LOG_FROM_RTX); in sctp_t3rxt_timer()
1003 struct sctp_nets *net) in sctp_t1init_timer() argument
1018 if (sctp_threshold_management(inp, stcb, net, in sctp_t1init_timer()
1025 if (stcb->asoc.initial_init_rto_max < net->RTO) { in sctp_t1init_timer()
1026 net->RTO = stcb->asoc.initial_init_rto_max; in sctp_t1init_timer()
1051 struct sctp_nets *net SCTP_UNUSED) in sctp_cookie_timer()
1116 struct sctp_nets *alt, *net; in sctp_strreset_timer() local
1127 net = strrst->whoTo; in sctp_strreset_timer()
1129 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_strreset_timer()
1137 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_strreset_timer()
1138 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_strreset_timer()
1144 if ((chk->whoTo == net) && in sctp_strreset_timer()
1156 if ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) { in sctp_strreset_timer()
1161 sctp_move_chunks_from_net(stcb, net); in sctp_strreset_timer()
1163 sctp_free_remote_addr(net); in sctp_strreset_timer()
1178 struct sctp_nets *net) in sctp_asconf_timer() argument
1186 sctp_send_asconf(stcb, net, SCTP_ADDR_NOT_LOCKED); in sctp_asconf_timer()
1197 net = asconf->whoTo; in sctp_asconf_timer()
1199 if (sctp_threshold_management(inp, stcb, net, in sctp_asconf_timer()
1220 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_asconf_timer()
1221 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_asconf_timer()
1229 if ((chk->whoTo == net) && in sctp_asconf_timer()
1252 if ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) { in sctp_asconf_timer()
1257 sctp_move_chunks_from_net(stcb, net); in sctp_asconf_timer()
1259 sctp_free_remote_addr(net); in sctp_asconf_timer()
1298 struct sctp_nets *net) in sctp_shutdown_timer() argument
1303 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdown_timer()
1307 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_shutdown_timer()
1309 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_shutdown_timer()
1321 struct sctp_nets *net) in sctp_shutdownack_timer() argument
1326 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdownack_timer()
1330 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_shutdownack_timer()
1332 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_shutdownack_timer()
1408 struct sctp_nets *net) in sctp_heartbeat_timer() argument
1412 net_was_pf = (net->dest_state & SCTP_ADDR_PF) != 0; in sctp_heartbeat_timer()
1413 if (net->hb_responded == 0) { in sctp_heartbeat_timer()
1414 if (net->ro._s_addr != NULL) { in sctp_heartbeat_timer()
1419 sctp_free_ifa(net->ro._s_addr); in sctp_heartbeat_timer()
1420 net->ro._s_addr = NULL; in sctp_heartbeat_timer()
1421 net->src_addr_selected = 0; in sctp_heartbeat_timer()
1423 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_heartbeat_timer()
1424 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_heartbeat_timer()
1430 if (net->partial_bytes_acked > 0) { in sctp_heartbeat_timer()
1431 net->partial_bytes_acked = 0; in sctp_heartbeat_timer()
1438 if ((((net->dest_state & SCTP_ADDR_NOHB) == 0) || in sctp_heartbeat_timer()
1439 (net->dest_state & SCTP_ADDR_UNCONFIRMED)) && in sctp_heartbeat_timer()
1440 (net_was_pf || ((net->dest_state & SCTP_ADDR_PF) == 0))) { in sctp_heartbeat_timer()
1447 if ((net->last_sent_time.tv_sec > 0) || in sctp_heartbeat_timer()
1448 (net->last_sent_time.tv_usec > 0)) { in sctp_heartbeat_timer()
1452 timevalsub(&diff, &net->last_sent_time); in sctp_heartbeat_timer()
1458 if ((ms_gone_by >= net->heart_beat_delay) || in sctp_heartbeat_timer()
1459 (net->dest_state & SCTP_ADDR_UNCONFIRMED) || in sctp_heartbeat_timer()
1460 (net->dest_state & SCTP_ADDR_PF)) { in sctp_heartbeat_timer()
1461 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_heartbeat_timer()
1470 struct sctp_nets *net) in sctp_pathmtu_timer() argument
1474 next_mtu = sctp_get_next_mtu(net->mtu); in sctp_pathmtu_timer()
1476 if ((next_mtu > net->mtu) && (net->port == 0)) { in sctp_pathmtu_timer()
1477 if ((net->src_addr_selected == 0) || in sctp_pathmtu_timer()
1478 (net->ro._s_addr == NULL) || in sctp_pathmtu_timer()
1479 (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) { in sctp_pathmtu_timer()
1480 if ((net->ro._s_addr != NULL) && (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) { in sctp_pathmtu_timer()
1481 sctp_free_ifa(net->ro._s_addr); in sctp_pathmtu_timer()
1482 net->ro._s_addr = NULL; in sctp_pathmtu_timer()
1483 net->src_addr_selected = 0; in sctp_pathmtu_timer()
1484 } else if (net->ro._s_addr == NULL) { in sctp_pathmtu_timer()
1486 if (net->ro._l_addr.sa.sa_family == AF_INET6) { in sctp_pathmtu_timer()
1487 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_pathmtu_timer()
1494 net->ro._s_addr = sctp_source_address_selection(inp, in sctp_pathmtu_timer()
1496 (sctp_route_t *)&net->ro, in sctp_pathmtu_timer()
1497 net, 0, stcb->asoc.vrf_id); in sctp_pathmtu_timer()
1499 if (net->ro._l_addr.sa.sa_family == AF_INET6) { in sctp_pathmtu_timer()
1500 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_pathmtu_timer()
1506 if (net->ro._s_addr) in sctp_pathmtu_timer()
1507 net->src_addr_selected = 1; in sctp_pathmtu_timer()
1509 if (net->ro._s_addr) { in sctp_pathmtu_timer()
1510 mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_nh); in sctp_pathmtu_timer()
1512 if (net->port) { in sctp_pathmtu_timer()
1517 net->mtu = next_mtu; in sctp_pathmtu_timer()
1519 net->mtu = mtu; in sctp_pathmtu_timer()
1524 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net); in sctp_pathmtu_timer()
1566 struct sctp_nets *net; in sctp_autoclose_timer() local
1575 net = stcb->asoc.alternate; in sctp_autoclose_timer()
1577 net = stcb->asoc.primary_destination; in sctp_autoclose_timer()
1579 sctp_send_shutdown(stcb, net); in sctp_autoclose_timer()
1581 stcb->sctp_ep, stcb, net); in sctp_autoclose_timer()