Lines Matching defs:asoc

54  * An ASCONF parameter queue exists per asoc which holds the pending address
252 } else if (sctp_add_remote_addr(stcb, sa, &net, stcb->asoc.port,
292 TAILQ_FOREACH_SAFE(net, &stcb->asoc.nets, sctp_next, nnet) {
426 * note if result == -2, the address doesn't exist in the asoc but
431 /* only one address in the asoc */
540 if ((stcb->asoc.primary_destination->dest_state & SCTP_ADDR_REACHABLE) &&
541 ((stcb->asoc.primary_destination->dest_state & SCTP_ADDR_PF) == 0) &&
542 (stcb->asoc.alternate != NULL)) {
543 sctp_free_remote_addr(stcb->asoc.alternate);
544 stcb->asoc.alternate = NULL;
568 (stcb->asoc.primary_destination->dest_state &
576 stcb->asoc.primary_destination);
581 stcb->asoc.deleted_primary);
608 struct sctp_association *asoc;
628 asoc = &stcb->asoc;
631 if (SCTP_TSN_GE(asoc->asconf_seq_in, serial_num)) {
637 } else if (serial_num != (asoc->asconf_seq_in + 1)) {
639 serial_num, asoc->asconf_seq_in + 1);
644 asoc->asconf_seq_in = serial_num; /* update sequence */
655 TAILQ_FOREACH_SAFE(ack, &asoc->asconf_ack_sent, next, ack_next) {
660 TAILQ_REMOVE(&asoc->asconf_ack_sent, ack, next);
819 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_ack_sent, ack, next);
822 if (stcb->asoc.last_control_chunk_from == NULL) {
831 stcb->asoc.last_control_chunk_from = sctp_findnet(stcb, src);
833 if (stcb->asoc.last_control_chunk_from == NULL) {
943 stcb->asoc.asconf_seq_out_acked = stcb->asoc.asconf_seq_out;
967 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
997 if (stcb->asoc.deleted_primary == NULL) {
1001 if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) {
1003 SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.deleted_primary->ro._l_addr.sa);
1005 SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.primary_destination->ro._l_addr.sa);
1007 stcb->asoc.deleted_primary,
1009 stcb->asoc.num_send_timers_up--;
1010 if (stcb->asoc.num_send_timers_up < 0) {
1011 stcb->asoc.num_send_timers_up = 0;
1015 stcb->asoc.deleted_primary);
1022 sctp_auditing(4, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary);
1025 if ((stcb->asoc.num_send_timers_up == 0) &&
1026 (stcb->asoc.sent_queue_cnt > 0)) {
1029 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
1053 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
1055 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
1059 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1063 stcb->asoc.marked_retrans++;
1089 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1108 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1161 if (net == stcb->asoc.primary_destination) {
1178 * do the necessary asoc list work- if we get a failure indication,
1219 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) {
1237 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next);
1248 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next);
1312 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
1346 if (stcb->asoc.asconf_supported == 0) {
1354 if ((type == SCTP_DEL_IP_ADDRESS) && !stcb->asoc.asconf_del_pending) {
1362 stcb->asoc.asconf_del_pending = 1;
1363 stcb->asoc.asconf_addr_del_pending = ifa;
1379 if ((type == SCTP_ADD_IP_ADDRESS) && stcb->asoc.asconf_del_pending && (status == 0)) {
1382 stcb->asoc.asconf_addr_del_pending,
1387 stcb->asoc.asconf_del_pending = 0;
1388 sctp_free_ifa(stcb->asoc.asconf_addr_del_pending);
1389 stcb->asoc.asconf_addr_del_pending = NULL;
1403 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1404 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb,
1409 stcb->asoc.overall_error_count = 0;
1412 stcb->asoc.overall_error_count,
1445 if (stcb->asoc.asconf_supported == 0) {
1449 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) {
1462 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next);
1471 ifa = sctp_find_ifa_by_addr(sa, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED);
1530 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
1544 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) {
1641 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aparam, next);
1663 struct sctp_association *asoc;
1682 asoc = &stcb->asoc;
1695 * abort the asoc, since someone probably just hijacked us...
1697 if (serial_num == (asoc->asconf_seq_out + 1)) {
1701 SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n");
1708 if (serial_num != asoc->asconf_seq_out_acked + 1) {
1711 serial_num, asoc->asconf_seq_out_acked + 1);
1715 if (serial_num == asoc->asconf_seq_out - 1) {
1810 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) {
1832 asoc->asconf_seq_out_acked++;
1835 if (!TAILQ_EMPTY(&stcb->asoc.asconf_queue)) {
1864 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1938 * asoc lists
1952 if (stcb->asoc.scope.local_scope == 0) {
1960 if (stcb->asoc.scope.site_scope == 0 &&
1982 if (stcb->asoc.scope.ipv4_local_scope == 0 &&
1997 if (stcb->asoc.asconf_supported) {
2011 stcb, stcb->asoc.primary_destination);
2113 if (ifa->vrf_id != stcb->asoc.vrf_id) {
2142 if (stcb->asoc.scope.local_scope == 0) {
2173 if (stcb->asoc.scope.ipv4_local_scope == 0 &&
2203 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2216 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
2228 if (sctp_is_address_in_scope(ifa, &stcb->asoc.scope, 0) == 0) {
2235 stcb->asoc.asconf_supported == 1) {
2291 vrf_id = stcb->asoc.vrf_id;
2310 stcb->asoc.primary_destination);
2338 TAILQ_FOREACH_SAFE(chk, &stcb->asoc.asconf_send_queue, sctp_next, nchk) {
2428 vrf = sctp_find_vrf(stcb->asoc.vrf_id);
2435 if (stcb->asoc.scope.loopback_scope == 0 &&
2444 if (stcb->asoc.scope.ipv4_addr_legal) {
2459 if (stcb->asoc.scope.ipv4_local_scope == 0 &&
2478 if (stcb->asoc.scope.ipv6_addr_legal) {
2497 if (stcb->asoc.scope.local_scope == 0 &&
2500 if (stcb->asoc.scope.site_scope == 0 &&
2567 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) {
2583 overhead += sctp_get_auth_chunk_len(stcb->asoc.peer_hmac_id);
2584 if (stcb->asoc.smallest_mtu <= overhead) {
2619 acp->serial_number = htonl(stcb->asoc.asconf_seq_out);
2620 stcb->asoc.asconf_seq_out++;
2623 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) {
2629 if ((SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu - overhead) ||
2845 sctp_ifa = sctp_find_ifa_by_addr(&store.sa, stcb->asoc.vrf_id,
2854 stcb->asoc.asconf_supported) {
2866 stcb->asoc.primary_destination);
3068 vrf_id = stcb->asoc.vrf_id;
3323 vtag->local_vtag = htonl(stcb->asoc.my_vtag);
3324 vtag->remote_vtag = htonl(stcb->asoc.peer_vtag);
3363 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_vtag, next);
3364 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_add, next);
3365 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa_del, next);