Lines Matching full:net

119 rto_logging(struct sctp_nets *net, int from)  in rto_logging()  argument
125 sctp_clog.x.rto.net = (void *)net; in rto_logging()
126 sctp_clog.x.rto.rtt = net->rtt / 1000; in rto_logging()
312 sctp_log_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net, int augment, uint8_t from) in sctp_log_cwnd() argument
317 sctp_clog.x.cwnd.net = net; in sctp_log_cwnd()
327 if (net) { in sctp_log_cwnd()
328 sctp_clog.x.cwnd.cwnd_new_value = net->cwnd; in sctp_log_cwnd()
329 sctp_clog.x.cwnd.inflight = net->flight_size; in sctp_log_cwnd()
330 sctp_clog.x.cwnd.pseudo_cumack = net->pseudo_cumack; in sctp_log_cwnd()
331 sctp_clog.x.cwnd.meets_pseudo_cumack = net->new_pseudo_cumack; in sctp_log_cwnd()
332 sctp_clog.x.cwnd.need_new_pseudo_cumack = net->find_pseudo_cumack; in sctp_log_cwnd()
395 sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *net, int error, int burst, uint8_t from) in sctp_log_maxburst() argument
401 sctp_clog.x.cwnd.net = net; in sctp_log_maxburst()
403 sctp_clog.x.cwnd.inflight = net->flight_size; in sctp_log_maxburst()
629 struct sctp_nets *net) in sctp_auditing() argument
732 SCTP_PRINTF("real flight:%d net total was %d\n", in sctp_auditing()
744 SCTP_PRINTF("net:%p flight was %d corrected to %d\n", in sctp_auditing()
853 struct sctp_nets *net; in sctp_stop_timers_for_shutdown() local
865 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { in sctp_stop_timers_for_shutdown()
866 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, in sctp_stop_timers_for_shutdown()
868 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, in sctp_stop_timers_for_shutdown()
877 struct sctp_nets *net; in sctp_stop_association_timers() local
897 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { in sctp_stop_association_timers()
898 sctp_timer_stop(SCTP_TIMER_TYPE_SEND, inp, stcb, net, in sctp_stop_association_timers()
900 sctp_timer_stop(SCTP_TIMER_TYPE_INIT, inp, stcb, net, in sctp_stop_association_timers()
902 sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, net, in sctp_stop_association_timers()
904 sctp_timer_stop(SCTP_TIMER_TYPE_COOKIE, inp, stcb, net, in sctp_stop_association_timers()
906 sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWNACK, inp, stcb, net, in sctp_stop_association_timers()
908 sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, in sctp_stop_association_timers()
910 sctp_timer_stop(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net, in sctp_stop_association_timers()
1693 * The following table shows which pointers for the inp, stcb, or net are
1696 *|Name |Timer |inp |stcb|net |
1698 *|SCTP_TIMER_TYPE_SEND |net->rxt_timer |Yes |Yes |Yes |
1699 *|SCTP_TIMER_TYPE_INIT |net->rxt_timer |Yes |Yes |Yes |
1701 *|SCTP_TIMER_TYPE_SHUTDOWN |net->rxt_timer |Yes |Yes |Yes |
1702 *|SCTP_TIMER_TYPE_HEARTBEAT |net->hb_timer |Yes |Yes |Yes |
1703 *|SCTP_TIMER_TYPE_COOKIE |net->rxt_timer |Yes |Yes |Yes |
1705 *|SCTP_TIMER_TYPE_PATHMTURAISE |net->pmtu_timer |Yes |Yes |Yes |
1706 *|SCTP_TIMER_TYPE_SHUTDOWNACK |net->rxt_timer |Yes |Yes |Yes |
1724 struct sctp_nets *net; in sctp_timeout_handler() local
1732 * If inp, stcb or net are not NULL, then references to these were in sctp_timeout_handler()
1739 net = (struct sctp_nets *)tmr->net; in sctp_timeout_handler()
1746 sctp_auditing(3, inp, stcb, net); in sctp_timeout_handler()
1818 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1819 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1820 type, inp, stcb, net)); in sctp_timeout_handler()
1828 if (sctp_t3rxt_timer(inp, stcb, net)) { in sctp_timeout_handler()
1835 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1847 * on the send queue on whatever net it is sent to. in sctp_timeout_handler()
1860 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1861 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1862 type, inp, stcb, net)); in sctp_timeout_handler()
1865 if (sctp_t1init_timer(inp, stcb, net)) { in sctp_timeout_handler()
1872 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
1873 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1874 type, inp, stcb, net)); in sctp_timeout_handler()
1885 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1886 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1887 type, inp, stcb, net)); in sctp_timeout_handler()
1890 if (sctp_shutdown_timer(inp, stcb, net)) { in sctp_timeout_handler()
1895 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1901 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1902 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1903 type, inp, stcb, net)); in sctp_timeout_handler()
1906 if (sctp_heartbeat_timer(inp, stcb, net)) { in sctp_timeout_handler()
1911 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1913 if ((net->dest_state & SCTP_ADDR_NOHB) == 0) { in sctp_timeout_handler()
1914 sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); in sctp_timeout_handler()
1922 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1923 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1924 type, inp, stcb, net)); in sctp_timeout_handler()
1927 if (sctp_cookie_timer(inp, stcb, net)) { in sctp_timeout_handler()
1932 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1942 KASSERT(inp != NULL && stcb == NULL && net == NULL, in sctp_timeout_handler()
1943 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1944 type, inp, stcb, net)); in sctp_timeout_handler()
1964 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1965 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1966 type, inp, stcb, net)); in sctp_timeout_handler()
1968 sctp_pathmtu_timer(inp, stcb, net); in sctp_timeout_handler()
1972 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1973 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1974 type, inp, stcb, net)); in sctp_timeout_handler()
1975 if (sctp_shutdownack_timer(inp, stcb, net)) { in sctp_timeout_handler()
1982 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
1988 KASSERT(inp != NULL && stcb != NULL && net != NULL, in sctp_timeout_handler()
1989 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
1990 type, inp, stcb, net)); in sctp_timeout_handler()
1992 if (sctp_asconf_timer(inp, stcb, net)) { in sctp_timeout_handler()
1997 sctp_auditing(4, inp, stcb, net); in sctp_timeout_handler()
2003 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2004 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
2005 type, inp, stcb, net)); in sctp_timeout_handler()
2013 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2014 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
2015 type, inp, stcb, net)); in sctp_timeout_handler()
2022 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2023 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
2024 type, inp, stcb, net)); in sctp_timeout_handler()
2034 KASSERT(inp != NULL && stcb == NULL && net == NULL, in sctp_timeout_handler()
2035 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
2036 type, inp, stcb, net)); in sctp_timeout_handler()
2051 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2052 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
2053 type, inp, stcb, net)); in sctp_timeout_handler()
2067 KASSERT(inp == NULL && stcb == NULL && net == NULL, in sctp_timeout_handler()
2068 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
2069 type, inp, stcb, net)); in sctp_timeout_handler()
2074 KASSERT(inp != NULL && stcb != NULL && net == NULL, in sctp_timeout_handler()
2075 ("timeout of type %d: inp = %p, stcb = %p, net = %p", in sctp_timeout_handler()
2076 type, inp, stcb, net)); in sctp_timeout_handler()
2091 sctp_auditing(5, inp, stcb, net); in sctp_timeout_handler()
2120 if (net != NULL) { in sctp_timeout_handler()
2121 sctp_free_remote_addr(net); in sctp_timeout_handler()
2133 * |Name |inp |stcb|net |
2157 struct sctp_nets *net) in sctp_timer_start() argument
2182 "Timer type %d not started: inp=%p, stcb=%p, net=%p (stcb deleted).\n", in sctp_timer_start()
2183 t_type, inp, stcb, net); in sctp_timer_start()
2186 /* Don't restart timer on net that's been removed. */ in sctp_timer_start()
2187 if (net != NULL && (net->dest_state & SCTP_ADDR_BEING_DELETED)) { in sctp_timer_start()
2189 "Timer type %d not started: inp=%p, stcb=%p, net=%p (net deleted).\n", in sctp_timer_start()
2190 t_type, inp, stcb, net); in sctp_timer_start()
2197 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2199 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2200 t_type, inp, stcb, net); in sctp_timer_start()
2205 tmr = &net->rxt_timer; in sctp_timer_start()
2206 if (net->RTO == 0) { in sctp_timer_start()
2209 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2217 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2219 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2220 t_type, inp, stcb, net); in sctp_timer_start()
2225 tmr = &net->rxt_timer; in sctp_timer_start()
2226 if (net->RTO == 0) { in sctp_timer_start()
2229 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2237 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2239 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2240 t_type, inp, stcb, net); in sctp_timer_start()
2250 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2252 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2253 t_type, inp, stcb, net); in sctp_timer_start()
2258 tmr = &net->rxt_timer; in sctp_timer_start()
2259 if (net->RTO == 0) { in sctp_timer_start()
2262 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2267 * The net is used here so that we can add in the RTO. Even in sctp_timer_start()
2271 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2273 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2274 t_type, inp, stcb, net); in sctp_timer_start()
2279 if ((net->dest_state & SCTP_ADDR_NOHB) && in sctp_timer_start()
2280 ((net->dest_state & SCTP_ADDR_UNCONFIRMED) == 0)) { in sctp_timer_start()
2282 "Timer type %d not started: inp=%p, stcb=%p, net=%p.\n", in sctp_timer_start()
2283 t_type, inp, stcb, net); in sctp_timer_start()
2286 tmr = &net->hb_timer; in sctp_timer_start()
2287 if (net->RTO == 0) { in sctp_timer_start()
2290 to_ticks = net->RTO; in sctp_timer_start()
2292 if (!((net->dest_state & SCTP_ADDR_UNCONFIRMED) && in sctp_timer_start()
2293 (net->dest_state & SCTP_ADDR_REACHABLE)) && in sctp_timer_start()
2294 ((net->dest_state & SCTP_ADDR_PF) == 0)) { in sctp_timer_start()
2305 if (net->heart_beat_delay < (UINT32_MAX - to_ticks)) { in sctp_timer_start()
2306 to_ticks += net->heart_beat_delay; in sctp_timer_start()
2323 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2325 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2326 t_type, inp, stcb, net); in sctp_timer_start()
2331 tmr = &net->rxt_timer; in sctp_timer_start()
2332 if (net->RTO == 0) { in sctp_timer_start()
2335 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2343 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_start()
2345 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2346 t_type, inp, stcb, net); in sctp_timer_start()
2359 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2361 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2362 t_type, inp, stcb, net); in sctp_timer_start()
2367 if (net->dest_state & SCTP_ADDR_NO_PMTUD) { in sctp_timer_start()
2369 "Timer type %d not started: inp=%p, stcb=%p, net=%p.\n", in sctp_timer_start()
2370 t_type, inp, stcb, net); in sctp_timer_start()
2373 tmr = &net->pmtu_timer; in sctp_timer_start()
2378 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2380 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2381 t_type, inp, stcb, net); in sctp_timer_start()
2386 tmr = &net->rxt_timer; in sctp_timer_start()
2387 if (net->RTO == 0) { in sctp_timer_start()
2390 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2396 * the net's RTO. in sctp_timer_start()
2398 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2400 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2401 t_type, inp, stcb, net); in sctp_timer_start()
2407 if (net->RTO == 0) { in sctp_timer_start()
2410 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2418 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2420 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2421 t_type, inp, stcb, net); in sctp_timer_start()
2438 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2440 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2441 t_type, inp, stcb, net); in sctp_timer_start()
2452 * the net's RTO. in sctp_timer_start()
2454 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_start()
2456 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2457 t_type, inp, stcb, net); in sctp_timer_start()
2463 if (net->RTO == 0) { in sctp_timer_start()
2466 to_ticks = sctp_msecs_to_ticks(net->RTO); in sctp_timer_start()
2475 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_start()
2477 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2478 t_type, inp, stcb, net); in sctp_timer_start()
2487 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2489 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2490 t_type, inp, stcb, net); in sctp_timer_start()
2499 if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_start()
2501 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2502 t_type, inp, stcb, net); in sctp_timer_start()
2512 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_start()
2514 panic("sctp_timer_start of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_start()
2515 t_type, inp, stcb, net); in sctp_timer_start()
2538 "Timer type %d already running: inp=%p, stcb=%p, net=%p.\n", in sctp_timer_start()
2539 t_type, inp, stcb, net); in sctp_timer_start()
2551 tmr->net = NULL; in sctp_timer_start()
2553 tmr->net = (void *)net; in sctp_timer_start()
2560 "Timer type %d started: ticks=%u, inp=%p, stcb=%p, net=%p.\n", in sctp_timer_start()
2561 t_type, to_ticks, inp, stcb, net); in sctp_timer_start()
2572 if (tmr->net != NULL) { in sctp_timer_start()
2573 atomic_add_int(&net->ref_count, 1); in sctp_timer_start()
2581 "Timer type %d restarted: ticks=%u, inp=%p, stcb=%p, net=%p.\n", in sctp_timer_start()
2582 t_type, to_ticks, inp, stcb, net); in sctp_timer_start()
2592 * |Name |inp |stcb|net |
2616 struct sctp_nets *net, uint32_t from) in sctp_timer_stop() argument
2633 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2635 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2636 t_type, inp, stcb, net); in sctp_timer_stop()
2641 tmr = &net->rxt_timer; in sctp_timer_stop()
2644 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2646 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", 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()
2657 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2658 t_type, inp, stcb, net); in sctp_timer_stop()
2666 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2668 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", 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()
2679 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2680 t_type, inp, stcb, net); in sctp_timer_stop()
2685 tmr = &net->hb_timer; in sctp_timer_stop()
2688 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2690 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2691 t_type, inp, stcb, net); in sctp_timer_stop()
2696 tmr = &net->rxt_timer; in sctp_timer_stop()
2699 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_stop()
2701 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2702 t_type, inp, stcb, net); in sctp_timer_stop()
2710 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2712 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2713 t_type, inp, stcb, net); in sctp_timer_stop()
2718 tmr = &net->pmtu_timer; in sctp_timer_stop()
2721 if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { in sctp_timer_stop()
2723 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2724 t_type, inp, stcb, net); in sctp_timer_stop()
2729 tmr = &net->rxt_timer; in sctp_timer_stop()
2732 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2734 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", 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()
2745 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2746 t_type, inp, stcb, net); in sctp_timer_stop()
2754 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2756 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2757 t_type, inp, stcb, net); in sctp_timer_stop()
2765 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2767 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2768 t_type, inp, stcb, net); in sctp_timer_stop()
2781 if ((inp == NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_stop()
2783 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", 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()
2794 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2795 t_type, inp, stcb, net); in sctp_timer_stop()
2803 if ((inp != NULL) || (stcb != NULL) || (net != NULL)) { in sctp_timer_stop()
2805 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2806 t_type, inp, stcb, net); in sctp_timer_stop()
2814 if ((inp == NULL) || (stcb == NULL) || (net != NULL)) { in sctp_timer_stop()
2816 panic("sctp_timer_stop of type %d: inp = %p, stcb = %p, net = %p", in sctp_timer_stop()
2817 t_type, inp, stcb, net); in sctp_timer_stop()
2841 "Shared timer type %d not running: inp=%p, stcb=%p, net=%p.\n", in sctp_timer_stop()
2842 t_type, inp, stcb, net); in sctp_timer_stop()
2860 KASSERT(((t_type == SCTP_TIMER_TYPE_ASCONF) && (tmr->net != NULL)) || in sctp_timer_stop()
2861 ((t_type != SCTP_TIMER_TYPE_ASCONF) && (tmr->net == net)), in sctp_timer_stop()
2862 ("sctp_timer_stop of type %d: net = %p, tmr->net = %p", in sctp_timer_stop()
2863 t_type, net, tmr->net)); in sctp_timer_stop()
2865 "Timer type %d stopped: inp=%p, stcb=%p, net=%p.\n", in sctp_timer_stop()
2866 t_type, inp, stcb, net); in sctp_timer_stop()
2879 if (tmr->net != NULL) { in sctp_timer_stop()
2883 * Can't use net, since it doesn't work for in sctp_timer_stop()
2886 tmr_net = tmr->net; in sctp_timer_stop()
2887 tmr->net = NULL; in sctp_timer_stop()
2892 "Timer type %d not stopped: inp=%p, stcb=%p, net=%p.\n", in sctp_timer_stop()
2893 t_type, inp, stcb, net); in sctp_timer_stop()
2913 * RTO in number of msecs. net should point to the current network.
2921 struct sctp_nets *net, in sctp_calculate_rto() argument
2952 net->rtt = rtt_us; in sctp_calculate_rto()
2954 rtt = (int32_t)(net->rtt / 1000); in sctp_calculate_rto()
2960 (*asoc->cc_functions.sctp_rtt_calculated) (stcb, net, &now); in sctp_calculate_rto()
2967 (net->lan_type == SCTP_LAN_UNKNOWN)) { in sctp_calculate_rto()
2968 if (net->rtt > SCTP_LOCAL_LAN_RTT) { in sctp_calculate_rto()
2969 net->lan_type = SCTP_LAN_INTERNET; in sctp_calculate_rto()
2971 net->lan_type = SCTP_LAN_LOCAL; in sctp_calculate_rto()
2983 * (net->lastsa >> SCTP_RTT_SHIFT) is the srtt in sctp_calculate_rto()
2984 * (net->lastsv >> SCTP_RTT_VAR_SHIFT) is the rttvar in sctp_calculate_rto()
2986 if (net->RTO_measured) { in sctp_calculate_rto()
2987 rtt -= (net->lastsa >> SCTP_RTT_SHIFT); in sctp_calculate_rto()
2988 net->lastsa += rtt; in sctp_calculate_rto()
2992 rtt -= (net->lastsv >> SCTP_RTT_VAR_SHIFT); in sctp_calculate_rto()
2993 net->lastsv += rtt; in sctp_calculate_rto()
2995 rto_logging(net, SCTP_LOG_RTTVAR); in sctp_calculate_rto()
2999 net->RTO_measured = 1; in sctp_calculate_rto()
3001 net->lastsa = rtt << SCTP_RTT_SHIFT; in sctp_calculate_rto()
3002 net->lastsv = (rtt / 2) << SCTP_RTT_VAR_SHIFT; in sctp_calculate_rto()
3004 rto_logging(net, SCTP_LOG_INITIAL_RTT); in sctp_calculate_rto()
3007 if (net->lastsv == 0) { in sctp_calculate_rto()
3008 net->lastsv = SCTP_CLOCK_GRANULARITY; in sctp_calculate_rto()
3010 new_rto = (net->lastsa >> SCTP_RTT_SHIFT) + net->lastsv; in sctp_calculate_rto()
3025 net->RTO = new_rto; in sctp_calculate_rto()
4080 struct sctp_nets *net; in sctp_ulp_notify() local
4127 net = (struct sctp_nets *)data; in sctp_ulp_notify()
4129 &net->ro._l_addr.sa, error, so_locked); in sctp_ulp_notify()
4132 net = (struct sctp_nets *)data; in sctp_ulp_notify()
4134 &net->ro._l_addr.sa, error, so_locked); in sctp_ulp_notify()
4137 net = (struct sctp_nets *)data; in sctp_ulp_notify()
4139 &net->ro._l_addr.sa, error, so_locked); in sctp_ulp_notify()
4349 if (sp->net) { in sctp_report_all_outbound()
4350 sctp_free_remote_addr(sp->net); in sctp_report_all_outbound()
4351 sp->net = NULL; in sctp_report_all_outbound()
6851 /* Can't get proc for Net/Open BSD */ in sctp_bindx_add_address()
7226 struct sctp_nets *net; in sctp_recv_icmp_tunneled_packet() local
7255 net = NULL; in sctp_recv_icmp_tunneled_packet()
7258 &inp, &net, 1, in sctp_recv_icmp_tunneled_packet()
7261 (net != NULL) && in sctp_recv_icmp_tunneled_packet()
7264 if ((udp->uh_dport != net->port) || in sctp_recv_icmp_tunneled_packet()
7306 sctp_notify(inp, stcb, net, type, code, in sctp_recv_icmp_tunneled_packet()
7331 struct sctp_nets *net; in sctp_recv_icmp6_tunneled_packet() local
7380 net = NULL; in sctp_recv_icmp6_tunneled_packet()
7383 &inp, &net, 1, SCTP_DEFAULT_VRFID); in sctp_recv_icmp6_tunneled_packet()
7385 (net != NULL) && in sctp_recv_icmp6_tunneled_packet()
7388 if ((udp.uh_dport != net->port) || in sctp_recv_icmp6_tunneled_packet()
7448 sctp6_notify(inp, stcb, net, type, code, in sctp_recv_icmp6_tunneled_packet()