| 789 | |
| 790 | #ifdef USE_SCTP |
| 791 | int SIPpSocket::handleSCTPNotify(char* buffer) |
| 792 | { |
| 793 | union sctp_notification *notifMsg; |
| 794 | |
| 795 | notifMsg = (union sctp_notification *)buffer; |
| 796 | |
| 797 | TRACE_MSG("SCTP Notification: %d\n", |
| 798 | ntohs(notifMsg->sn_header.sn_type)); |
| 799 | if (notifMsg->sn_header.sn_type == SCTP_ASSOC_CHANGE) { |
| 800 | TRACE_MSG("SCTP_ASSOC_CHANGE\n"); |
| 801 | if (notifMsg->sn_assoc_change.sac_state == SCTP_COMM_UP) { |
| 802 | TRACE_MSG("SCTP_COMM_UP\n"); |
| 803 | sctpstate = SCTP_UP; |
| 804 | sipp_sctp_peer_params(); |
| 805 | |
| 806 | /* Send SCTP message right after association is up */ |
| 807 | ss_congested = false; |
| 808 | flush(); |
| 809 | return -2; |
| 810 | } else { |
| 811 | TRACE_MSG("else: %d\n", notifMsg->sn_assoc_change.sac_state); |
| 812 | return 0; |
| 813 | } |
| 814 | } else if (notifMsg->sn_header.sn_type == SCTP_SHUTDOWN_EVENT) { |
| 815 | TRACE_MSG("SCTP_SHUTDOWN_EVENT\n"); |
| 816 | return 0; |
| 817 | } |
| 818 | return -2; |
| 819 | } |
| 820 | |
| 821 | void set_multihome_addr(SIPpSocket* socket, int port) |
| 822 | { |
nothing calls this directly
no test coverage detected