Lines Matching defs:asoc
61 * An ASCONF parameter queue exists per asoc which holds the pending address
288 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
420 * note if result == -2, the address doesn't exist in the asoc but
425 /* only one address in the asoc */
532 if ((stcb->asoc.primary_destination->dest_state & SCTP_ADDR_REACHABLE) &&
533 (!(stcb->asoc.primary_destination->dest_state & SCTP_ADDR_PF)) &&
534 (stcb->asoc.alternate)) {
535 sctp_free_remote_addr(stcb->asoc.alternate);
536 stcb->asoc.alternate = NULL;
560 (stcb->asoc.primary_destination->dest_state &
567 stcb->asoc.primary_destination);
572 stcb->asoc.deleted_primary);
575 stcb->asoc.deleted_primary);
600 struct sctp_association *asoc;
620 asoc = &stcb->asoc;
623 if (SCTP_TSN_GE(asoc->asconf_seq_in, serial_num)) {
629 } else if (serial_num != (asoc->asconf_seq_in + 1)) {
631 serial_num, asoc->asconf_seq_in + 1);
636 asoc->asconf_seq_in = serial_num; /* update sequence */
647 TAILQ_FOREACH_SAFE(ack, &asoc->asconf_ack_sent, next, ack_next) {
652 TAILQ_REMOVE(&asoc->asconf_ack_sent, ack, next);
734 asoc->peer_supports_asconf = 1;
740 asoc->peer_supports_asconf = 1;
748 asoc->peer_supports_asconf = 1;
821 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_ack_sent, ack, next);
824 if (stcb->asoc.last_control_chunk_from == NULL) {
833 stcb->asoc.last_control_chunk_from = sctp_findnet(stcb, src);
835 if (stcb->asoc.last_control_chunk_from == NULL) {
940 stcb->asoc.peer_supports_asconf = 0;
946 stcb->asoc.asconf_seq_out_acked = stcb->asoc.asconf_seq_out;
970 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1002 if (stcb->asoc.deleted_primary == NULL) {
1006 if (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) {
1008 SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.deleted_primary->ro._l_addr.sa);
1010 SCTPDBG_ADDR(SCTP_DEBUG_ASCONF1, &stcb->asoc.primary_destination->ro._l_addr.sa);
1012 stcb->asoc.deleted_primary,
1014 stcb->asoc.num_send_timers_up--;
1015 if (stcb->asoc.num_send_timers_up < 0) {
1016 stcb->asoc.num_send_timers_up = 0;
1020 stcb->asoc.deleted_primary);
1027 sctp_auditing(4, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary);
1030 if ((stcb->asoc.num_send_timers_up == 0) &&
1031 (stcb->asoc.sent_queue_cnt > 0)) {
1034 asoc.sent_queue);
1054 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
1056 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
1060 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
1064 stcb->asoc.marked_retrans++;
1089 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1111 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1164 if (net == stcb->asoc.primary_destination) {
1182 * do the necessary asoc list work- if we get a failure indication,
1225 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) {
1242 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next);
1253 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next);
1317 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
1351 if (stcb->asoc.peer_supports_asconf == 0) {
1359 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;
1377 if ((type == SCTP_ADD_IP_ADDRESS) && stcb->asoc.asconf_del_pending && (status == 0)) {
1380 stcb->asoc.asconf_addr_del_pending,
1385 stcb->asoc.asconf_del_pending = 0;
1386 sctp_free_ifa(stcb->asoc.asconf_addr_del_pending);
1387 stcb->asoc.asconf_addr_del_pending = NULL;
1400 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1401 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb,
1406 stcb->asoc.overall_error_count = 0;
1409 stcb->asoc.overall_error_count,
1443 if (stcb->asoc.peer_supports_asconf == 0) {
1447 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) {
1460 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aa, next);
1470 vrf_id = stcb->asoc.vrf_id;
1533 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
1547 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) {
1601 stcb->asoc.peer_supports_asconf = 0;
1604 stcb->asoc.peer_supports_asconf = 0;
1641 stcb->asoc.peer_supports_asconf = 0;
1649 TAILQ_REMOVE(&stcb->asoc.asconf_queue, aparam, next);
1662 stcb->asoc.peer_supports_asconf = 0;
1671 struct sctp_association *asoc;
1690 asoc = &stcb->asoc;
1703 * abort the asoc, since someone probably just hijacked us...
1705 if (serial_num == (asoc->asconf_seq_out + 1)) {
1706 SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf_ack: got unexpected next serial number! Aborting asoc!\n");
1711 if (serial_num != asoc->asconf_seq_out_acked + 1) {
1714 serial_num, asoc->asconf_seq_out_acked + 1);
1718 if (serial_num == asoc->asconf_seq_out - 1) {
1813 TAILQ_FOREACH_SAFE(aa, &stcb->asoc.asconf_queue, next, aa_next) {
1835 asoc->asconf_seq_out_acked++;
1838 if (!TAILQ_EMPTY(&stcb->asoc.asconf_queue)) {
1867 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
1933 * asoc lists
1947 if (stcb->asoc.scope.local_scope == 0) {
1955 if (stcb->asoc.scope.site_scope == 0 &&
1979 if (stcb->asoc.scope.ipv4_local_scope == 0 &&
1994 if (stcb->asoc.peer_supports_asconf) {
2004 SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) {
2007 stcb, stcb->asoc.primary_destination);
2113 if (ifa->vrf_id != stcb->asoc.vrf_id) {
2138 if (stcb->asoc.scope.local_scope == 0) {
2167 if (stcb->asoc.scope.ipv4_local_scope == 0 &&
2197 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2216 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
2229 if (sctp_is_address_in_scope(ifa, &stcb->asoc.scope, 0) == 0) {
2236 stcb->asoc.peer_supports_asconf) {
2244 if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) {
2291 vrf_id = stcb->asoc.vrf_id;
2305 if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) {
2309 stcb->asoc.primary_destination);
2341 if (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) {
2345 stcb->asoc.primary_destination);
2369 TAILQ_FOREACH_SAFE(chk, &stcb->asoc.asconf_send_queue, sctp_next, nchk) {
2456 vrf = sctp_find_vrf(stcb->asoc.vrf_id);
2463 if (stcb->asoc.scope.loopback_scope == 0 &&
2472 if (stcb->asoc.scope.ipv4_addr_legal) {
2480 if (stcb->asoc.scope.ipv4_local_scope == 0 &&
2496 if (stcb->asoc.scope.ipv6_addr_legal) {
2508 if (stcb->asoc.scope.local_scope == 0 &&
2511 if (stcb->asoc.scope.site_scope == 0 &&
2575 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) {
2613 acp->serial_number = htonl(stcb->asoc.asconf_seq_out);
2614 stcb->asoc.asconf_seq_out++;
2617 TAILQ_FOREACH(aa, &stcb->asoc.asconf_queue, next) {
2623 if ((SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) ||
2857 vrf_id = stcb->asoc.vrf_id;
2870 stcb->asoc.peer_supports_asconf) {
2878 SCTP_GET_STATE(&stcb->asoc) ==
2883 stcb->asoc.primary_destination);
3093 vrf_id = stcb->asoc.vrf_id;
3327 vtag->local_vtag = htonl(stcb->asoc.my_vtag);
3328 vtag->remote_vtag = htonl(stcb->asoc.peer_vtag);
3329 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
3350 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
3360 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
3383 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
3393 TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);