Use the flags defined in RFC 6525 in the stream reset event.

This commit is contained in:
Michael Tuexen 2012-04-23 20:45:31 +00:00
parent 06c65b6b41
commit d77145777a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234614
2 changed files with 9 additions and 7 deletions

View File

@ -449,9 +449,11 @@ struct sctp_stream_reset_event {
};
/* flags in stream_reset_event (strreset_flags) */
#define SCTP_STREAM_RESET_DENIED 0x0004 /* SCTP_STRRESET_FAILED */
#define SCTP_STREAM_RESET_FAILED 0x0008 /* SCTP_STRRESET_FAILED */
#define SCTP_STREAM_CHANGED_DENIED 0x0010
#define SCTP_STREAM_RESET_INCOMING_SSN 0x0001
#define SCTP_STREAM_RESET_OUTGOING_SSN 0x0002
#define SCTP_STREAM_RESET_DENIED 0x0004
#define SCTP_STREAM_RESET_FAILED 0x0008
#define SCTP_STREAM_CHANGED_DENIED 0x0010
/*
* Assoc reset event - subscribe to SCTP_ASSOC_RESET_EVENT

View File

@ -3498,18 +3498,18 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
case SCTP_NOTIFY_HB_RESP:
break;
case SCTP_NOTIFY_STR_RESET_SEND:
sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING);
sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING_SSN);
break;
case SCTP_NOTIFY_STR_RESET_RECV:
sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_OUTGOING);
sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), SCTP_STREAM_RESET_INCOMING);
break;
case SCTP_NOTIFY_STR_RESET_FAILED_OUT:
sctp_notify_stream_reset(stcb, error, ((uint16_t *) data),
(SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING));
(SCTP_STREAM_RESET_OUTGOING_SSN | SCTP_STREAM_RESET_FAILED));
break;
case SCTP_NOTIFY_STR_RESET_FAILED_IN:
sctp_notify_stream_reset(stcb, error, ((uint16_t *) data),
(SCTP_STREAM_RESET_OUTGOING | SCTP_STREAM_RESET_INCOMING));
(SCTP_STREAM_RESET_INCOMING | SCTP_STREAM_RESET_FAILED));
break;
case SCTP_NOTIFY_ASCONF_ADD_IP:
sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data,