Lines Matching refs:net
88 struct sctp_nets *net, uint16_t threshold) in sctp_threshold_management() argument
93 if (net != NULL) { in sctp_threshold_management()
94 net->error_count++; in sctp_threshold_management()
96 (void *)net, net->error_count, in sctp_threshold_management()
97 net->failure_threshold); in sctp_threshold_management()
98 if (net->error_count > net->failure_threshold) { in sctp_threshold_management()
100 if (net->dest_state & SCTP_ADDR_REACHABLE) { in sctp_threshold_management()
101 net->dest_state &= ~SCTP_ADDR_REACHABLE; in sctp_threshold_management()
102 net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY; in sctp_threshold_management()
103 net->dest_state &= ~SCTP_ADDR_PF; in sctp_threshold_management()
106 (void *)net, SCTP_SO_NOT_LOCKED); in sctp_threshold_management()
108 } else if ((net->pf_threshold < net->failure_threshold) && in sctp_threshold_management()
109 (net->error_count > net->pf_threshold)) { in sctp_threshold_management()
110 if ((net->dest_state & SCTP_ADDR_PF) == 0) { in sctp_threshold_management()
111 net->dest_state |= SCTP_ADDR_PF; in sctp_threshold_management()
112 net->last_active = sctp_get_tick_count(); in sctp_threshold_management()
113 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_threshold_management()
115 inp, stcb, net, in sctp_threshold_management()
117 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); in sctp_threshold_management()
120 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) { in sctp_threshold_management()
143 ((net == NULL) ? (uint32_t)0 : (uint32_t)net->dest_state)); in sctp_threshold_management()
167 struct sctp_nets *net, in sctp_find_alternate_net() argument
217 if (mnet == net) { in sctp_find_alternate_net()
279 return (net); in sctp_find_alternate_net()
327 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { in sctp_find_alternate_net()
328 alt = TAILQ_NEXT(net, sctp_next); in sctp_find_alternate_net()
354 (alt != net)) { in sctp_find_alternate_net()
366 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { in sctp_find_alternate_net()
367 alt = TAILQ_NEXT(net, sctp_next); in sctp_find_alternate_net()
384 (alt != net)) { in sctp_find_alternate_net()
400 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { in sctp_find_alternate_net()
401 alt = net; in sctp_find_alternate_net()
412 struct sctp_nets *net, in sctp_backoff_on_timeout() argument
416 if (net->RTO == 0) { in sctp_backoff_on_timeout()
417 if (net->RTO_measured) { in sctp_backoff_on_timeout()
418 net->RTO = stcb->asoc.minrto; in sctp_backoff_on_timeout()
420 net->RTO = stcb->asoc.initial_rto; in sctp_backoff_on_timeout()
423 net->RTO <<= 1; in sctp_backoff_on_timeout()
424 if (net->RTO > stcb->asoc.maxrto) { in sctp_backoff_on_timeout()
425 net->RTO = stcb->asoc.maxrto; in sctp_backoff_on_timeout()
430 stcb->asoc.cc_functions.sctp_cwnd_update_after_timeout(stcb, net); in sctp_backoff_on_timeout()
483 struct sctp_nets *net, in sctp_mark_all_for_resend() argument
518 cur_rto = (net->lastsa >> SCTP_RTT_SHIFT) + net->lastsv; in sctp_mark_all_for_resend()
525 sctp_log_fr(net->flight_size, 0, 0, SCTP_FR_CWND_REPORT); in sctp_mark_all_for_resend()
526 sctp_log_fr(net->flight_size, net->cwnd, stcb->asoc.total_flight, SCTP_FR_CWND_REPORT); in sctp_mark_all_for_resend()
549 orig_flight = net->flight_size; in sctp_mark_all_for_resend()
552 net->fast_retran_ip = 0; in sctp_mark_all_for_resend()
578 if ((chk->whoTo == net) && (chk->sent < SCTP_DATAGRAM_ACKED)) { in sctp_mark_all_for_resend()
666 net->marked_retrans++; in sctp_mark_all_for_resend()
694 if (alt != net) { in sctp_mark_all_for_resend()
723 if ((orig_flight - net->flight_size) != (orig_tf - stcb->asoc.total_flight)) { in sctp_mark_all_for_resend()
750 if ((chk->whoTo == net) && in sctp_mark_all_for_resend()
783 (void *)net); in sctp_mark_all_for_resend()
815 struct sctp_nets *net) in sctp_t3rxt_timer() argument
827 if (net == lnet) { in sctp_t3rxt_timer()
836 (stcb->asoc.total_flight < net->mtu)) { in sctp_t3rxt_timer()
845 if (sctp_threshold_management(inp, stcb, net, in sctp_t3rxt_timer()
850 if (net != stcb->asoc.primary_destination) { in sctp_t3rxt_timer()
856 if (net->last_sent_time.tv_sec) { in sctp_t3rxt_timer()
857 ms_goneby = (uint32_t)(now.tv_sec - net->last_sent_time.tv_sec) * 1000; in sctp_t3rxt_timer()
861 if ((net->dest_state & SCTP_ADDR_PF) == 0) { in sctp_t3rxt_timer()
862 if ((ms_goneby > net->RTO) || (net->RTO == 0)) { in sctp_t3rxt_timer()
868 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_t3rxt_timer()
887 if (net->pf_threshold < net->failure_threshold) { in sctp_t3rxt_timer()
888 alt = sctp_find_alternate_net(stcb, net, 2); in sctp_t3rxt_timer()
895 alt = sctp_find_alternate_net(stcb, net, 1); in sctp_t3rxt_timer()
902 net->find_pseudo_cumack = 1; in sctp_t3rxt_timer()
903 net->find_rtx_pseudo_cumack = 1; in sctp_t3rxt_timer()
906 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_t3rxt_timer()
911 (void)sctp_mark_all_for_resend(stcb, net, alt, win_probe, in sctp_t3rxt_timer()
917 net->fast_retran_loss_recovery = 0; in sctp_t3rxt_timer()
919 (net->flight_size == 0)) { in sctp_t3rxt_timer()
920 (*stcb->asoc.cc_functions.sctp_cwnd_new_transmission_begins) (stcb, net); in sctp_t3rxt_timer()
930 sctp_backoff_on_timeout(stcb, net, win_probe, num_mk, num_abandoned); in sctp_t3rxt_timer()
931 if (((net->dest_state & SCTP_ADDR_REACHABLE) == 0) || in sctp_t3rxt_timer()
932 (net->dest_state & SCTP_ADDR_PF)) { in sctp_t3rxt_timer()
934 sctp_move_chunks_from_net(stcb, net); in sctp_t3rxt_timer()
940 if (net->ro._s_addr != NULL) { in sctp_t3rxt_timer()
941 sctp_free_ifa(net->ro._s_addr); in sctp_t3rxt_timer()
942 net->ro._s_addr = NULL; in sctp_t3rxt_timer()
944 net->src_addr_selected = 0; in sctp_t3rxt_timer()
947 RO_NHFREE(&net->ro); in sctp_t3rxt_timer()
950 if ((stcb->asoc.primary_destination == net) && (alt != net)) { in sctp_t3rxt_timer()
974 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_t3rxt_timer()
996 sctp_log_cwnd(stcb, net, net->cwnd, SCTP_CWND_LOG_FROM_RTX); in sctp_t3rxt_timer()
1004 struct sctp_nets *net) in sctp_t1init_timer() argument
1019 if (sctp_threshold_management(inp, stcb, net, in sctp_t1init_timer()
1026 if (stcb->asoc.initial_init_rto_max < net->RTO) { in sctp_t1init_timer()
1027 net->RTO = stcb->asoc.initial_init_rto_max; in sctp_t1init_timer()
1052 struct sctp_nets *net SCTP_UNUSED) in sctp_cookie_timer()
1117 struct sctp_nets *alt, *net; in sctp_strreset_timer() local
1128 net = strrst->whoTo; in sctp_strreset_timer()
1130 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_strreset_timer()
1138 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_strreset_timer()
1139 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_strreset_timer()
1145 if ((chk->whoTo == net) && in sctp_strreset_timer()
1157 if ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) { in sctp_strreset_timer()
1162 sctp_move_chunks_from_net(stcb, net); in sctp_strreset_timer()
1164 sctp_free_remote_addr(net); in sctp_strreset_timer()
1179 struct sctp_nets *net) in sctp_asconf_timer() argument
1187 sctp_send_asconf(stcb, net, SCTP_ADDR_NOT_LOCKED); in sctp_asconf_timer()
1198 net = asconf->whoTo; in sctp_asconf_timer()
1200 if (sctp_threshold_management(inp, stcb, net, in sctp_asconf_timer()
1221 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_asconf_timer()
1222 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_asconf_timer()
1230 if ((chk->whoTo == net) && in sctp_asconf_timer()
1253 if ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) { in sctp_asconf_timer()
1258 sctp_move_chunks_from_net(stcb, net); in sctp_asconf_timer()
1260 sctp_free_remote_addr(net); in sctp_asconf_timer()
1299 struct sctp_nets *net) in sctp_shutdown_timer() argument
1304 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdown_timer()
1308 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_shutdown_timer()
1310 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_shutdown_timer()
1322 struct sctp_nets *net) in sctp_shutdownack_timer() argument
1327 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_shutdownack_timer()
1331 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_shutdownack_timer()
1333 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_shutdownack_timer()
1409 struct sctp_nets *net) in sctp_heartbeat_timer() argument
1413 net_was_pf = (net->dest_state & SCTP_ADDR_PF) != 0; in sctp_heartbeat_timer()
1414 if (net->hb_responded == 0) { in sctp_heartbeat_timer()
1415 if (net->ro._s_addr != NULL) { in sctp_heartbeat_timer()
1420 sctp_free_ifa(net->ro._s_addr); in sctp_heartbeat_timer()
1421 net->ro._s_addr = NULL; in sctp_heartbeat_timer()
1422 net->src_addr_selected = 0; in sctp_heartbeat_timer()
1424 sctp_backoff_on_timeout(stcb, net, 1, 0, 0); in sctp_heartbeat_timer()
1425 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) { in sctp_heartbeat_timer()
1431 if (net->partial_bytes_acked > 0) { in sctp_heartbeat_timer()
1432 net->partial_bytes_acked = 0; in sctp_heartbeat_timer()
1439 if ((((net->dest_state & SCTP_ADDR_NOHB) == 0) || in sctp_heartbeat_timer()
1440 (net->dest_state & SCTP_ADDR_UNCONFIRMED)) && in sctp_heartbeat_timer()
1441 (net_was_pf || ((net->dest_state & SCTP_ADDR_PF) == 0))) { in sctp_heartbeat_timer()
1448 if ((net->last_sent_time.tv_sec > 0) || in sctp_heartbeat_timer()
1449 (net->last_sent_time.tv_usec > 0)) { in sctp_heartbeat_timer()
1453 timevalsub(&diff, &net->last_sent_time); in sctp_heartbeat_timer()
1459 if ((ms_gone_by >= net->heart_beat_delay) || in sctp_heartbeat_timer()
1460 (net->dest_state & SCTP_ADDR_UNCONFIRMED) || in sctp_heartbeat_timer()
1461 (net->dest_state & SCTP_ADDR_PF)) { in sctp_heartbeat_timer()
1462 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); in sctp_heartbeat_timer()
1471 struct sctp_nets *net) in sctp_pathmtu_timer() argument
1475 next_mtu = sctp_get_next_mtu(net->mtu); in sctp_pathmtu_timer()
1477 if ((next_mtu > net->mtu) && (net->port == 0)) { in sctp_pathmtu_timer()
1478 if ((net->src_addr_selected == 0) || in sctp_pathmtu_timer()
1479 (net->ro._s_addr == NULL) || in sctp_pathmtu_timer()
1480 (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) { in sctp_pathmtu_timer()
1481 if ((net->ro._s_addr != NULL) && (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) { in sctp_pathmtu_timer()
1482 sctp_free_ifa(net->ro._s_addr); in sctp_pathmtu_timer()
1483 net->ro._s_addr = NULL; in sctp_pathmtu_timer()
1484 net->src_addr_selected = 0; in sctp_pathmtu_timer()
1485 } else if (net->ro._s_addr == NULL) { in sctp_pathmtu_timer()
1487 if (net->ro._l_addr.sa.sa_family == AF_INET6) { in sctp_pathmtu_timer()
1488 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_pathmtu_timer()
1495 net->ro._s_addr = sctp_source_address_selection(inp, in sctp_pathmtu_timer()
1497 (sctp_route_t *)&net->ro, in sctp_pathmtu_timer()
1498 net, 0, stcb->asoc.vrf_id); in sctp_pathmtu_timer()
1500 if (net->ro._l_addr.sa.sa_family == AF_INET6) { in sctp_pathmtu_timer()
1501 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_pathmtu_timer()
1507 if (net->ro._s_addr) in sctp_pathmtu_timer()
1508 net->src_addr_selected = 1; in sctp_pathmtu_timer()
1510 if (net->ro._s_addr) { in sctp_pathmtu_timer()
1511 mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_nh); in sctp_pathmtu_timer()
1513 if (net->port) { in sctp_pathmtu_timer()
1518 net->mtu = next_mtu; in sctp_pathmtu_timer()
1520 net->mtu = mtu; in sctp_pathmtu_timer()
1525 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net); in sctp_pathmtu_timer()
1567 struct sctp_nets *net; in sctp_autoclose_timer() local
1576 net = stcb->asoc.alternate; in sctp_autoclose_timer()
1578 net = stcb->asoc.primary_destination; in sctp_autoclose_timer()
1580 sctp_send_shutdown(stcb, net); in sctp_autoclose_timer()
1582 stcb->sctp_ep, stcb, net); in sctp_autoclose_timer()