Lines Matching refs:net
92 struct sctp_nets *net, uint16_t threshold) in sctp_threshold_management() argument
94 if (net) { in sctp_threshold_management()
95 net->error_count++; in sctp_threshold_management()
97 (void *)net, net->error_count, in sctp_threshold_management()
98 net->failure_threshold); in sctp_threshold_management()
99 if (net->error_count > net->failure_threshold) { in sctp_threshold_management()
101 if (net->dest_state & SCTP_ADDR_REACHABLE) { in sctp_threshold_management()
102 net->dest_state &= ~SCTP_ADDR_REACHABLE; in sctp_threshold_management()
103 net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY; in sctp_threshold_management()
104 net->dest_state &= ~SCTP_ADDR_PF; in sctp_threshold_management()
107 (void *)net, SCTP_SO_NOT_LOCKED); in sctp_threshold_management()
109 } else if ((net->pf_threshold < net->failure_threshold) && in sctp_threshold_management()
110 (net->error_count > net->pf_threshold)) { in sctp_threshold_management()
111 if (!(net->dest_state & SCTP_ADDR_PF)) { in sctp_threshold_management()
112 net->dest_state |= SCTP_ADDR_PF; in sctp_threshold_management()
113 net->last_active = sctp_get_tick_count(); in sctp_threshold_management()
114 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_threshold_management()
116 inp, stcb, net, in sctp_threshold_management()
118 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); in sctp_threshold_management()
125 if (net) { in sctp_threshold_management()
126 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) { in sctp_threshold_management()
149 ((net == NULL) ? (uint32_t)0 : (uint32_t)net->dest_state)); in sctp_threshold_management()
173 struct sctp_nets *net, in sctp_find_alternate_net() argument
223 if (mnet == net) { in sctp_find_alternate_net()
285 return (net); in sctp_find_alternate_net()
332 mnet = net; in sctp_find_alternate_net()
373 mnet = net; in sctp_find_alternate_net()
390 (alt != net)) { in sctp_find_alternate_net()
398 return (net); in sctp_find_alternate_net()
405 struct sctp_nets *net, in sctp_backoff_on_timeout() argument
409 if (net->RTO == 0) { in sctp_backoff_on_timeout()
410 if (net->RTO_measured) { in sctp_backoff_on_timeout()
411 net->RTO = stcb->asoc.minrto; in sctp_backoff_on_timeout()
413 net->RTO = stcb->asoc.initial_rto; in sctp_backoff_on_timeout()
416 net->RTO <<= 1; in sctp_backoff_on_timeout()
417 if (net->RTO > stcb->asoc.maxrto) { in sctp_backoff_on_timeout()
418 net->RTO = stcb->asoc.maxrto; in sctp_backoff_on_timeout()
423 stcb->asoc.cc_functions.sctp_cwnd_update_after_timeout(stcb, net); in sctp_backoff_on_timeout()
476 struct sctp_nets *net, in sctp_mark_all_for_resend() argument
510 cur_rto = (net->lastsa >> SCTP_RTT_SHIFT) + net->lastsv; in sctp_mark_all_for_resend()
517 sctp_log_fr(net->flight_size, 0, 0, SCTP_FR_CWND_REPORT); in sctp_mark_all_for_resend()
518 sctp_log_fr(net->flight_size, net->cwnd, stcb->asoc.total_flight, SCTP_FR_CWND_REPORT); in sctp_mark_all_for_resend()
541 orig_flight = net->flight_size; in sctp_mark_all_for_resend()
544 net->fast_retran_ip = 0; in sctp_mark_all_for_resend()
570 if ((chk->whoTo == net) && (chk->sent < SCTP_DATAGRAM_ACKED)) { in sctp_mark_all_for_resend()
658 net->marked_retrans++; in sctp_mark_all_for_resend()
686 if (alt != net) { in sctp_mark_all_for_resend()
715 if ((orig_flight - net->flight_size) != (orig_tf - stcb->asoc.total_flight)) { in sctp_mark_all_for_resend()
742 if ((chk->whoTo == net) && in sctp_mark_all_for_resend()
775 (void *)net); in sctp_mark_all_for_resend()
808 struct sctp_nets *net) in sctp_t3rxt_timer() argument
820 if (net == lnet) { in sctp_t3rxt_timer()
829 (stcb->asoc.total_flight < net->mtu)) { in sctp_t3rxt_timer()
838 if (sctp_threshold_management(inp, stcb, net, in sctp_t3rxt_timer()
843 if (net != stcb->asoc.primary_destination) { in sctp_t3rxt_timer()
849 if (net->last_sent_time.tv_sec) { in sctp_t3rxt_timer()
850 ms_goneby = (now.tv_sec - net->last_sent_time.tv_sec) * 1000; in sctp_t3rxt_timer()
854 if ((net->dest_state & SCTP_ADDR_PF) == 0) { in sctp_t3rxt_timer()
855 if ((ms_goneby > net->RTO) || (net->RTO == 0)) { in sctp_t3rxt_timer()
861 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_t3rxt_timer()
880 if (net->pf_threshold < net->failure_threshold) { in sctp_t3rxt_timer()
881 alt = sctp_find_alternate_net(stcb, net, 2); in sctp_t3rxt_timer()
888 alt = sctp_find_alternate_net(stcb, net, 1); in sctp_t3rxt_timer()
895 net->find_pseudo_cumack = 1; in sctp_t3rxt_timer()
896 net->find_rtx_pseudo_cumack = 1; in sctp_t3rxt_timer()
899 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_t3rxt_timer()
904 (void)sctp_mark_all_for_resend(stcb, net, alt, win_probe, in sctp_t3rxt_timer()
910 net->fast_retran_loss_recovery = 0; in sctp_t3rxt_timer()
912 (net->flight_size == 0)) { in sctp_t3rxt_timer()
913 (*stcb->asoc.cc_functions.sctp_cwnd_new_transmission_begins) (stcb, net); in sctp_t3rxt_timer()
923 sctp_backoff_on_timeout(stcb, net, win_probe, num_mk, num_abandoned); in sctp_t3rxt_timer()
924 if ((!(net->dest_state & SCTP_ADDR_REACHABLE)) || in sctp_t3rxt_timer()
925 (net->dest_state & SCTP_ADDR_PF)) { in sctp_t3rxt_timer()
927 sctp_move_chunks_from_net(stcb, net); in sctp_t3rxt_timer()
933 if (net->ro._s_addr) { in sctp_t3rxt_timer()
934 sctp_free_ifa(net->ro._s_addr); in sctp_t3rxt_timer()
935 net->ro._s_addr = NULL; in sctp_t3rxt_timer()
937 net->src_addr_selected = 0; in sctp_t3rxt_timer()
940 if (net->ro.ro_rt) { in sctp_t3rxt_timer()
941 RTFREE(net->ro.ro_rt); in sctp_t3rxt_timer()
942 net->ro.ro_rt = NULL; in sctp_t3rxt_timer()
946 if ((stcb->asoc.primary_destination == net) && (alt != net)) { in sctp_t3rxt_timer()
970 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_t3rxt_timer()
987 sctp_log_cwnd(stcb, net, net->cwnd, SCTP_CWND_LOG_FROM_RTX); in sctp_t3rxt_timer()
995 struct sctp_nets *net) in sctp_t1init_timer() argument
1010 if (sctp_threshold_management(inp, stcb, net, in sctp_t1init_timer()
1017 if (stcb->asoc.initial_init_rto_max < net->RTO) { in sctp_t1init_timer()
1018 net->RTO = stcb->asoc.initial_init_rto_max; in sctp_t1init_timer()
1043 struct sctp_nets *net SCTP_UNUSED) in sctp_cookie_timer()
1107 struct sctp_nets *net) in sctp_strreset_timer() argument
1138 if ((chk->whoTo == net) && in sctp_strreset_timer()
1150 if (!(net->dest_state & SCTP_ADDR_REACHABLE)) { in sctp_strreset_timer()
1155 sctp_move_chunks_from_net(stcb, net); in sctp_strreset_timer()
1170 struct sctp_nets *net) in sctp_asconf_timer() argument
1178 sctp_send_asconf(stcb, net, SCTP_ADDR_NOT_LOCKED); in sctp_asconf_timer()
1204 sctp_asconf_cleanup(stcb, net); in sctp_asconf_timer()
1221 if ((chk->whoTo == net) && in sctp_asconf_timer()
1244 if (!(net->dest_state & SCTP_ADDR_REACHABLE)) { in sctp_asconf_timer()
1249 sctp_move_chunks_from_net(stcb, net); in sctp_asconf_timer()
1266 struct sctp_nets *net SCTP_UNUSED) in sctp_delete_prim_timer()
1289 struct sctp_nets *net) in sctp_shutdown_timer() argument
1294 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdown_timer()
1298 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_shutdown_timer()
1300 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_shutdown_timer()
1312 struct sctp_nets *net) in sctp_shutdownack_timer() argument
1317 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdownack_timer()
1321 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_shutdownack_timer()
1323 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_shutdownack_timer()
1400 struct sctp_nets *net) in sctp_heartbeat_timer() argument
1404 if (net->dest_state & SCTP_ADDR_PF) { in sctp_heartbeat_timer()
1409 if (net->hb_responded == 0) { in sctp_heartbeat_timer()
1410 if (net->ro._s_addr) { in sctp_heartbeat_timer()
1415 sctp_free_ifa(net->ro._s_addr); in sctp_heartbeat_timer()
1416 net->ro._s_addr = NULL; in sctp_heartbeat_timer()
1417 net->src_addr_selected = 0; in sctp_heartbeat_timer()
1419 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_heartbeat_timer()
1420 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_heartbeat_timer()
1426 if (net->partial_bytes_acked) { in sctp_heartbeat_timer()
1427 net->partial_bytes_acked = 0; in sctp_heartbeat_timer()
1434 if (!(net->dest_state & SCTP_ADDR_NOHB) && in sctp_heartbeat_timer()
1435 !((net_was_pf == 0) && (net->dest_state & SCTP_ADDR_PF))) { in sctp_heartbeat_timer()
1442 if ((net->last_sent_time.tv_sec > 0) || in sctp_heartbeat_timer()
1443 (net->last_sent_time.tv_usec > 0)) { in sctp_heartbeat_timer()
1447 timevalsub(&diff, &net->last_sent_time); in sctp_heartbeat_timer()
1453 if ((ms_gone_by >= net->heart_beat_delay) || in sctp_heartbeat_timer()
1454 (net->dest_state & SCTP_ADDR_PF)) { in sctp_heartbeat_timer()
1455 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_heartbeat_timer()
1464 struct sctp_nets *net) in sctp_pathmtu_timer() argument
1468 next_mtu = sctp_get_next_mtu(net->mtu); in sctp_pathmtu_timer()
1470 if ((next_mtu > net->mtu) && (net->port == 0)) { in sctp_pathmtu_timer()
1471 if ((net->src_addr_selected == 0) || in sctp_pathmtu_timer()
1472 (net->ro._s_addr == NULL) || in sctp_pathmtu_timer()
1473 (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) { in sctp_pathmtu_timer()
1474 if ((net->ro._s_addr != NULL) && (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) { in sctp_pathmtu_timer()
1475 sctp_free_ifa(net->ro._s_addr); in sctp_pathmtu_timer()
1476 net->ro._s_addr = NULL; in sctp_pathmtu_timer()
1477 net->src_addr_selected = 0; in sctp_pathmtu_timer()
1478 } else if (net->ro._s_addr == NULL) { in sctp_pathmtu_timer()
1480 if (net->ro._l_addr.sa.sa_family == AF_INET6) { in sctp_pathmtu_timer()
1481 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_pathmtu_timer()
1488 net->ro._s_addr = sctp_source_address_selection(inp, in sctp_pathmtu_timer()
1490 (sctp_route_t *)&net->ro, in sctp_pathmtu_timer()
1491 net, 0, stcb->asoc.vrf_id); in sctp_pathmtu_timer()
1493 if (net->ro._l_addr.sa.sa_family == AF_INET6) { in sctp_pathmtu_timer()
1494 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_pathmtu_timer()
1500 if (net->ro._s_addr) in sctp_pathmtu_timer()
1501 net->src_addr_selected = 1; in sctp_pathmtu_timer()
1503 if (net->ro._s_addr) { in sctp_pathmtu_timer()
1504 mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_rt); in sctp_pathmtu_timer()
1506 if (net->port) { in sctp_pathmtu_timer()
1511 net->mtu = next_mtu; in sctp_pathmtu_timer()
1513 net->mtu = mtu; in sctp_pathmtu_timer()
1518 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net); in sctp_pathmtu_timer()
1524 struct sctp_nets *net) in sctp_autoclose_timer() argument
1596 net); in sctp_autoclose_timer()