Lines Matching defs:asoc
277 stcb->asoc.smallest_mtu = nxtsz;
280 if (sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.peer_auth_chunks)) {
281 overhead += sctp_get_auth_chunk_len(stcb->asoc.peer_hmac_id);
283 TAILQ_FOREACH(chk, &stcb->asoc.send_queue, sctp_next) {
288 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
300 sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt);
343 if (ntohl(sh->v_tag) != (stcb->asoc.peer_vtag)) {
388 if (stcb->asoc.smallest_mtu > nxtsz) {
421 if (ntohl(sh->v_tag) != (stcb->asoc.peer_vtag)) {
476 atomic_add_int(&stcb->asoc.refcnt, 1);
480 atomic_subtract_int(&stcb->asoc.refcnt, 1);
1173 struct sctp_association *asoc;
1183 asoc = &stcb->asoc;
1184 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
1199 if (SCTP_GET_STATE(asoc) !=
1221 if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) ||
1222 (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
1229 if (TAILQ_EMPTY(&asoc->send_queue) &&
1230 TAILQ_EMPTY(&asoc->sent_queue) &&
1231 (asoc->stream_queue_cnt == 0)) {
1233 if (asoc->locked_on_sending) {
1236 if ((SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT) &&
1237 (SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_ACK_SENT)) {
1241 if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
1242 (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
1245 SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
1246 SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
1248 if (stcb->asoc.alternate) {
1249 netp = stcb->asoc.alternate;
1251 netp = stcb->asoc.primary_destination;
1272 if (stcb->asoc.alternate) {
1273 netp = stcb->asoc.alternate;
1275 netp = stcb->asoc.primary_destination;
1278 asoc->state |= SCTP_STATE_SHUTDOWN_PENDING;
1281 if (asoc->locked_on_sending) {
1284 sp = TAILQ_LAST(&asoc->locked_on_sending->outqueue, sctp_streamhead);
1287 asoc->locked_on_sending->stream_no);
1290 asoc->state |= SCTP_STATE_PARTIAL_MSG_LEFT;
1293 if (TAILQ_EMPTY(&asoc->send_queue) &&
1294 TAILQ_EMPTY(&asoc->sent_queue) &&
1295 (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) {
1302 if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) ||
1303 (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
1411 struct sctp_association *asoc;
1431 asoc = &stcb->asoc;
1432 if (TAILQ_EMPTY(&asoc->send_queue) &&
1433 TAILQ_EMPTY(&asoc->sent_queue) &&
1434 (asoc->stream_queue_cnt == 0)) {
1435 if (asoc->locked_on_sending) {
1439 if (SCTP_GET_STATE(asoc) != SCTP_STATE_SHUTDOWN_SENT) {
1443 if ((SCTP_GET_STATE(asoc) == SCTP_STATE_OPEN) ||
1444 (SCTP_GET_STATE(asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) {
1447 SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_SENT);
1448 SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING);
1450 if (stcb->asoc.alternate) {
1451 netp = stcb->asoc.alternate;
1453 netp = stcb->asoc.primary_destination;
1468 if (stcb->asoc.alternate) {
1469 netp = stcb->asoc.alternate;
1471 netp = stcb->asoc.primary_destination;
1474 asoc->state |= SCTP_STATE_SHUTDOWN_PENDING;
1478 if (asoc->locked_on_sending) {
1481 sp = TAILQ_LAST(&asoc->locked_on_sending->outqueue, sctp_streamhead);
1484 asoc->locked_on_sending->stream_no);
1487 asoc->state |= SCTP_STATE_PARTIAL_MSG_LEFT;
1491 if (TAILQ_EMPTY(&asoc->send_queue) &&
1492 TAILQ_EMPTY(&asoc->sent_queue) &&
1493 (asoc->state & SCTP_STATE_PARTIAL_MSG_LEFT)) {
1587 loopback_scope = stcb->asoc.scope.loopback_scope;
1589 ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope;
1590 ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal;
1593 local_scope = stcb->asoc.scope.local_scope;
1594 site_scope = stcb->asoc.scope.site_scope;
1595 ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal;
1598 conn_addr_legal = stcb->asoc.scope.conn_addr_legal;
2121 SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT);
2153 stcb->asoc.delayed_connection = 1;
2154 sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, stcb->asoc.primary_destination);
2156 (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
2348 av->assoc_value = stcb->asoc.sctp_cmt_on_off;
2374 av->assoc_value = stcb->asoc.congestion_control_module;
2402 if (stcb->asoc.cc_functions.sctp_cwnd_socket_option == NULL) {
2405 error = (*stcb->asoc.cc_functions.sctp_cwnd_socket_option)(stcb, 0, cc_opt);
2419 av->assoc_value = stcb->asoc.stream_scheduling_module;
2445 if (stcb->asoc.ss_functions.sctp_ss_get_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id],
2539 av->assoc_value = stcb->asoc.context;
2577 id->assoc_value = stcb->asoc.vrf_id;
2611 gnv->gn_peers_tag = stcb->asoc.peer_vtag;
2612 gnv->gn_local_tag = stcb->asoc.my_vtag;
2628 sack->sack_delay = stcb->asoc.delayed_ack;
2629 sack->sack_freq = stcb->asoc.sack_freq;
2657 ss->ss_total_sndbuf = stcb->asoc.total_output_queue_size;
2658 ss->ss_total_recv_buf = (stcb->asoc.size_on_reasm_queue +
2659 stcb->asoc.size_on_all_streams);
2690 av->assoc_value = stcb->asoc.max_burst;
2719 av->assoc_value = sctp_get_frag_point(stcb, &stcb->asoc);
2839 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
2892 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
3082 paddrp->spp_pathmaxrxt = stcb->asoc.def_net_failure;
3083 paddrp->spp_pathmtu = sctp_get_frag_point(stcb, &stcb->asoc);
3084 if (stcb->asoc.default_dscp & 0x01) {
3085 paddrp->spp_dscp = stcb->asoc.default_dscp & 0xfc;
3089 if (stcb->asoc.default_flowlabel & 0x80000000) {
3090 paddrp->spp_ipv6_flowlabel = stcb->asoc.default_flowlabel & 0x000fffff;
3105 paddrp->spp_hbinterval = stcb->asoc.heart_beat_delay;
3231 sstat->sstat_state = stcb->asoc.state;
3233 sstat->sstat_rwnd = stcb->asoc.peers_rwnd;
3234 sstat->sstat_unackdata = stcb->asoc.sent_queue_cnt;
3239 sstat->sstat_penddata = (stcb->asoc.cnt_on_reasm_queue +
3240 stcb->asoc.cnt_on_all_streams);
3243 sstat->sstat_instrms = stcb->asoc.streamincnt;
3244 sstat->sstat_outstrms = stcb->asoc.streamoutcnt;
3245 sstat->sstat_fragmentation_point = sctp_get_frag_point(stcb, &stcb->asoc);
3248 &stcb->asoc.primary_destination->ro._l_addr,
3249 ((struct sockaddr *)(&stcb->asoc.primary_destination->ro._l_addr))->sa_len);
3251 if (stcb->asoc.primary_destination->ro._l_addr.sa.sa_family == AF_INET) {
3253 &stcb->asoc.primary_destination->ro._l_addr,
3257 &stcb->asoc.primary_destination->ro._l_addr,
3261 net = stcb->asoc.primary_destination;
3294 srto->srto_initial = stcb->asoc.initial_rto;
3295 srto->srto_max = stcb->asoc.maxrto;
3296 srto->srto_min = stcb->asoc.minrto;
3325 stimo->stimo_init= stcb->asoc.timoinit;
3326 stimo->stimo_data= stcb->asoc.timodata;
3327 stimo->stimo_sack= stcb->asoc.timosack;
3328 stimo->stimo_shutdown= stcb->asoc.timoshutdown;
3329 stimo->stimo_heartbeat= stcb->asoc.timoheartbeat;
3330 stimo->stimo_cookie= stcb->asoc.timocookie;
3331 stimo->stimo_shutdownack= stcb->asoc.timoshutdownack;
3348 sasoc->sasoc_cookie_life = TICKS_TO_MSEC(stcb->asoc.cookie_life);
3349 sasoc->sasoc_asocmaxrxt = stcb->asoc.max_send_times;
3350 sasoc->sasoc_number_peer_destinations = stcb->asoc.numnets;
3351 sasoc->sasoc_peer_rwnd = stcb->asoc.peers_rwnd;
3352 sasoc->sasoc_local_rwnd = stcb->asoc.my_rwnd;
3383 memcpy(s_info, &stcb->asoc.def_send, sizeof(stcb->asoc.def_send));
3430 if (len > stcb->asoc.primary_destination->ro._l_addr.sa.sa_len)
3431 len = stcb->asoc.primary_destination->ro._l_addr.sa.sa_len;
3433 if (stcb->asoc.primary_destination->ro._l_addr.sa.sa_family == AF_INET &&
3437 stcb->asoc.primary_destination->ro._l_addr.sa.sa_family == AF_INET6 &&
3443 &stcb->asoc.primary_destination->ro._l_addr,
3497 scact->scact_keynumber = stcb->asoc.authinfo.active_keyid;
3528 chklist = stcb->asoc.local_auth_chunks;
3578 chklist = stcb->asoc.peer_auth_chunks;
3738 info->snd_sid = stcb->asoc.def_send.sinfo_stream;
3739 info->snd_flags = stcb->asoc.def_send.sinfo_flags;
3741 info->snd_ppid = stcb->asoc.def_send.sinfo_ppid;
3742 info->snd_context = stcb->asoc.def_send.sinfo_context;
3773 info->pr_policy = PR_SCTP_POLICY(stcb->asoc.def_send.sinfo_flags);
3774 info->pr_value = stcb->asoc.def_send.sinfo_timetolive;
3872 thlds->spt_pathmaxrxt = stcb->asoc.def_net_failure;
3873 thlds->spt_pathpfthld = stcb->asoc.def_net_pf_threshold;
3973 encaps->sue_port = stcb->asoc.port;
4001 av->assoc_value = (uint32_t)stcb->asoc.local_strreset_support;
4199 stcb->asoc.sctp_cmt_on_off = av->assoc_value;
4215 stcb->asoc.sctp_cmt_on_off = av->assoc_value;
4242 stcb->asoc.cc_functions = sctp_cc_functions[av->assoc_value];
4243 stcb->asoc.congestion_control_module = av->assoc_value;
4244 if (stcb->asoc.cc_functions.sctp_set_initial_cc_param != NULL) {
4245 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
4246 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
4264 stcb->asoc.cc_functions = sctp_cc_functions[av->assoc_value];
4265 stcb->asoc.congestion_control_module = av->assoc_value;
4266 if (stcb->asoc.cc_functions.sctp_set_initial_cc_param != NULL) {
4267 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
4268 stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
4289 if (stcb->asoc.cc_functions.sctp_cwnd_socket_option) {
4290 (*stcb->asoc.cc_functions.sctp_cwnd_socket_option)(stcb, 1, cc_opt);
4299 if (stcb->asoc.cc_functions.sctp_cwnd_socket_option == NULL) {
4302 error = (*stcb->asoc.cc_functions.sctp_cwnd_socket_option)(stcb, 1,
4326 stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 1, 1);
4327 stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
4328 stcb->asoc.stream_scheduling_module = av->assoc_value;
4329 stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1);
4345 stcb->asoc.ss_functions.sctp_ss_clear(stcb, &stcb->asoc, 1, 1);
4346 stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value];
4347 stcb->asoc.stream_scheduling_module = av->assoc_value;
4348 stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1);
4363 if (stcb->asoc.ss_functions.sctp_ss_set_value(stcb, &stcb->asoc, &stcb->asoc.strmout[av->stream_id],
4374 stcb->asoc.ss_functions.sctp_ss_set_value(stcb,
4375 &stcb->asoc,
4376 &stcb->asoc.strmout[av->stream_id],
4402 stcb->asoc.context = av->assoc_value;
4418 stcb->asoc.context = av->assoc_value;
4579 stcb->asoc.delayed_ack = sack->sack_delay;
4582 stcb->asoc.sack_freq = sack->sack_freq;
4605 stcb->asoc.delayed_ack = sack->sack_delay;
4608 stcb->asoc.sack_freq = sack->sack_freq;
4654 shared_keys = &stcb->asoc.shared_keys;
4725 shared_keys = &stcb->asoc.shared_keys;
4940 stcb->asoc.local_strreset_support = (uint8_t)av->assoc_value;
4956 stcb->asoc.local_strreset_support = (uint8_t)av->assoc_value;
4978 if (stcb->asoc.peer_supports_strreset == 0) {
4987 if (stcb->asoc.stream_reset_outstanding) {
5007 (strrst->srs_stream_list[i] > stcb->asoc.streamincnt)) {
5013 (strrst->srs_stream_list[i] > stcb->asoc.streamoutcnt)) {
5045 if (stcb->asoc.peer_supports_strreset == 0) {
5054 if (stcb->asoc.stream_reset_outstanding) {
5069 if ((((int)add_o_strmcnt) + ((int)stcb->asoc.streamoutcnt)) > 0x0000ffff) {
5082 cnt += stcb->asoc.streamincnt;
5088 if (cnt > (int)stcb->asoc.max_inbound_streams) {
5111 if (stcb->asoc.peer_supports_strreset == 0) {
5120 if (stcb->asoc.stream_reset_outstanding) {
5181 if (stcb->asoc.delayed_connection == 1) {
5182 stcb->asoc.delayed_connection = 0;
5183 (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
5185 stcb->asoc.primary_destination,
5216 stcb->asoc.max_burst = av->assoc_value;
5232 stcb->asoc.max_burst = av->assoc_value;
5256 stcb->asoc.sctp_frag_point = (av->assoc_value + ovh);
5258 stcb->asoc.sctp_frag_point = SCTP_DEFAULT_MAXSEGMENT;
5416 if (TAILQ_EMPTY(&stcb->asoc.send_queue) &&
5417 TAILQ_EMPTY(&stcb->asoc.sent_queue) &&
5418 (stcb->asoc.stream_queue_cnt == 0)) {
5459 if (s_info->sinfo_stream < stcb->asoc.streamoutcnt) {
5460 memcpy(&stcb->asoc.def_send, s_info, min(optsize, sizeof(stcb->asoc.def_send)));
5480 if (s_info->sinfo_stream < stcb->asoc.streamoutcnt) {
5481 memcpy(&stcb->asoc.def_send, s_info, min(optsize, sizeof(stcb->asoc.def_send)));
5627 if (net->mtu < stcb->asoc.smallest_mtu) {
5679 stcb->asoc.def_net_failure = paddrp->spp_pathmaxrxt;
5680 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5711 stcb->asoc.heart_beat_delay = paddrp->spp_hbinterval;
5713 stcb->asoc.heart_beat_delay = 0;
5716 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5732 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5743 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5750 if (net->mtu < stcb->asoc.smallest_mtu) {
5757 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5766 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5770 stcb->asoc.default_dscp = paddrp->spp_dscp & 0xfc;
5771 stcb->asoc.default_dscp |= 0x01;
5775 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
5781 stcb->asoc.default_flowlabel = paddrp->spp_ipv6_flowlabel & 0x000fffff;
5782 stcb->asoc.default_flowlabel |= 0x80000000;
5856 new_init = stcb->asoc.initial_rto;
5860 new_max = stcb->asoc.maxrto;
5864 new_min = stcb->asoc.minrto;
5866 stcb->asoc.initial_rto = new_init;
5867 stcb->asoc.maxrto = new_max;
5868 stcb->asoc.minrto = new_min;
5923 stcb->asoc.max_send_times = sasoc->sasoc_asocmaxrxt;
5925 stcb->asoc.cookie_life = MSEC_TO_TICKS(sasoc->sasoc_cookie_life);
5992 if ((net != stcb->asoc.primary_destination) &&
5996 if ((stcb->asoc.alternate) &&
5999 sctp_free_remote_addr(stcb->asoc.alternate);
6000 stcb->asoc.alternate = NULL;
6073 stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED);
6290 if (TAILQ_EMPTY(&stcb->asoc.send_queue) &&
6291 TAILQ_EMPTY(&stcb->asoc.sent_queue) &&
6292 (stcb->asoc.stream_queue_cnt == 0)) {
6381 if (info->snd_sid < stcb->asoc.streamoutcnt) {
6382 stcb->asoc.def_send.sinfo_stream = info->snd_sid;
6383 policy = PR_SCTP_POLICY(stcb->asoc.def_send.sinfo_flags);
6384 stcb->asoc.def_send.sinfo_flags = info->snd_flags;
6385 stcb->asoc.def_send.sinfo_flags |= policy;
6386 stcb->asoc.def_send.sinfo_ppid = info->snd_ppid;
6387 stcb->asoc.def_send.sinfo_context = info->snd_context;
6412 if (info->snd_sid < stcb->asoc.streamoutcnt) {
6413 stcb->asoc.def_send.sinfo_stream = info->snd_sid;
6414 policy = PR_SCTP_POLICY(stcb->asoc.def_send.sinfo_flags);
6415 stcb->asoc.def_send.sinfo_flags = info->snd_flags;
6416 stcb->asoc.def_send.sinfo_flags |= policy;
6417 stcb->asoc.def_send.sinfo_ppid = info->snd_ppid;
6418 stcb->asoc.def_send.sinfo_context = info->snd_context;
6440 stcb->asoc.def_send.sinfo_flags &= 0xfff0;
6441 stcb->asoc.def_send.sinfo_flags |= info->pr_policy;
6442 stcb->asoc.def_send.sinfo_timetolive = info->pr_value;
6460 stcb->asoc.def_send.sinfo_flags &= 0xfff0;
6461 stcb->asoc.def_send.sinfo_flags |= info->pr_policy;
6462 stcb->asoc.def_send.sinfo_timetolive = info->pr_value;
6574 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
6603 stcb->asoc.def_net_failure = thlds->spt_pathmaxrxt;
6604 stcb->asoc.def_net_pf_threshold = thlds->spt_pathpfthld;
6697 stcb->asoc.port = encaps->sue_port;
6982 SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT);
6983 (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
7147 SCTP_SET_STATE(&stcb->asoc, SCTP_STATE_COOKIE_WAIT);
7148 (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered);
7419 store = stcb->asoc.primary_destination->ro._l_addr;
7420 stcb->asoc.state &= ~SCTP_STATE_IN_ACCEPT_QUEUE;
7566 if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
7633 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
7758 TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {