if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
stcb->sctp_socket->so_snd.sb_cc = 0;
SCTP_UNIFY_SB_CC(stcb->sctp_socket->so_snd);
}
sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
* with SCTP sockets.
*/
#define sb_cc sb_acc
/* Macro to unify sendbuffer counters sb_acc and sb_ccc.
* Both counters are required to be set to receive correct events via
* poll()/kevent() when send buffer is full on 1-to-1 style sockets.
#define SCTP_UNIFY_SB_CC(sb) (atomic_store_int(&(sb).sb_ccc, (sb).sb_acc))
/* reserve sb space for a socket */
#define SCTP_SORESERVE(so, send, recv) soreserve(so, send, recv)
/* wakeup a socket */
((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) {
atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc, sp->length);
if (sp->data) {
sctp_m_freem(sp->data);
SCTP_CALLED_AFTER_CMPSET_OFCLOSE);
SOCK_LOCK(so);
SCTP_SB_CLEAR(so->so_snd);
SCTP_UNIFY_SB_CC(so->so_snd);
/*
* same for the rcv ones, they are only here for the
* accounting/select.
* except maybe the count
so->so_snd.sb_cc = 0;
so->so_snd.sb_mbcnt = 0;
so->so_snd.sb_mb = NULL;
} else {
} else { \
stcb->sctp_socket->so_snd.sb_cc = 0; \
} \
SCTP_UNIFY_SB_CC(stcb->sctp_socket->so_snd); \
} while (0)
((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || \
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) { \
atomic_add_int(&stcb->sctp_socket->so_snd.sb_cc,sz); \
-