Lines Matching refs:net

2943     struct sctp_nets *net,  in sctp_choose_boundall()  argument
2991 if (net) { in sctp_choose_boundall()
2992 cur_addr_num = net->indx_of_eligible_next_to_use; in sctp_choose_boundall()
3028 if (net) { in sctp_choose_boundall()
3030 net->indx_of_eligible_next_to_use = cur_addr_num + 1; in sctp_choose_boundall()
3079 if (net) { in sctp_choose_boundall()
3080 net->indx_of_eligible_next_to_use = cur_addr_num + 1; in sctp_choose_boundall()
3086 SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, &net->ro._l_addr.sa); in sctp_choose_boundall()
3296 struct sctp_nets *net, in sctp_source_address_selection() argument
3390 if (net != NULL) { in sctp_source_address_selection()
3392 net->addr_is_local = 1; in sctp_source_address_selection()
3411 if (net != NULL) { in sctp_source_address_selection()
3413 net->addr_is_local = 1; in sctp_source_address_selection()
3428 answer = sctp_choose_boundall(inp, stcb, net, ro, vrf_id, in sctp_source_address_selection()
3908 struct sctp_nets *net, in sctp_handle_no_route() argument
3913 if (net) { in sctp_handle_no_route()
3915 SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT1, &net->ro._l_addr.sa); in sctp_handle_no_route()
3916 if (net->dest_state & SCTP_ADDR_CONFIRMED) { in sctp_handle_no_route()
3917 if ((net->dest_state & SCTP_ADDR_REACHABLE) && stcb) { in sctp_handle_no_route()
3918 SCTPDBG(SCTP_DEBUG_OUTPUT1, "no route takes interface %p down\n", (void *)net); in sctp_handle_no_route()
3921 (void *)net, in sctp_handle_no_route()
3923 net->dest_state &= ~SCTP_ADDR_REACHABLE; in sctp_handle_no_route()
3924 net->dest_state &= ~SCTP_ADDR_PF; in sctp_handle_no_route()
3928 if (net == stcb->asoc.primary_destination) { in sctp_handle_no_route()
3932 alt = sctp_find_alternate_net(stcb, net, 0); in sctp_handle_no_route()
3933 if (alt != net) { in sctp_handle_no_route()
3939 if (net->ro._s_addr) { in sctp_handle_no_route()
3940 sctp_free_ifa(net->ro._s_addr); in sctp_handle_no_route()
3941 net->ro._s_addr = NULL; in sctp_handle_no_route()
3943 net->src_addr_selected = 0; in sctp_handle_no_route()
3954 struct sctp_nets *net, in sctp_lowlevel_chunk_output() argument
4000 if ((net) && (net->dest_state & SCTP_ADDR_OUT_OF_SCOPE)) { in sctp_lowlevel_chunk_output()
4001 SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EFAULT); in sctp_lowlevel_chunk_output()
4017 if (net) { in sctp_lowlevel_chunk_output()
4018 tos_value = net->dscp; in sctp_lowlevel_chunk_output()
4047 if (net != NULL) { in sctp_lowlevel_chunk_output()
4048 m->m_pkthdr.flowid = net->flowid; in sctp_lowlevel_chunk_output()
4049 M_HASHTYPE_SET(m, net->flowtype); in sctp_lowlevel_chunk_output()
4087 if (net == NULL) { in sctp_lowlevel_chunk_output()
4092 ro = (sctp_route_t *)&net->ro; in sctp_lowlevel_chunk_output()
4098 if (net && out_of_asoc_ok == 0) { in sctp_lowlevel_chunk_output()
4099 …if (net->ro._s_addr && (net->ro._s_addr->localifa_flags & (SCTP_BEING_DELETED | SCTP_ADDR_IFA_UNUS… in sctp_lowlevel_chunk_output()
4100 sctp_free_ifa(net->ro._s_addr); in sctp_lowlevel_chunk_output()
4101 net->ro._s_addr = NULL; in sctp_lowlevel_chunk_output()
4102 net->src_addr_selected = 0; in sctp_lowlevel_chunk_output()
4105 if (net->src_addr_selected == 0) { in sctp_lowlevel_chunk_output()
4107 net->ro._s_addr = sctp_source_address_selection(inp, stcb, in sctp_lowlevel_chunk_output()
4108 ro, net, 0, in sctp_lowlevel_chunk_output()
4110 net->src_addr_selected = 1; in sctp_lowlevel_chunk_output()
4112 if (net->ro._s_addr == NULL) { in sctp_lowlevel_chunk_output()
4114 net->src_addr_selected = 0; in sctp_lowlevel_chunk_output()
4115 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4120 ip->ip_src = net->ro._s_addr->address.sin.sin_addr; in sctp_lowlevel_chunk_output()
4126 net, in sctp_lowlevel_chunk_output()
4130 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4144 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4181 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4238 if (net == NULL) { in sctp_lowlevel_chunk_output()
4242 if ((ro->ro_nh != NULL) && (net->ro._s_addr) && in sctp_lowlevel_chunk_output()
4243 ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { in sctp_lowlevel_chunk_output()
4246 mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_nh); in sctp_lowlevel_chunk_output()
4248 if (net->port) { in sctp_lowlevel_chunk_output()
4251 if (mtu < net->mtu) { in sctp_lowlevel_chunk_output()
4252 net->mtu = mtu; in sctp_lowlevel_chunk_output()
4260 if (net->ro._s_addr && in sctp_lowlevel_chunk_output()
4261 net->src_addr_selected) { in sctp_lowlevel_chunk_output()
4262 sctp_free_ifa(net->ro._s_addr); in sctp_lowlevel_chunk_output()
4263 net->ro._s_addr = NULL; in sctp_lowlevel_chunk_output()
4265 net->src_addr_selected = 0; in sctp_lowlevel_chunk_output()
4285 if (net) { in sctp_lowlevel_chunk_output()
4286 flowlabel = net->flowlabel; in sctp_lowlevel_chunk_output()
4315 if (net != NULL) { in sctp_lowlevel_chunk_output()
4316 m->m_pkthdr.flowid = net->flowid; in sctp_lowlevel_chunk_output()
4317 M_HASHTYPE_SET(m, net->flowtype); in sctp_lowlevel_chunk_output()
4332 SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); in sctp_lowlevel_chunk_output()
4336 if (net == NULL) { in sctp_lowlevel_chunk_output()
4341 ro = (sctp_route_t *)&net->ro; in sctp_lowlevel_chunk_output()
4383 if (net && out_of_asoc_ok == 0) { in sctp_lowlevel_chunk_output()
4384 …if (net->ro._s_addr && (net->ro._s_addr->localifa_flags & (SCTP_BEING_DELETED | SCTP_ADDR_IFA_UNUS… in sctp_lowlevel_chunk_output()
4385 sctp_free_ifa(net->ro._s_addr); in sctp_lowlevel_chunk_output()
4386 net->ro._s_addr = NULL; in sctp_lowlevel_chunk_output()
4387 net->src_addr_selected = 0; in sctp_lowlevel_chunk_output()
4390 if (net->src_addr_selected == 0) { in sctp_lowlevel_chunk_output()
4391 sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_lowlevel_chunk_output()
4394 SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); in sctp_lowlevel_chunk_output()
4399 net->ro._s_addr = sctp_source_address_selection(inp, in sctp_lowlevel_chunk_output()
4402 net, in sctp_lowlevel_chunk_output()
4406 net->src_addr_selected = 1; in sctp_lowlevel_chunk_output()
4408 if (net->ro._s_addr == NULL) { in sctp_lowlevel_chunk_output()
4410 net->src_addr_selected = 0; in sctp_lowlevel_chunk_output()
4411 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4416 lsa6->sin6_addr = net->ro._s_addr->address.sin6.sin6_addr; in sctp_lowlevel_chunk_output()
4421 SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); in sctp_lowlevel_chunk_output()
4429 net, in sctp_lowlevel_chunk_output()
4433 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4454 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4480 sctp_handle_no_route(stcb, net, so_locked); in sctp_lowlevel_chunk_output()
4518 if (net) { in sctp_lowlevel_chunk_output()
4519 sin6 = (struct sockaddr_in6 *)&net->ro._l_addr; in sctp_lowlevel_chunk_output()
4553 if (net) { in sctp_lowlevel_chunk_output()
4567 if (net == NULL) { in sctp_lowlevel_chunk_output()
4577 if (net->ro._s_addr && in sctp_lowlevel_chunk_output()
4578 net->src_addr_selected) { in sctp_lowlevel_chunk_output()
4579 sctp_free_ifa(net->ro._s_addr); in sctp_lowlevel_chunk_output()
4580 net->ro._s_addr = NULL; in sctp_lowlevel_chunk_output()
4582 net->src_addr_selected = 0; in sctp_lowlevel_chunk_output()
4584 if ((ro->ro_nh != NULL) && (net->ro._s_addr) && in sctp_lowlevel_chunk_output()
4585 ((net->dest_state & SCTP_ADDR_NO_PMTUD) == 0)) { in sctp_lowlevel_chunk_output()
4588 mtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, ro->ro_nh); in sctp_lowlevel_chunk_output()
4590 if (net->port) { in sctp_lowlevel_chunk_output()
4593 if (mtu < net->mtu) { in sctp_lowlevel_chunk_output()
4594 net->mtu = mtu; in sctp_lowlevel_chunk_output()
4614 SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, EFAULT); in sctp_lowlevel_chunk_output()
4623 struct sctp_nets *net; in sctp_send_initiate() local
4635 net = stcb->asoc.primary_destination; in sctp_send_initiate()
4636 if (net == NULL) { in sctp_send_initiate()
4637 net = TAILQ_FIRST(&stcb->asoc.nets); in sctp_send_initiate()
4638 if (net == NULL) { in sctp_send_initiate()
4643 net->dest_state &= ~SCTP_ADDR_UNCONFIRMED; in sctp_send_initiate()
4644 (void)sctp_set_primary_addr(stcb, NULL, net); in sctp_send_initiate()
4647 net->dest_state &= ~SCTP_ADDR_UNCONFIRMED; in sctp_send_initiate()
4651 if (net->ro._l_addr.sa.sa_family == AF_INET6) { in sctp_send_initiate()
4656 if (IN6_IS_ADDR_LINKLOCAL(&net->ro._l_addr.sin6.sin6_addr)) in sctp_send_initiate()
4660 if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { in sctp_send_initiate()
4666 sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, net); in sctp_send_initiate()
4897 if ((error = sctp_lowlevel_chunk_output(inp, stcb, net, in sctp_send_initiate()
4898 (struct sockaddr *)&net->ro._l_addr, in sctp_send_initiate()
4901 net->port, NULL, in sctp_send_initiate()
4913 (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); in sctp_send_initiate()
5290 struct sctp_nets *net; in sctp_are_there_new_addresses() local
5334 TAILQ_FOREACH(net, &asoc->nets, sctp_next) { in sctp_are_there_new_addresses()
5335 sa = (struct sockaddr *)&net->ro._l_addr; in sctp_are_there_new_addresses()
5444 TAILQ_FOREACH(net, &asoc->nets, sctp_next) { in sctp_are_there_new_addresses()
5445 sa = (struct sockaddr *)&net->ro._l_addr; in sctp_are_there_new_addresses()
5528 struct sctp_nets *net = NULL; in sctp_send_initiate_ack() local
5623 net = asoc->primary_destination; in sctp_send_initiate_ack()
5652 if (net == NULL) { in sctp_send_initiate_ack()
5769 to = (struct sockaddr *)&net->ro._l_addr; in sctp_send_initiate_ack()
5779 if (net->src_addr_selected == 0) { in sctp_send_initiate_ack()
5784 net->ro._s_addr = sctp_source_address_selection(inp, in sctp_send_initiate_ack()
5785 stcb, (sctp_route_t *)&net->ro, in sctp_send_initiate_ack()
5786 net, 0, vrf_id); in sctp_send_initiate_ack()
5787 if (net->ro._s_addr == NULL) { in sctp_send_initiate_ack()
5793 net->src_addr_selected = 1; in sctp_send_initiate_ack()
5795 stc.laddress[0] = net->ro._s_addr->address.sin.sin_addr.s_addr; in sctp_send_initiate_ack()
5811 if (net->src_addr_selected == 0) { in sctp_send_initiate_ack()
5816 net->ro._s_addr = sctp_source_address_selection(inp, in sctp_send_initiate_ack()
5817 stcb, (sctp_route_t *)&net->ro, in sctp_send_initiate_ack()
5818 net, 0, vrf_id); in sctp_send_initiate_ack()
5819 if (net->ro._s_addr == NULL) { in sctp_send_initiate_ack()
5825 net->src_addr_selected = 1; in sctp_send_initiate_ack()
5827 memcpy(&stc.laddress, &net->ro._s_addr->address.sin6.sin6_addr, in sctp_send_initiate_ack()
6390 struct sctp_nets *net, in sctp_msg_append() argument
6407 SCTP_LTRACE_ERR_RET_PKT(m, NULL, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); in sctp_msg_append()
6413 SCTP_LTRACE_ERR_RET_PKT(m, NULL, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); in sctp_msg_append()
6451 sp->net = net; in sctp_msg_append()
6452 atomic_add_int(&sp->net->ref_count, 1); in sctp_msg_append()
6454 sp->net = NULL; in sctp_msg_append()
6670 struct sctp_nets *net; in sctp_sendall_iterator() local
6697 net = stcb->asoc.alternate; in sctp_sendall_iterator()
6699 net = stcb->asoc.primary_destination; in sctp_sendall_iterator()
6741 ret = sctp_msg_append(stcb, net, m, &ca->sndrcv); in sctp_sendall_iterator()
6768 sctp_send_shutdown(stcb, net); in sctp_sendall_iterator()
6770 net); in sctp_sendall_iterator()
7042 struct sctp_nets *net) in sctp_clean_up_datalist() argument
7060 data_list[i]->sent_rcv_time = net->last_sent_time; in sctp_clean_up_datalist()
7061 data_list[i]->rec.data.cwnd_at_send = net->cwnd; in sctp_clean_up_datalist()
7064 data_list[i]->whoTo = net; in sctp_clean_up_datalist()
7065 atomic_add_int(&net->ref_count, 1); in sctp_clean_up_datalist()
7125 (*asoc->cc_functions.sctp_cwnd_update_packet_transmitted) (stcb, net); in sctp_clean_up_datalist()
7229 struct sctp_nets *net, in sctp_move_to_outqueue() argument
7293 if (sp->net) { in sctp_move_to_outqueue()
7294 sctp_free_remote_addr(sp->net); in sctp_move_to_outqueue()
7295 sp->net = NULL; in sctp_move_to_outqueue()
7578 if (sp->net) { in sctp_move_to_outqueue()
7579 chk->whoTo = sp->net; in sctp_move_to_outqueue()
7589 stcb->asoc.ss_functions.sctp_ss_scheduled(stcb, net, asoc, strq, to_move); in sctp_move_to_outqueue()
7680 if (sp->net) { in sctp_move_to_outqueue()
7681 sctp_free_remote_addr(sp->net); in sctp_move_to_outqueue()
7682 sp->net = NULL; in sctp_move_to_outqueue()
7699 sctp_fill_outqueue(struct sctp_tcb *stcb, struct sctp_nets *net, in sctp_fill_outqueue() argument
7711 switch (net->ro._l_addr.sa.sa_family) { in sctp_fill_outqueue()
7714 space_left = net->mtu - SCTP_MIN_V4_OVERHEAD; in sctp_fill_outqueue()
7719 space_left = net->mtu - SCTP_MIN_OVERHEAD; in sctp_fill_outqueue()
7724 space_left = net->mtu; in sctp_fill_outqueue()
7732 strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); in sctp_fill_outqueue()
7736 moved = sctp_move_to_outqueue(stcb, net, strq, space_left, in sctp_fill_outqueue()
7742 strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); in sctp_fill_outqueue()
7759 stcb->asoc.ss_functions.sctp_ss_packet_done(stcb, net, asoc); in sctp_fill_outqueue()
7763 (net == stcb->asoc.primary_destination)) { in sctp_fill_outqueue()
7786 sctp_move_chunks_from_net(struct sctp_tcb *stcb, struct sctp_nets *net) in sctp_move_chunks_from_net() argument
7793 if (net == NULL) { in sctp_move_chunks_from_net()
7799 if (sp->net == net) { in sctp_move_chunks_from_net()
7800 sctp_free_remote_addr(sp->net); in sctp_move_chunks_from_net()
7801 sp->net = NULL; in sctp_move_chunks_from_net()
7806 if (chk->whoTo == net) { in sctp_move_chunks_from_net()
7835 struct sctp_nets *net, *start_at, *sack_goes_to = NULL, *old_start_at = NULL; in sctp_med_chunk_output() local
7942 TAILQ_FOREACH(net, &asoc->nets, sctp_next) { in sctp_med_chunk_output()
7954 net->window_probe = 0; in sctp_med_chunk_output()
7955 if ((net != stcb->asoc.alternate) && in sctp_med_chunk_output()
7956 ((net->dest_state & SCTP_ADDR_PF) || in sctp_med_chunk_output()
7957 ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) || in sctp_med_chunk_output()
7958 (net->dest_state & SCTP_ADDR_UNCONFIRMED))) { in sctp_med_chunk_output()
7960 sctp_log_cwnd(stcb, net, 1, in sctp_med_chunk_output()
7966 (net->flight_size == 0)) { in sctp_med_chunk_output()
7967 (*stcb->asoc.cc_functions.sctp_cwnd_new_transmission_begins) (stcb, net); in sctp_med_chunk_output()
7969 if (net->flight_size >= net->cwnd) { in sctp_med_chunk_output()
7972 sctp_log_cwnd(stcb, net, 3, in sctp_med_chunk_output()
7978 sctp_log_cwnd(stcb, net, 4, SCTP_CWND_LOG_FILL_OUTQ_CALLED); in sctp_med_chunk_output()
7980 sctp_fill_outqueue(stcb, net, frag_point, eeor_mode, &quit_now, so_locked); in sctp_med_chunk_output()
8025 for (net = start_at; net != NULL; net = TAILQ_NEXT(net, sctp_next)) { in sctp_med_chunk_output()
8028 if (old_start_at && (old_start_at == net)) { in sctp_med_chunk_output()
8035 (net->flight_size >= net->cwnd)) { in sctp_med_chunk_output()
8048 if (net->dest_state & SCTP_ADDR_UNCONFIRMED) { in sctp_med_chunk_output()
8053 switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { in sctp_med_chunk_output()
8056 mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; in sctp_med_chunk_output()
8061 mtu = net->mtu - SCTP_MIN_OVERHEAD; in sctp_med_chunk_output()
8066 mtu = net->mtu; in sctp_med_chunk_output()
8094 if (asoc->primary_destination != net) { in sctp_med_chunk_output()
8098 if (asoc->alternate != net) { in sctp_med_chunk_output()
8103 if (chk->whoTo != net) { in sctp_med_chunk_output()
8190 chk->whoTo = net; in sctp_med_chunk_output()
8191 atomic_add_int(&net->ref_count, 1); in sctp_med_chunk_output()
8201 sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, inp, stcb, net); in sctp_med_chunk_output()
8211 net->last_sent_time = *now; in sctp_med_chunk_output()
8213 if ((error = sctp_lowlevel_chunk_output(inp, stcb, net, in sctp_med_chunk_output()
8214 (struct sockaddr *)&net->ro._l_addr, in sctp_med_chunk_output()
8220 net->port, NULL, in sctp_med_chunk_output()
8242 sctp_move_chunks_from_net(stcb, net); in sctp_med_chunk_output()
8262 switch (net->ro._l_addr.sa.sa_family) { in sctp_med_chunk_output()
8265 mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; in sctp_med_chunk_output()
8270 mtu = net->mtu - SCTP_MIN_OVERHEAD; in sctp_med_chunk_output()
8275 mtu = net->mtu; in sctp_med_chunk_output()
8300 if (chk->whoTo == net) { in sctp_med_chunk_output()
8306 } else if (sack_goes_to == net) { in sctp_med_chunk_output()
8316 if (asoc->primary_destination != net) { in sctp_med_chunk_output()
8320 if (asoc->alternate != net) { in sctp_med_chunk_output()
8325 if (chk->whoTo != net) { in sctp_med_chunk_output()
8458 chk->whoTo = net; in sctp_med_chunk_output()
8459 atomic_add_int(&net->ref_count, 1); in sctp_med_chunk_output()
8479 sctp_timer_start(SCTP_TIMER_TYPE_ASCONF, inp, stcb, net); in sctp_med_chunk_output()
8489 sctp_timer_start(SCTP_TIMER_TYPE_COOKIE, inp, stcb, net); in sctp_med_chunk_output()
8499 net->last_sent_time = *now; in sctp_med_chunk_output()
8502 if ((error = sctp_lowlevel_chunk_output(inp, stcb, net, in sctp_med_chunk_output()
8503 (struct sockaddr *)&net->ro._l_addr, in sctp_med_chunk_output()
8510 net->port, NULL, in sctp_med_chunk_output()
8531 sctp_move_chunks_from_net(stcb, net); in sctp_med_chunk_output()
8551 switch (net->ro._l_addr.sa.sa_family) { in sctp_med_chunk_output()
8554 mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; in sctp_med_chunk_output()
8559 mtu = net->mtu - SCTP_MIN_OVERHEAD; in sctp_med_chunk_output()
8564 mtu = net->mtu; in sctp_med_chunk_output()
8578 (net != stcb->asoc.alternate) && in sctp_med_chunk_output()
8579 (net->dest_state & SCTP_ADDR_PF)) { in sctp_med_chunk_output()
8582 if (net->flight_size >= net->cwnd) { in sctp_med_chunk_output()
8587 (net->flight_size > max_rwnd_per_dest)) { in sctp_med_chunk_output()
8599 (net->flight_size > max_send_per_dest)) { in sctp_med_chunk_output()
8617 switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { in sctp_med_chunk_output()
8620 if (net->mtu > SCTP_MIN_V4_OVERHEAD) in sctp_med_chunk_output()
8621 omtu = net->mtu - SCTP_MIN_V4_OVERHEAD; in sctp_med_chunk_output()
8628 if (net->mtu > SCTP_MIN_OVERHEAD) in sctp_med_chunk_output()
8629 omtu = net->mtu - SCTP_MIN_OVERHEAD; in sctp_med_chunk_output()
8649 if (net->flight_size >= net->cwnd) { in sctp_med_chunk_output()
8655 (chk->whoTo != net)) { in sctp_med_chunk_output()
8662 (asoc->alternate != net) && in sctp_med_chunk_output()
8665 } else if ((net != asoc->primary_destination) && in sctp_med_chunk_output()
8734 if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { in sctp_med_chunk_output()
8735 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_med_chunk_output()
8793 net->window_probe = 1; in sctp_med_chunk_output()
8820 stcb, net); in sctp_med_chunk_output()
8829 sctp_timer_start(SCTP_TIMER_TYPE_COOKIE, inp, stcb, net); in sctp_med_chunk_output()
8834 if (bundle_at && (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer))) { in sctp_med_chunk_output()
8839 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_med_chunk_output()
8847 net->last_sent_time = *now; in sctp_med_chunk_output()
8852 net, in sctp_med_chunk_output()
8853 (struct sockaddr *)&net->ro._l_addr, in sctp_med_chunk_output()
8863 net->port, NULL, in sctp_med_chunk_output()
8881 sctp_move_chunks_from_net(stcb, net); in sctp_med_chunk_output()
8915 if (net->rto_needed) { in sctp_med_chunk_output()
8917 net->rto_needed = 0; in sctp_med_chunk_output()
8920 sctp_clean_up_datalist(stcb, asoc, data_list, bundle_at, net); in sctp_med_chunk_output()
8927 sctp_log_cwnd(stcb, net, tsns_sent, SCTP_CWND_LOG_FROM_SEND); in sctp_med_chunk_output()
8942 sctp_log_cwnd(stcb, net, *num_out, SCTP_CWND_LOG_FROM_SEND); in sctp_med_chunk_output()
9021 struct sctp_nets *net) in sctp_send_cookie_echo() argument
9098 chk->whoTo = net; in sctp_send_cookie_echo()
9110 struct sctp_nets *net) in sctp_send_heartbeat_ack() argument
9119 if (net == NULL) in sctp_send_heartbeat_ack()
9154 chk->whoTo = net; in sctp_send_heartbeat_ack()
9208 sctp_send_shutdown_ack(struct sctp_tcb *stcb, struct sctp_nets *net) in sctp_send_shutdown_ack() argument
9236 chk->whoTo = net; in sctp_send_shutdown_ack()
9251 sctp_send_shutdown(struct sctp_tcb *stcb, struct sctp_nets *net) in sctp_send_shutdown() argument
9290 chk->whoTo = net; in sctp_send_shutdown()
9304 chk->whoTo = net; in sctp_send_shutdown()
9316 sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net, int addr_locked) in sctp_send_asconf() argument
9356 chk->whoTo = net; in sctp_send_asconf()
9375 struct sctp_nets *net = NULL; in sctp_send_asconf_ack() local
9386 net = sctp_find_alternate_net(stcb, stcb->asoc.last_control_chunk_from, 0); in sctp_send_asconf_ack()
9387 if (net == NULL) { in sctp_send_asconf_ack()
9391 net = stcb->asoc.alternate; in sctp_send_asconf_ack()
9393 net = stcb->asoc.primary_destination; in sctp_send_asconf_ack()
9396 net = stcb->asoc.last_control_chunk_from; in sctp_send_asconf_ack()
9403 net = stcb->asoc.alternate; in sctp_send_asconf_ack()
9405 net = stcb->asoc.primary_destination; in sctp_send_asconf_ack()
9408 net = stcb->asoc.last_control_chunk_from; in sctp_send_asconf_ack()
9411 latest_ack->last_sent_to = net; in sctp_send_asconf_ack()
9441 chk->whoTo = net; in sctp_send_asconf_ack()
9478 struct sctp_nets *net = NULL; in sctp_chunk_retransmission() local
9650 net = chk->whoTo; in sctp_chunk_retransmission()
9651 switch (net->ro._l_addr.sa.sa_family) { in sctp_chunk_retransmission()
9654 mtu = net->mtu - SCTP_MIN_V4_OVERHEAD; in sctp_chunk_retransmission()
9659 mtu = net->mtu - SCTP_MIN_OVERHEAD; in sctp_chunk_retransmission()
9664 mtu = net->mtu; in sctp_chunk_retransmission()
9698 net->fast_retran_ip = 0; in sctp_chunk_retransmission()
9704 if (net->flight_size >= net->cwnd) { in sctp_chunk_retransmission()
9713 net->fast_retran_ip = 1; in sctp_chunk_retransmission()
9778 if (fwd->whoTo != net) { in sctp_chunk_retransmission()
9839 if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { in sctp_chunk_retransmission()
9844 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_chunk_retransmission()
9856 if ((error = sctp_lowlevel_chunk_output(inp, stcb, net, in sctp_chunk_retransmission()
9857 (struct sockaddr *)&net->ro._l_addr, m, in sctp_chunk_retransmission()
9861 net->port, NULL, in sctp_chunk_retransmission()
9969 sctp_timer_stop(SCTP_TIMER_TYPE_SEND, inp, stcb, net, in sctp_chunk_retransmission()
9971 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); in sctp_chunk_retransmission()
9976 sctp_log_cwnd(stcb, net, tsns_sent, SCTP_CWND_LOG_FROM_RESEND); in sctp_chunk_retransmission()
10005 struct sctp_nets *net; in sctp_timer_validation() local
10008 TAILQ_FOREACH(net, &asoc->nets, sctp_next) { in sctp_timer_validation()
10009 if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) { in sctp_timer_validation()
10045 struct sctp_nets *net; in sctp_chunk_output() local
10170 TAILQ_FOREACH(net, &asoc->nets, sctp_next) { in sctp_chunk_output()
10171 if ((net->dest_state & SCTP_ADDR_REACHABLE) == 0) { in sctp_chunk_output()
10179 if (net->ref_count > 1) in sctp_chunk_output()
10180 sctp_move_chunks_from_net(stcb, net); in sctp_chunk_output()
10189 if ((net->flight_size + (asoc->max_burst * net->mtu)) < net->cwnd) { in sctp_chunk_output()
10195 asoc->cc_functions.sctp_cwnd_update_after_output(stcb, net, asoc->max_burst); in sctp_chunk_output()
10197 sctp_log_maxburst(stcb, net, 0, asoc->max_burst, SCTP_MAX_BURST_APPLIED); in sctp_chunk_output()
10201 net->fast_retran_ip = 0; in sctp_chunk_output()
10203 if (net->flight_size == 0) { in sctp_chunk_output()
10943 struct sctp_nets *net; in sctp_send_abort_tcb() local
11003 net = stcb->asoc.alternate; in sctp_send_abort_tcb()
11005 net = stcb->asoc.primary_destination; in sctp_send_abort_tcb()
11027 if ((error = sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net, in sctp_send_abort_tcb()
11028 (struct sockaddr *)&net->ro._l_addr, in sctp_send_abort_tcb()
11048 struct sctp_nets *net, in sctp_send_shutdown_complete() argument
11084 if ((error = sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net, in sctp_send_shutdown_complete()
11085 (struct sockaddr *)&net->ro._l_addr, in sctp_send_shutdown_complete()
11089 net->port, NULL, in sctp_send_shutdown_complete()
11373 sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked) in sctp_send_hb() argument
11380 if (net == NULL) { in sctp_send_hb()
11384 switch (net->ro._l_addr.sa.sa_family) { in sctp_send_hb()
11418 chk->whoTo = net; in sctp_send_hb()
11433 hb->heartbeat.hb_info.addr_family = (uint8_t)net->ro._l_addr.sa.sa_family; in sctp_send_hb()
11434 hb->heartbeat.hb_info.addr_len = net->ro._l_addr.sa.sa_len; in sctp_send_hb()
11435 if (net->dest_state & SCTP_ADDR_UNCONFIRMED) { in sctp_send_hb()
11440net->heartbeat_random1 = hb->heartbeat.hb_info.random_value1 = sctp_select_initial_TSN(&stcb->sctp… in sctp_send_hb()
11441net->heartbeat_random2 = hb->heartbeat.hb_info.random_value2 = sctp_select_initial_TSN(&stcb->sctp… in sctp_send_hb()
11443 net->heartbeat_random1 = hb->heartbeat.hb_info.random_value1 = 0; in sctp_send_hb()
11444 net->heartbeat_random2 = hb->heartbeat.hb_info.random_value2 = 0; in sctp_send_hb()
11446 switch (net->ro._l_addr.sa.sa_family) { in sctp_send_hb()
11450 &net->ro._l_addr.sin.sin_addr, in sctp_send_hb()
11451 sizeof(net->ro._l_addr.sin.sin_addr)); in sctp_send_hb()
11457 &net->ro._l_addr.sin6.sin6_addr, in sctp_send_hb()
11458 sizeof(net->ro._l_addr.sin6.sin6_addr)); in sctp_send_hb()
11470 net->hb_responded = 0; in sctp_send_hb()
11478 sctp_send_ecn_echo(struct sctp_tcb *stcb, struct sctp_nets *net, in sctp_send_ecn_echo() argument
11485 if (net == NULL) { in sctp_send_ecn_echo()
11491 if ((chk->rec.chunk_id.id == SCTP_ECN_ECHO) && (net == chk->whoTo)) { in sctp_send_ecn_echo()
11528 chk->whoTo = net; in sctp_send_ecn_echo()
11543 sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net, in sctp_send_packet_dropped() argument
11658 if (net) { in sctp_send_packet_dropped()
11660 chk->whoTo = net; in sctp_send_packet_dropped()
11692 sctp_send_cwr(struct sctp_tcb *stcb, struct sctp_nets *net, uint32_t high_tsn, uint8_t override) in sctp_send_cwr() argument
11699 if (net == NULL) { in sctp_send_cwr()
11704 if ((chk->rec.chunk_id.id == SCTP_ECN_CWR) && (net == chk->whoTo)) { in sctp_send_cwr()
11742 chk->whoTo = net; in sctp_send_cwr()
12437 struct sctp_nets *net, in sctp_copy_it_in() argument
12456 SCTP_LTRACE_ERR_RET(NULL, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOMEM); in sctp_copy_it_in()
12502 sp->net = net; in sctp_copy_it_in()
12503 atomic_add_int(&sp->net->ref_count, 1); in sctp_copy_it_in()
12505 sp->net = NULL; in sctp_copy_it_in()
12578 struct sctp_nets *net; in sctp_lower_sosend() local
12602 net = NULL; in sctp_lower_sosend()
12729 stcb = sctp_findassociation_ep_addr(&t_inp, addr, &net, NULL, NULL); in sctp_lower_sosend()
12765 stcb = sctp_findassociation_ep_addr(&t_inp, addr, &net, NULL, NULL); in sctp_lower_sosend()
12768 stcb = sctp_findassociation_cmsgs(&t_inp, port, control, &net, &error); in sctp_lower_sosend()
12990 net = sctp_findnet(stcb, addr); in sctp_lower_sosend()
12992 net = NULL; in sctp_lower_sosend()
12994 if ((net == NULL) || in sctp_lower_sosend()
13001 net = asoc->alternate; in sctp_lower_sosend()
13003 net = asoc->primary_destination; in sctp_lower_sosend()
13194 sp = sctp_copy_it_in(stcb, asoc, sndrcvninfo, uio, net, max_len, user_marks_eor, &error); in sctp_lower_sosend()
13226 if (sp->net != NULL) { in sctp_lower_sosend()
13227 sctp_free_remote_addr(sp->net); in sctp_lower_sosend()
13228 sp->net = NULL; in sctp_lower_sosend()
13406 if ((net->flight_size > net->cwnd) && in sctp_lower_sosend()
13412 if (net->flight_size > (2 * net->mtu)) { in sctp_lower_sosend()
13559 error = sctp_msg_append(stcb, net, top, sndrcvninfo); in sctp_lower_sosend()
13685 if ((net->flight_size > net->cwnd) && in sctp_lower_sosend()
13691 if (net->flight_size > (2 * net->mtu)) { in sctp_lower_sosend()
13784 SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, error); in sctp_lower_sosend()