Lines Matching refs:net

87     struct sctp_nets *net, uint16_t threshold)
92 if (net != NULL) {
93 net->error_count++;
95 (void *)net, net->error_count,
96 net->failure_threshold);
97 if (net->error_count > net->failure_threshold) {
99 if (net->dest_state & SCTP_ADDR_REACHABLE) {
100 net->dest_state &= ~SCTP_ADDR_REACHABLE;
101 net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY;
102 net->dest_state &= ~SCTP_ADDR_PF;
105 (void *)net, SCTP_SO_NOT_LOCKED);
107 } else if ((net->pf_threshold < net->failure_threshold) &&
108 (net->error_count > net->pf_threshold)) {
109 if ((net->dest_state & SCTP_ADDR_PF) == 0) {
110 net->dest_state |= SCTP_ADDR_PF;
111 net->last_active = sctp_get_tick_count();
112 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED);
114 inp, stcb, net,
116 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
119 if ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0) {
142 ((net == NULL) ? (uint32_t)0 : (uint32_t)net->dest_state));
166 struct sctp_nets *net,
183 * net algorithm. This algorithm chooses the active destination (not
216 if (mnet == net) {
278 return (net);
285 * CMT policy for choosing an alternate net. */
325 /* Look for an alternate net, which is active. */
326 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) {
327 alt = TAILQ_NEXT(net, sctp_next);
353 (alt != net)) {
354 /* Found an alternate net, which is reachable. */
362 * In case no active alternate net has been found, look for
363 * an alternate net, which is confirmed.
365 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) {
366 alt = TAILQ_NEXT(net, sctp_next);
383 (alt != net)) {
385 * Found an alternate net, which is
395 * In case no confirmed alternate net has been found, just
396 * return net, if it is not being deleted. In the other case
397 * just return the first net.
399 if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) {
400 alt = net;
411 struct sctp_nets *net,
415 if (net->RTO == 0) {
416 if (net->RTO_measured) {
417 net->RTO = stcb->asoc.minrto;
419 net->RTO = stcb->asoc.initial_rto;
422 net->RTO <<= 1;
423 if (net->RTO > stcb->asoc.maxrto) {
424 net->RTO = stcb->asoc.maxrto;
429 stcb->asoc.cc_functions.sctp_cwnd_update_after_timeout(stcb, net);
482 struct sctp_nets *net,
490 * Mark all chunks (well not all) that were sent to *net for
517 cur_rto = (net->lastsa >> SCTP_RTT_SHIFT) + net->lastsv;
524 sctp_log_fr(net->flight_size, 0, 0, SCTP_FR_CWND_REPORT);
525 sctp_log_fr(net->flight_size, net->cwnd, stcb->asoc.total_flight, SCTP_FR_CWND_REPORT);
548 orig_flight = net->flight_size;
551 net->fast_retran_ip = 0;
577 if ((chk->whoTo == net) && (chk->sent < SCTP_DATAGRAM_ACKED)) {
665 net->marked_retrans++;
693 if (alt != net) {
722 if ((orig_flight - net->flight_size) != (orig_tf - stcb->asoc.total_flight)) {
749 if ((chk->whoTo == net) &&
781 "Audit total flight due to negative value net:%p\n",
782 (void *)net);
814 struct sctp_nets *net)
826 if (net == lnet) {
835 (stcb->asoc.total_flight < net->mtu)) {
844 if (sctp_threshold_management(inp, stcb, net,
849 if (net != stcb->asoc.primary_destination) {
855 if (net->last_sent_time.tv_sec) {
856 ms_goneby = (uint32_t)(now.tv_sec - net->last_sent_time.tv_sec) * 1000;
860 if ((net->dest_state & SCTP_ADDR_PF) == 0) {
861 if ((ms_goneby > net->RTO) || (net->RTO == 0)) {
867 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED);
874 * For a window probe we don't penalize the net's but only
886 if (net->pf_threshold < net->failure_threshold) {
887 alt = sctp_find_alternate_net(stcb, net, 2);
894 alt = sctp_find_alternate_net(stcb, net, 1);
901 net->find_pseudo_cumack = 1;
902 net->find_rtx_pseudo_cumack = 1;
905 alt = sctp_find_alternate_net(stcb, net, 0);
910 (void)sctp_mark_all_for_resend(stcb, net, alt, win_probe,
916 net->fast_retran_loss_recovery = 0;
918 (net->flight_size == 0)) {
919 (*stcb->asoc.cc_functions.sctp_cwnd_new_transmission_begins) (stcb, net);
929 sctp_backoff_on_timeout(stcb, net, win_probe, num_mk, num_abandoned);
930 if (((net->dest_state & SCTP_ADDR_REACHABLE) == 0) ||
931 (net->dest_state & SCTP_ADDR_PF)) {
933 sctp_move_chunks_from_net(stcb, net);
939 if (net->ro._s_addr != NULL) {
940 sctp_free_ifa(net->ro._s_addr);
941 net->ro._s_addr = NULL;
943 net->src_addr_selected = 0;
946 RO_NHFREE(&net->ro);
949 if ((stcb->asoc.primary_destination == net) && (alt != net)) {
955 * from any net structures.
973 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net);
995 sctp_log_cwnd(stcb, net, net->cwnd, SCTP_CWND_LOG_FROM_RTX);
1003 struct sctp_nets *net)
1018 if (sctp_threshold_management(inp, stcb, net,
1025 if (stcb->asoc.initial_init_rto_max < net->RTO) {
1026 net->RTO = stcb->asoc.initial_init_rto_max;
1051 struct sctp_nets *net SCTP_UNUSED)
1116 struct sctp_nets *alt, *net;
1127 net = strrst->whoTo;
1129 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1137 sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
1138 alt = sctp_find_alternate_net(stcb, net, 0);
1144 if ((chk->whoTo == net) &&
1156 if ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) {
1161 sctp_move_chunks_from_net(stcb, net);
1163 sctp_free_remote_addr(net);
1178 struct sctp_nets *net)
1186 sctp_send_asconf(stcb, net, SCTP_ADDR_NOT_LOCKED);
1197 net = asconf->whoTo;
1199 if (sctp_threshold_management(inp, stcb, net,
1217 * cleared threshold management, so now backoff the net and
1220 sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
1221 alt = sctp_find_alternate_net(stcb, net, 0);
1229 if ((chk->whoTo == net) &&
1252 if ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) {
1257 sctp_move_chunks_from_net(stcb, net);
1259 sctp_free_remote_addr(net);
1294 * It is assumed that net is non-NULL.
1298 struct sctp_nets *net)
1303 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1307 sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
1309 alt = sctp_find_alternate_net(stcb, net, 0);
1311 /* third generate a shutdown into the queue for out net */
1321 struct sctp_nets *net)
1326 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1330 sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
1332 alt = sctp_find_alternate_net(stcb, net, 0);
1334 /* third generate a shutdown into the queue for out net */
1408 struct sctp_nets *net)
1412 net_was_pf = (net->dest_state & SCTP_ADDR_PF) != 0;
1413 if (net->hb_responded == 0) {
1414 if (net->ro._s_addr != NULL) {
1419 sctp_free_ifa(net->ro._s_addr);
1420 net->ro._s_addr = NULL;
1421 net->src_addr_selected = 0;
1423 sctp_backoff_on_timeout(stcb, net, 1, 0, 0);
1424 if (sctp_threshold_management(inp, stcb, net, stcb->asoc.max_send_times)) {
1430 if (net->partial_bytes_acked > 0) {
1431 net->partial_bytes_acked = 0;
1438 if ((((net->dest_state & SCTP_ADDR_NOHB) == 0) ||
1439 (net->dest_state & SCTP_ADDR_UNCONFIRMED)) &&
1440 (net_was_pf || ((net->dest_state & SCTP_ADDR_PF) == 0))) {
1447 if ((net->last_sent_time.tv_sec > 0) ||
1448 (net->last_sent_time.tv_usec > 0)) {
1452 timevalsub(&diff, &net->last_sent_time);
1458 if ((ms_gone_by >= net->heart_beat_delay) ||
1459 (net->dest_state & SCTP_ADDR_UNCONFIRMED) ||
1460 (net->dest_state & SCTP_ADDR_PF)) {
1461 sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED);
1470 struct sctp_nets *net)
1474 next_mtu = sctp_get_next_mtu(net->mtu);
1476 if ((next_mtu > net->mtu) && (net->port == 0)) {
1477 if ((net->src_addr_selected == 0) ||
1478 (net->ro._s_addr == NULL) ||
1479 (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) {
1480 if ((net->ro._s_addr != NULL) && (net->ro._s_addr->localifa_flags & SCTP_BEING_DELETED)) {
1481 sctp_free_ifa(net->ro._s_addr);
1482 net->ro._s_addr = NULL;
1483 net->src_addr_selected = 0;
1484 } else if (net->ro._s_addr == NULL) {
1486 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
1487 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr;
1494 net->ro._s_addr = sctp_source_address_selection(inp,
1496 (sctp_route_t *)&net->ro,
1497 net, 0, stcb->asoc.vrf_id);
1499 if (net->ro._l_addr.sa.sa_family == AF_INET6) {
1500 struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&net->ro._l_addr;
1506 if (net->ro._s_addr)
1507 net->src_addr_selected = 1;
1509 if (net->ro._s_addr) {
1510 mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._s_addr.sa, net->ro.ro_nh);
1512 if (net->port) {
1517 net->mtu = next_mtu;
1519 net->mtu = mtu;
1524 sctp_timer_start(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net);
1566 struct sctp_nets *net;
1575 net = stcb->asoc.alternate;
1577 net = stcb->asoc.primary_destination;
1579 sctp_send_shutdown(stcb, net);
1581 stcb->sctp_ep, stcb, net);