static void handle_notification(struct peer_connection *pc, union sctp_notification *notif, size_t n) { if (notif->sn_header.sn_length != (uint32_t)n) { return; } switch (notif->sn_header.sn_type) { case SCTP_ASSOC_CHANGE: handle_association_change_event(&(notif->sn_assoc_change)); break; case SCTP_PEER_ADDR_CHANGE: handle_peer_address_change_event(&(notif->sn_paddr_change)); break; case SCTP_REMOTE_ERROR: handle_remote_error_event(&(notif->sn_remote_error)); break; case SCTP_SHUTDOWN_EVENT: handle_shutdown_event(&(notif->sn_shutdown_event)); break; case SCTP_ADAPTATION_INDICATION: handle_adaptation_indication(&(notif->sn_adaptation_event)); break; case SCTP_PARTIAL_DELIVERY_EVENT: break; case SCTP_AUTHENTICATION_EVENT: break; case SCTP_SENDER_DRY_EVENT: break; case SCTP_NOTIFICATIONS_STOPPED_EVENT: break; case SCTP_SEND_FAILED_EVENT: handle_send_failed_event(&(notif->sn_send_failed_event)); break; case SCTP_STREAM_RESET_EVENT: handle_stream_reset_event(pc, &(notif->sn_strreset_event)); send_deferred_messages(pc); send_outgoing_stream_reset(pc); request_more_o_streams(pc); break; case SCTP_ASSOC_RESET_EVENT: break; case SCTP_STREAM_CHANGE_EVENT: handle_stream_change_event(pc, &(notif->sn_strchange_event)); send_deferred_messages(pc); send_outgoing_stream_reset(pc); request_more_o_streams(pc); break; default: break; } }
static void handle_notification(union sctp_notification *notif, size_t n) { if (notif->sn_header.sn_length != (uint32_t)n) { return; } switch (notif->sn_header.sn_type) { case SCTP_ASSOC_CHANGE: handle_association_change_event(&(notif->sn_assoc_change)); break; case SCTP_PEER_ADDR_CHANGE: handle_peer_address_change_event(&(notif->sn_paddr_change)); break; case SCTP_REMOTE_ERROR: break; case SCTP_SHUTDOWN_EVENT: break; case SCTP_ADAPTATION_INDICATION: break; case SCTP_PARTIAL_DELIVERY_EVENT: break; case SCTP_AUTHENTICATION_EVENT: break; case SCTP_SENDER_DRY_EVENT: break; case SCTP_NOTIFICATIONS_STOPPED_EVENT: break; case SCTP_SEND_FAILED_EVENT: handle_send_failed_event(&(notif->sn_send_failed_event)); break; case SCTP_STREAM_RESET_EVENT: break; case SCTP_ASSOC_RESET_EVENT: break; case SCTP_STREAM_CHANGE_EVENT: break; default: break; } }