Lines Matching refs:net
122 rto_logging(struct sctp_nets *net, int from) in rto_logging() argument
128 sctp_clog.x.rto.net = (void *)net; in rto_logging()
129 sctp_clog.x.rto.rtt = net->rtt / 1000; in rto_logging()
315 sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t from) in sctp_log_cwnd() argument
320 sctp_clog.x.cwnd.net = net; in sctp_log_cwnd()
330 if (net) { in sctp_log_cwnd()
331 sctp_clog.x.cwnd.cwnd_new_value = net->cwnd; in sctp_log_cwnd()
332 sctp_clog.x.cwnd.inflight = net->flight_size; in sctp_log_cwnd()
333 sctp_clog.x.cwnd.pseudo_cumack = net->pseudo_cumack; in sctp_log_cwnd()
334 sctp_clog.x.cwnd.meets_pseudo_cumack = net->new_pseudo_cumack; in sctp_log_cwnd()
335 sctp_clog.x.cwnd.need_new_pseudo_cumack = net->find_pseudo_cumack; in sctp_log_cwnd()
398 sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *net, int error, int burst, uint8_t from) in sctp_log_maxburst() argument
404 sctp_clog.x.cwnd.net = net; in sctp_log_maxburst()
406 sctp_clog.x.cwnd.inflight = net->flight_size; in sctp_log_maxburst()
632 struct sctp_nets *net) in sctp_auditing() argument
857 struct sctp_nets *net; in sctp_stop_timers_for_shutdown() local
869 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { in sctp_stop_timers_for_shutdown()
870 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, in sctp_stop_timers_for_shutdown()
872 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, in sctp_stop_timers_for_shutdown()
881 struct sctp_nets *net; in sctp_stop_association_timers() local
901 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { in sctp_stop_association_timers()
902 sctp_timer_stop(SCTP_TIMER_TYPE_SEND, inp, stcb, net, in sctp_stop_association_timers()
904 sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, in sctp_stop_association_timers()
906 sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, net, in sctp_stop_association_timers()
908 sctp_timer_stop(SCTP_TIMER_TYPE_COOKIE, inp, stcb, net, in sctp_stop_association_timers()
910 sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, inp, stcb, net, in sctp_stop_association_timers()
912 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, in sctp_stop_association_timers()
914 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, in sctp_stop_association_timers()
1709 struct sctp_nets *net; in sctp_timeout_handler() local
1724 net = (struct sctp_nets *)tmr->net; in sctp_timeout_handler()
1730 sctp_auditing(3, inp, stcb, net); in sctp_timeout_handler()
1802 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1804 type, inp, stcb, net)); in sctp_timeout_handler()
1812 if (sctp_t3rxt_timer(inp, stcb, net)) { in sctp_timeout_handler()
1819 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1844 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1846 type, inp, stcb, net)); in sctp_timeout_handler()
1849 if (sctp_t1init_timer(inp, stcb, net)) { in sctp_timeout_handler()
1856 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
1858 type, inp, stcb, net)); in sctp_timeout_handler()
1869 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1871 type, inp, stcb, net)); in sctp_timeout_handler()
1874 if (sctp_shutdown_timer(inp, stcb, net)) { in sctp_timeout_handler()
1879 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1885 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1887 type, inp, stcb, net)); in sctp_timeout_handler()
1890 if (sctp_heartbeat_timer(inp, stcb, net)) { in sctp_timeout_handler()
1895 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1897 if (!(net->dest_state & SCTP_ADDR_NOHB)) { in sctp_timeout_handler()
1898 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); in sctp_timeout_handler()
1906 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1908 type, inp, stcb, net)); in sctp_timeout_handler()
1911 if (sctp_cookie_timer(inp, stcb, net)) { in sctp_timeout_handler()
1916 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1926 KASSERT(inp != NULL && stcb == NULL && net == NULL, in sctp_timeout_handler()
1928 type, inp, stcb, net)); in sctp_timeout_handler()
1948 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1950 type, inp, stcb, net)); in sctp_timeout_handler()
1952 sctp_pathmtu_timer(inp, stcb, net); in sctp_timeout_handler()
1956 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1958 type, inp, stcb, net)); in sctp_timeout_handler()
1959 if (sctp_shutdownack_timer(inp, stcb, net)) { in sctp_timeout_handler()
1966 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1972 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1974 type, inp, stcb, net)); in sctp_timeout_handler()
1976 if (sctp_asconf_timer(inp, stcb, net)) { in sctp_timeout_handler()
1981 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1987 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
1989 type, inp, stcb, net)); in sctp_timeout_handler()
1998 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2000 type, inp, stcb, net)); in sctp_timeout_handler()
2007 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2009 type, inp, stcb, net)); in sctp_timeout_handler()
2019 KASSERT(inp != NULL && stcb == NULL && net == NULL, in sctp_timeout_handler()
2021 type, inp, stcb, net)); in sctp_timeout_handler()
2036 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2038 type, inp, stcb, net)); in sctp_timeout_handler()
2053 KASSERT(inp == NULL && stcb == NULL && net == NULL, in sctp_timeout_handler()
2055 type, inp, stcb, net)); in sctp_timeout_handler()
2060 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2062 type, inp, stcb, net)); in sctp_timeout_handler()
2077 sctp_auditing(5, inp, stcb, net); in sctp_timeout_handler()
2106 if (net != NULL) { in sctp_timeout_handler()
2107 sctp_free_remote_addr(net); in sctp_timeout_handler()
2143 struct sctp_nets *net) in sctp_timer_start() argument
2169 t_type, inp, stcb, net); in sctp_timer_start()
2173 if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { in sctp_timer_start()
2176 t_type, inp, stcb, net); in sctp_timer_start()
2183 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2186 t_type, inp, stcb, net); in sctp_timer_start()
2191 tmr = &net->rxt_timer; in sctp_timer_start()
2192 if (net->RTO == 0) { in sctp_timer_start()
2195 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2203 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2206 t_type, inp, stcb, net); in sctp_timer_start()
2211 tmr = &net->rxt_timer; in sctp_timer_start()
2212 if (net->RTO == 0) { in sctp_timer_start()
2215 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2223 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2226 t_type, inp, stcb, net); in sctp_timer_start()
2236 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2239 t_type, inp, stcb, net); in sctp_timer_start()
2244 tmr = &net->rxt_timer; in sctp_timer_start()
2245 if (net->RTO == 0) { in sctp_timer_start()
2248 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2257 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2260 t_type, inp, stcb, net); in sctp_timer_start()
2265 if ((net->dest_state & SCTP_ADDR_NOHB) && in sctp_timer_start()
2266 !(net->dest_state & SCTP_ADDR_UNCONFIRMED)) { in sctp_timer_start()
2269 t_type, inp, stcb, net); in sctp_timer_start()
2272 tmr = &net->hb_timer; in sctp_timer_start()
2273 if (net->RTO == 0) { in sctp_timer_start()
2276 to_ticks = net->RTO; in sctp_timer_start()
2285 if (!(net->dest_state & SCTP_ADDR_UNCONFIRMED) && in sctp_timer_start()
2286 !(net->dest_state & SCTP_ADDR_PF)) { in sctp_timer_start()
2287 to_ticks += net->heart_beat_delay; in sctp_timer_start()
2301 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2304 t_type, inp, stcb, net); in sctp_timer_start()
2309 tmr = &net->rxt_timer; in sctp_timer_start()
2310 if (net->RTO == 0) { in sctp_timer_start()
2313 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2321 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_start()
2324 t_type, inp, stcb, net); in sctp_timer_start()
2337 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2340 t_type, inp, stcb, net); in sctp_timer_start()
2345 if (net->dest_state & SCTP_ADDR_NO_PMTUD) { in sctp_timer_start()
2348 t_type, inp, stcb, net); in sctp_timer_start()
2351 tmr = &net->pmtu_timer; in sctp_timer_start()
2356 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2359 t_type, inp, stcb, net); in sctp_timer_start()
2364 tmr = &net->rxt_timer; in sctp_timer_start()
2365 if (net->RTO == 0) { in sctp_timer_start()
2368 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2376 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2379 t_type, inp, stcb, net); in sctp_timer_start()
2385 if (net->RTO == 0) { in sctp_timer_start()
2388 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2396 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2399 t_type, inp, stcb, net); in sctp_timer_start()
2416 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2419 t_type, inp, stcb, net); in sctp_timer_start()
2432 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2435 t_type, inp, stcb, net); in sctp_timer_start()
2441 if (net->RTO == 0) { in sctp_timer_start()
2444 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2453 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_start()
2456 t_type, inp, stcb, net); in sctp_timer_start()
2465 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2468 t_type, inp, stcb, net); in sctp_timer_start()
2477 if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_start()
2480 t_type, inp, stcb, net); in sctp_timer_start()
2490 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2493 t_type, inp, stcb, net); in sctp_timer_start()
2517 t_type, inp, stcb, net); in sctp_timer_start()
2529 tmr->net = NULL; in sctp_timer_start()
2531 tmr->net = (void *)net; in sctp_timer_start()
2539 t_type, to_ticks, inp, stcb, net); in sctp_timer_start()
2550 if (tmr->net != NULL) { in sctp_timer_start()
2551 atomic_add_int(&net->ref_count, 1); in sctp_timer_start()
2560 t_type, to_ticks, inp, stcb, net); in sctp_timer_start()
2594 struct sctp_nets *net, uint32_t from) in sctp_timer_stop() argument
2611 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2614 t_type, inp, stcb, net); in sctp_timer_stop()
2619 tmr = &net->rxt_timer; in sctp_timer_stop()
2622 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2625 t_type, inp, stcb, net); in sctp_timer_stop()
2630 tmr = &net->rxt_timer; in sctp_timer_stop()
2633 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2636 t_type, inp, stcb, net); in sctp_timer_stop()
2644 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2647 t_type, inp, stcb, net); in sctp_timer_stop()
2652 tmr = &net->rxt_timer; in sctp_timer_stop()
2655 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2658 t_type, inp, stcb, net); in sctp_timer_stop()
2663 tmr = &net->hb_timer; in sctp_timer_stop()
2666 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2669 t_type, inp, stcb, net); in sctp_timer_stop()
2674 tmr = &net->rxt_timer; in sctp_timer_stop()
2677 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_stop()
2680 t_type, inp, stcb, net); in sctp_timer_stop()
2688 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2691 t_type, inp, stcb, net); in sctp_timer_stop()
2696 tmr = &net->pmtu_timer; in sctp_timer_stop()
2699 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2702 t_type, inp, stcb, net); in sctp_timer_stop()
2707 tmr = &net->rxt_timer; in sctp_timer_stop()
2710 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2713 t_type, inp, stcb, net); in sctp_timer_stop()
2721 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2724 t_type, inp, stcb, net); in sctp_timer_stop()
2732 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2735 t_type, inp, stcb, net); in sctp_timer_stop()
2743 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2746 t_type, inp, stcb, net); in sctp_timer_stop()
2759 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_stop()
2762 t_type, inp, stcb, net); in sctp_timer_stop()
2770 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2773 t_type, inp, stcb, net); in sctp_timer_stop()
2781 if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_stop()
2784 t_type, inp, stcb, net); in sctp_timer_stop()
2792 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2795 t_type, inp, stcb, net); in sctp_timer_stop()
2820 t_type, inp, stcb, net); in sctp_timer_stop()
2838 KASSERT(((t_type == SCTP_TIMER_TYPE_ASCONF) && (tmr->net != NULL)) || in sctp_timer_stop()
2839 ((t_type != SCTP_TIMER_TYPE_ASCONF) && (tmr->net == net)), in sctp_timer_stop()
2841 t_type, net, tmr->net)); in sctp_timer_stop()
2844 t_type, inp, stcb, net); in sctp_timer_stop()
2857 if (tmr->net != NULL) { in sctp_timer_stop()
2862 sctp_free_remote_addr((struct sctp_nets *)tmr->net); in sctp_timer_stop()
2863 tmr->net = NULL; in sctp_timer_stop()
2868 t_type, inp, stcb, net); in sctp_timer_stop()
2929 struct sctp_nets *net, in sctp_calculate_rto() argument
2960 net->rtt = rtt_us; in sctp_calculate_rto()
2962 rtt = (int32_t)(net->rtt / 1000); in sctp_calculate_rto()
2968 (*asoc->cc_functions.sctp_rtt_calculated) (stcb, net, &now); in sctp_calculate_rto()
2975 (net->lan_type == SCTP_LAN_UNKNOWN)) { in sctp_calculate_rto()
2976 if (net->rtt > SCTP_LOCAL_LAN_RTT) { in sctp_calculate_rto()
2977 net->lan_type = SCTP_LAN_INTERNET; in sctp_calculate_rto()
2979 net->lan_type = SCTP_LAN_LOCAL; in sctp_calculate_rto()
2994 if (net->RTO_measured) { in sctp_calculate_rto()
2995 rtt -= (net->lastsa >> SCTP_RTT_SHIFT); in sctp_calculate_rto()
2996 net->lastsa += rtt; in sctp_calculate_rto()
3000 rtt -= (net->lastsv >> SCTP_RTT_VAR_SHIFT); in sctp_calculate_rto()
3001 net->lastsv += rtt; in sctp_calculate_rto()
3003 rto_logging(net, SCTP_LOG_RTTVAR); in sctp_calculate_rto()
3007 net->RTO_measured = 1; in sctp_calculate_rto()
3009 net->lastsa = rtt << SCTP_RTT_SHIFT; in sctp_calculate_rto()
3010 net->lastsv = (rtt / 2) << SCTP_RTT_VAR_SHIFT; in sctp_calculate_rto()
3012 rto_logging(net, SCTP_LOG_INITIAL_RTT); in sctp_calculate_rto()
3015 if (net->lastsv == 0) { in sctp_calculate_rto()
3016 net->lastsv = SCTP_CLOCK_GRANULARITY; in sctp_calculate_rto()
3018 new_rto = (net->lastsa >> SCTP_RTT_SHIFT) + net->lastsv; in sctp_calculate_rto()
3033 net->RTO = new_rto; in sctp_calculate_rto()
4098 struct sctp_nets *net; in sctp_ulp_notify() local
4100 net = (struct sctp_nets *)data; in sctp_ulp_notify()
4102 (struct sockaddr *)&net->ro._l_addr, error, so_locked); in sctp_ulp_notify()
4107 struct sctp_nets *net; in sctp_ulp_notify() local
4109 net = (struct sctp_nets *)data; in sctp_ulp_notify()
4111 (struct sockaddr *)&net->ro._l_addr, error, so_locked); in sctp_ulp_notify()
4116 struct sctp_nets *net; in sctp_ulp_notify() local
4118 net = (struct sctp_nets *)data; in sctp_ulp_notify()
4120 (struct sockaddr *)&net->ro._l_addr, error, so_locked); in sctp_ulp_notify()
4322 if (sp->net) { in sctp_report_all_outbound()
4323 sctp_free_remote_addr(sp->net); in sctp_report_all_outbound()
4324 sp->net = NULL; in sctp_report_all_outbound()
7175 struct sctp_nets *net; in sctp_recv_icmp_tunneled_packet() local
7206 net = NULL; in sctp_recv_icmp_tunneled_packet()
7209 &inp, &net, 1, in sctp_recv_icmp_tunneled_packet()
7212 (net != NULL) && in sctp_recv_icmp_tunneled_packet()
7215 if ((udp->uh_dport != net->port) || in sctp_recv_icmp_tunneled_packet()
7257 sctp_notify(inp, stcb, net, type, code, in sctp_recv_icmp_tunneled_packet()
7282 struct sctp_nets *net; in sctp_recv_icmp6_tunneled_packet() local
7332 net = NULL; in sctp_recv_icmp6_tunneled_packet()
7335 &inp, &net, 1, SCTP_DEFAULT_VRFID); in sctp_recv_icmp6_tunneled_packet()
7337 (net != NULL) && in sctp_recv_icmp6_tunneled_packet()
7340 if ((udp.uh_dport != net->port) || in sctp_recv_icmp6_tunneled_packet()
7400 sctp6_notify(inp, stcb, net, type, code, in sctp_recv_icmp6_tunneled_packet()