MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sctp_abort_notification

Function sctp_abort_notification

freebsd/netinet/sctputil.c:4325–4352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4323}
4324
4325void
4326sctp_abort_notification(struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error,
4327 struct sctp_abort_chunk *abort, int so_locked)
4328{
4329 if (stcb == NULL) {
4330 return;
4331 }
4332 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) ||
4333 ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) &&
4334 (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED))) {
4335 stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_WAS_ABORTED;
4336 }
4337 if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) ||
4338 (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) ||
4339 (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) {
4340 return;
4341 }
4342 SCTP_TCB_SEND_LOCK(stcb);
4343 SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED);
4344 /* Tell them we lost the asoc */
4345 sctp_report_all_outbound(stcb, error, so_locked);
4346 SCTP_TCB_SEND_UNLOCK(stcb);
4347 if (from_peer) {
4348 sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked);
4349 } else {
4350 sctp_ulp_notify(SCTP_NOTIFY_ASSOC_LOC_ABORTED, stcb, error, abort, so_locked);
4351 }
4352}
4353
4354void
4355sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,

Callers 6

sctp_handle_abortFunction · 0.85
sctp_handle_errorFunction · 0.85
sctp_abort_associationFunction · 0.85
sctp_notifyFunction · 0.85
sctp6_notifyFunction · 0.85

Calls 2

sctp_report_all_outboundFunction · 0.85
sctp_ulp_notifyFunction · 0.85

Tested by

no test coverage detected