Home | History | Annotate | Download | only in netinet

Lines Matching defs:stcb

431 void sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
453 if (stcb == NULL) {
464 (0x000000ff & stcb->asoc.sent_queue_retran_cnt);
472 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
480 if (resend_cnt != stcb->asoc.sent_queue_retran_cnt) {
488 resend_cnt, stcb->asoc.sent_queue_retran_cnt);
490 stcb->asoc.sent_queue_retran_cnt = resend_cnt;
493 (0x000000ff & stcb->asoc.sent_queue_retran_cnt);
499 if (tot_out != stcb->asoc.total_flight) {
508 (int)stcb->asoc.total_flight);
509 stcb->asoc.total_flight = tot_out;
511 if (tot_book_cnt != stcb->asoc.total_flight_count) {
521 stcb->asoc.total_flight_count = tot_book_cnt;
524 TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) {
527 if (tot_out != stcb->asoc.total_flight) {
536 stcb->asoc.total_flight, tot_out);
538 TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) {
540 TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
828 struct sctp_tcb *stcb;
836 stcb = (struct sctp_tcb *)tmr->tcb;
842 sctp_auditing(3, inp, stcb, net);
856 if (stcb) {
857 if (stcb->asoc.state == 0) {
874 if (stcb) {
875 SCTP_TCB_LOCK(stcb);
891 stcb->asoc.num_send_timers_up--;
892 if (stcb->asoc.num_send_timers_up < 0) {
893 stcb->asoc.num_send_timers_up = 0;
895 if (sctp_t3rxt_timer(inp, stcb, net)) {
901 sctp_auditing(4, inp, stcb, net);
903 sctp_chunk_output(inp, stcb, 1);
904 if ((stcb->asoc.num_send_timers_up == 0) &&
905 (stcb->asoc.sent_queue_cnt > 0)
915 chk = TAILQ_FIRST(&stcb->asoc.sent_queue);
916 sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb,
921 if (sctp_t1init_timer(inp, stcb, net)) {
930 sctp_send_sack(stcb);
932 sctp_auditing(4, inp, stcb, net);
934 sctp_chunk_output(inp, stcb, 4);
937 if (sctp_shutdown_timer(inp, stcb, net) ) {
942 sctp_auditing(4, inp, stcb, net);
944 sctp_chunk_output(inp, stcb, 5);
947 if (sctp_heartbeat_timer(inp, stcb, net)) {
952 sctp_auditing(4, inp, stcb, net);
954 sctp_chunk_output(inp, stcb, 6);
957 if (sctp_cookie_timer(inp, stcb, net)) {
962 sctp_auditing(4, inp, stcb, net);
964 sctp_chunk_output(inp, stcb, 1);
986 sctp_timer_start(SCTP_TIMER_TYPE_NEWCOOKIE, inp, stcb, net);
991 sctp_pathmtu_timer(inp, stcb, net);
995 if (sctp_shutdownack_timer(inp, stcb, net)) {
1000 sctp_auditing(4, inp, stcb, net);
1002 sctp_chunk_output(inp, stcb, 7);
1005 sctp_abort_an_association(inp, stcb,
1012 if (sctp_strreset_timer(inp, stcb, net)) {
1016 sctp_chunk_output(inp, stcb, 9);
1020 if (sctp_asconf_timer(inp, stcb, net)) {
1025 sctp_auditing(4, inp, stcb, net);
1027 sctp_chunk_output(inp, stcb, 8);
1031 sctp_autoclose_timer(inp, stcb, net);
1032 sctp_chunk_output(inp, stcb, 10);
1057 sctp_auditing(5, inp, stcb, net);
1067 sctp_fix_ecn_echo(&stcb->asoc);
1069 if (stcb) {
1070 SCTP_TCB_UNLOCK(stcb);
1083 sctp_timer_start(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
1108 if ((stcb == NULL) || (net == NULL)) {
1113 rto_val = stcb->asoc.initial_rto;
1125 if ((stcb == NULL) || (net == NULL)) {
1130 to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto);
1140 if (stcb == NULL) {
1143 tmr = &stcb->asoc.dack_timer;
1148 if ((stcb == NULL) || (net == NULL)) {
1153 to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto);
1165 if (stcb == NULL) {
1174 TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) {
1182 cnt_of_unconf, stcb->asoc.heart_beat_delay);
1185 if (stcb->asoc.hb_random_idx > 3) {
1187 memcpy(stcb->asoc.hb_random_values, &rndval,
1188 sizeof(stcb->asoc.hb_random_values));
1189 this_random = stcb->asoc.hb_random_values[0];
1190 stcb->asoc.hb_random_idx = 0;
1191 stcb->asoc.hb_ect_randombit = 0;
1193 this_random = stcb->asoc.hb_random_values[stcb->asoc.hb_random_idx];
1194 stcb->asoc.hb_random_idx++;
1195 stcb->asoc.hb_ect_randombit = 0;
1201 if ((stcb->asoc.heart_beat_delay == 0) &&
1208 delay = stcb->asoc.heart_beat_delay;
1209 TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) {
1218 to_ticks = this_random + stcb->asoc.initial_rto + delay;
1225 to_ticks = this_random + stcb->asoc.initial_rto;
1227 to_ticks = stcb->asoc.heart_beat_delay + this_random + stcb->asoc.initial_rto;
1241 tmr = &stcb->asoc.hb_timer;
1250 if ((stcb == NULL) || (net == NULL)) {
1254 to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto);
1282 if (stcb == NULL) {
1293 if ((stcb == NULL) || (net == NULL)) {
1297 to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto);
1308 if (stcb == NULL) {
1312 tmr = &stcb->asoc.shut_guard_timer;
1319 if ((stcb == NULL) || (net == NULL)) {
1323 to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto);
1327 tmr = &stcb->asoc.strreset_timer;
1335 if ((stcb == NULL) || (net == NULL)) {
1339 to_ticks = MSEC_TO_TICKS(stcb->asoc.initial_rto);
1343 tmr = &stcb->asoc.asconf_timer;
1346 if (stcb == NULL) {
1349 if (stcb->asoc.sctp_autoclose_ticks == 0) {
1350 /* Really an error since stcb is NOT set to autoclose */
1353 to_ticks = stcb->asoc.sctp_autoclose_ticks;
1354 tmr = &stcb->asoc.autoclose_timer;
1384 stcb->asoc.num_send_timers_up++;
1388 tmr->tcb = (void *)stcb;
1395 sctp_timer_stop(int t_type, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
1413 if ((stcb == NULL) || (net == NULL)) {
1419 if ((stcb == NULL) || (net == NULL)) {
1425 if (stcb == NULL) {
1428 tmr = &stcb->asoc.dack_timer;
1431 if ((stcb == NULL) || (net == NULL)) {
1437 if (stcb == NULL) {
1440 tmr = &stcb->asoc.hb_timer;
1443 if ((stcb == NULL) || (net == NULL)) {
1465 if (stcb == NULL) {
1474 if ((stcb == NULL) || (net == NULL)) {
1480 if (stcb == NULL) {
1483 tmr = &stcb->asoc.shut_guard_timer;
1486 if (stcb == NULL) {
1489 tmr = &stcb->asoc.strreset_timer;
1492 if (stcb == NULL) {
1495 tmr = &stcb->asoc.asconf_timer;
1498 if (stcb == NULL) {
1501 tmr = &stcb->asoc.autoclose_timer;
1525 stcb->asoc.num_send_timers_up--;
1526 if (stcb->asoc.num_send_timers_up < 0) {
1527 stcb->asoc.num_send_timers_up = 0;
1637 sctp_calculate_rto(struct sctp_tcb *stcb,
1729 (stcb->asoc.sat_network_lockout == 0)) {
1730 stcb->asoc.sat_network = 1;
1731 } else if ((!first_measure) && stcb->asoc.sat_network) {
1732 stcb->asoc.sat_network = 0;
1733 stcb->asoc.sat_network_lockout = 1;
1736 if (new_rto < stcb->asoc.minrto) {
1737 new_rto = stcb->asoc.minrto;
1739 if (new_rto > stcb->asoc.maxrto) {
1740 new_rto = stcb->asoc.maxrto;
1863 sctp_notify_assoc_change(u_int32_t event, struct sctp_tcb *stcb,
1879 sctp_deliver_data(stcb, &stcb->asoc, NULL, 0);
1886 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
1887 (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) &&
1889 stcb->sctp_socket->so_error = ECONNRESET;
1891 sowwakeup(stcb->sctp_socket);
1892 sorwakeup(stcb->sctp_socket);
1896 (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) &&
1897 (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED)) {
1898 soisconnected(stcb->sctp_socket);
1901 if (!(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_RECVASSOCEVNT)) {
1918 sac->sac_outbound_streams = stcb->asoc.streamoutcnt;
1919 sac->sac_inbound_streams = stcb->asoc.streamincnt;
1920 sac->sac_assoc_id = sctp_get_associd(stcb);
1929 to = rtcache_getdst(&stcb->asoc.primary_destination->ro);
1930 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_NEEDS_MAPPED_V4) &&
1943 * if (sctp_sbspace(&stcb->sctp_socket->so_rcv) < m_notify->m_len) {
1948 SCTP_TCB_UNLOCK(stcb);
1949 SCTP_INP_WLOCK(stcb->sctp_ep);
1950 SCTP_TCB_LOCK(stcb);
1951 if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv,
1952 to, m_notify, NULL, stcb->asoc.my_vtag, stcb->sctp_ep)) {
1955 SCTP_INP_WUNLOCK(stcb->sctp_ep);
1958 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) &&
1959 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
1960 if (sctp_add_to_socket_q(stcb->sctp_ep, stcb)) {
1961 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
1964 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
1966 SCTP_INP_WUNLOCK(stcb->sctp_ep);
1968 sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
1969 sctp_sowwakeup(stcb->sctp_ep, stcb->sctp_socket);
1973 sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state,
1981 if (!(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_RECVPADDREVNT))
2007 spc->spc_assoc_id = sctp_get_associd(stcb);
2015 to = rtcache_getdst(&stcb->asoc.primary_destination->ro);
2016 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_NEEDS_MAPPED_V4) &&
2028 if (sctp_sbspace(&stcb->sctp_socket->so_rcv) < m_notify->m_len) {
2033 SCTP_TCB_UNLOCK(stcb);
2034 SCTP_INP_WLOCK(stcb->sctp_ep);
2035 SCTP_TCB_LOCK(stcb);
2036 if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv, to,
2037 m_notify, NULL, stcb->asoc.my_vtag, stcb->sctp_ep)) {
2040 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2043 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) &&
2044 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
2045 if (sctp_add_to_socket_q(stcb->sctp_ep, stcb)) {
2046 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2049 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2051 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2052 sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
2057 sctp_notify_send_failed(struct sctp_tcb *stcb, u_int32_t error,
2066 if (!(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_RECVSENDFAILEVNT))
2090 ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb);
2091 ssf->ssf_assoc_id = sctp_get_associd(stcb);
2109 to = rtcache_getdst(&stcb->asoc.primary_destination->ro);
2110 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_NEEDS_MAPPED_V4) &&
2122 if (sctp_sbspace(&stcb->sctp_socket->so_rcv) < m_notify->m_len) {
2128 SCTP_TCB_UNLOCK(stcb);
2129 SCTP_INP_WLOCK(stcb->sctp_ep);
2130 SCTP_TCB_LOCK(stcb);
2131 if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv, to,
2132 m_notify, NULL, stcb->asoc.my_vtag, stcb->sctp_ep)) {
2135 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2138 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) &&
2139 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
2140 if (sctp_add_to_socket_q(stcb->sctp_ep, stcb)) {
2141 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2144 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2146 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2147 sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
2151 sctp_notify_adaption_layer(struct sctp_tcb *stcb,
2159 if (!(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_ADAPTIONEVNT))
2173 sai->sai_assoc_id = sctp_get_associd(stcb);
2181 to = rtcache_getdst(&stcb->asoc.primary_destination->ro);
2182 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_NEEDS_MAPPED_V4) &&
2193 if (sctp_sbspace(&stcb->sctp_socket->so_rcv) < m_notify->m_len) {
2198 SCTP_TCB_UNLOCK(stcb);
2199 SCTP_INP_WLOCK(stcb->sctp_ep);
2200 SCTP_TCB_LOCK(stcb);
2201 if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv, to,
2202 m_notify, NULL, stcb->asoc.my_vtag, stcb->sctp_ep)) {
2205 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2208 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) &&
2209 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
2210 if (sctp_add_to_socket_q(stcb->sctp_ep, stcb)) {
2211 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2214 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2216 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2217 sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
2221 sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb,
2229 if (!(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_PDAPIEVNT))
2243 pdapi->pdapi_assoc_id = sctp_get_associd(stcb);
2251 to = rtcache_getdst(&stcb->asoc.primary_destination->ro);
2252 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_NEEDS_MAPPED_V4) &&
2263 if (sctp_sbspace(&stcb->sctp_socket->so_rcv) < m_notify->m_len) {
2268 SCTP_TCB_UNLOCK(stcb);
2269 SCTP_INP_WLOCK(stcb->sctp_ep);
2270 SCTP_TCB_LOCK(stcb);
2271 if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv, to,
2272 m_notify, NULL, stcb->asoc.my_vtag, stcb->sctp_ep)) {
2275 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2278 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) &&
2279 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
2280 if (sctp_add_to_socket_q(stcb->sctp_ep, stcb)) {
2281 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2284 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2286 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2287 sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
2291 sctp_notify_shutdown_event(struct sctp_tcb *stcb)
2302 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
2303 (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
2305 socantrcvmore(stcb->sctp_socket);
2306 socantsendmore(stcb->sctp_socket);
2309 if (!(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_RECVSHUTDOWNEVNT))
2322 sse->sse_assoc_id = sctp_get_associd(stcb);
2330 to = rtcache_getdst(&stcb->asoc.primary_destination->ro);
2331 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_NEEDS_MAPPED_V4) &&
2342 if (sctp_sbspace(&stcb->sctp_socket->so_rcv) < m_notify->m_len) {
2347 SCTP_TCB_UNLOCK(stcb);
2348 SCTP_INP_WLOCK(stcb->sctp_ep);
2349 SCTP_TCB_LOCK(stcb);
2350 if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv, to,
2351 m_notify, NULL, stcb->asoc.my_vtag, stcb->sctp_ep)) {
2354 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2357 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) &&
2358 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
2359 if (sctp_add_to_socket_q(stcb->sctp_ep, stcb)) {
2360 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2363 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2365 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2366 sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
2370 sctp_notify_stream_reset(struct sctp_tcb *stcb,
2379 if (!(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_STREAM_RESETEVNT))
2409 strreset->strreset_assoc_id = sctp_get_associd(stcb);
2421 if (sctp_sbspace(&stcb->sctp_socket->so_rcv) < m_notify->m_len) {
2426 to = rtcache_getdst(&stcb->asoc.primary_destination->ro);
2427 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_NEEDS_MAPPED_V4) &&
2439 SCTP_TCB_UNLOCK(stcb);
2440 SCTP_INP_WLOCK(stcb->sctp_ep);
2441 SCTP_TCB_LOCK(stcb);
2442 if (!sbappendaddr_nocheck(&stcb->sctp_socket->so_rcv, to,
2443 m_notify, NULL, stcb->asoc.my_vtag, stcb->sctp_ep)) {
2446 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2449 if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) &&
2450 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED) == 0)){
2451 if (sctp_add_to_socket_q(stcb->sctp_ep, stcb)) {
2452 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2455 stcb->asoc.my_rwnd_control_len += sizeof(struct mbuf);
2457 SCTP_INP_WUNLOCK(stcb->sctp_ep);
2458 sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
2463 sctp_ulp_notify(u_int32_t notification, struct sctp_tcb *stcb,
2466 if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
2470 if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) {
2476 sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error);
2479 sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error);
2485 sctp_notify_peer_addr_change(stcb, SCTP_ADDR_UNREACHABLE,
2493 sctp_notify_peer_addr_change(stcb, SCTP_ADDR_AVAILABLE,
2501 sctp_notify_peer_addr_change(stcb, SCTP_ADDR_CONFIRMED,
2506 sctp_notify_send_failed(stcb, error,
2511 sctp_notify_adaption_layer(stcb, error);
2514 sctp_notify_partial_delivery_indication(stcb, error);
2519 sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error);
2526 sctp_notify_assoc_change(SCTP_RESTART, stcb, error);
2531 sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), SCTP_STRRESET_OUTBOUND_STR);
2534 sctp_notify_stream_reset(stcb, error, ((uint16_t *)data), SCTP_STRRESET_INBOUND_STR);
2537 sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data,
2541 sctp_notify_peer_addr_change(stcb, SCTP_ADDR_REMOVED, data,
2545 sctp_notify_peer_addr_change(stcb, SCTP_ADDR_MADE_PRIM, data,
2553 sctp_notify_shutdown_event(stcb);
2567 sctp_report_all_outbound(struct sctp_tcb *stcb)
2573 asoc = &stcb->asoc;
2575 if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
2583 stcb->asoc.stream_queue_cnt--;
2585 sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb,
2608 sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, chk);
2628 sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb,
2647 sctp_abort_notification(struct sctp_tcb *stcb, int error)
2650 if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) {
2654 sctp_report_all_outbound(stcb);
2655 sctp_ulp_notify(SCTP_NOTIFY_ASSOC_ABORTED, stcb, error, NULL);
2659 sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
2665 if (stcb != NULL) {
2667 vtag = stcb->asoc.peer_vtag;
2668 sctp_abort_notification(stcb, 0);
2671 if (stcb != NULL) {
2673 sctp_free_assoc(inp, stcb);
2684 sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
2688 if (stcb == NULL) {
2699 sctp_abort_notification(stcb, error);
2701 sctp_send_abort_tcb(stcb, op_err);
2703 sctp_free_assoc(inp, stcb);
3258 struct socket *new, struct sctp_tcb *stcb)
3265 asoc = &stcb->asoc;
3334 sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_association *asoc,
3359 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
3360 (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
3361 if (stcb->sctp_socket->so_snd.sb_cc >= tp1->book_size) {
3362 stcb->sctp_socket->so_snd.sb_cc -= tp1->book_size;
3364 stcb->sctp_socket->so_snd.sb_cc = 0;
3367 if (stcb->sctp_socket->so_snd.sb_mbcnt >= tp1->mbcnt) {
3368 stcb->sctp_socket->so_snd.sb_mbcnt -= tp1->mbcnt;
3370 stcb->sctp_socket->so_snd.sb_mbcnt = 0;
3376 sctp_release_pr_sctp_chunk(struct sctp_tcb *stcb, struct sctp_tmit_chunk *tp1,
3387 sctp_free_bufspace(stcb, &stcb->asoc, tp1);
3388 sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, reason, tp1);
3391 sctp_sowwakeup(stcb->sctp_ep, stcb->sctp_socket);
3394 stcb->asoc.sent_queue_cnt_removeable--;
3396 if (queue == &stcb->asoc.send_queue) {
3397 TAILQ_REMOVE(&stcb->asoc.send_queue, tp1, sctp_next);
3399 TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, tp1,
3401 stcb->asoc.sent_queue_cnt++;
3418 if ((foundeom == 0) && (queue == &stcb->asoc.sent_queue)) {
3423 tp1 = TAILQ_FIRST(&stcb->asoc.send_queue);
3429 ret_sz += sctp_release_pr_sctp_chunk(stcb, tp1, reason,
3430 &stcb->asoc.send_queue);