summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2010-01-17 19:35:38 +0000
committerrrs <rrs@FreeBSD.org>2010-01-17 19:35:38 +0000
commitc85a2af4daaf9fc40a7c88a67b1024abc83ed656 (patch)
tree68e0ca9404fa1ac27fe96b0936b3706b01268932 /sys
parenta112824734c05b15491a831e6ba235af6f585f84 (diff)
downloadFreeBSD-src-c85a2af4daaf9fc40a7c88a67b1024abc83ed656.zip
FreeBSD-src-c85a2af4daaf9fc40a7c88a67b1024abc83ed656.tar.gz
This change syncs up the socketAPI stream-reset
values to match those in linux and the I-D just released to the IETF.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/sctp_uio.h29
-rw-r--r--sys/netinet/sctp_usrreq.c4
2 files changed, 18 insertions, 15 deletions
diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h
index 3b34941..37b581f 100644
--- a/sys/netinet/sctp_uio.h
+++ b/sys/netinet/sctp_uio.h
@@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$");
typedef uint32_t sctp_assoc_t;
+/* Compatibility to previous define's */
+#define sctp_stream_reset_events sctp_stream_reset_event
+
/* On/Off setup for subscription to events */
struct sctp_event_subscribe {
uint8_t sctp_data_io_event;
@@ -57,7 +60,7 @@ struct sctp_event_subscribe {
uint8_t sctp_adaptation_layer_event;
uint8_t sctp_authentication_event;
uint8_t sctp_sender_dry_event;
- uint8_t sctp_stream_reset_events;
+ uint8_t sctp_stream_reset_event;
};
/* ancillary data types */
@@ -402,19 +405,19 @@ union sctp_notification {
};
/* notification types */
-#define SCTP_ASSOC_CHANGE 0x0001
-#define SCTP_PEER_ADDR_CHANGE 0x0002
-#define SCTP_REMOTE_ERROR 0x0003
-#define SCTP_SEND_FAILED 0x0004
-#define SCTP_SHUTDOWN_EVENT 0x0005
-#define SCTP_ADAPTATION_INDICATION 0x0006
+#define SCTP_ASSOC_CHANGE 0x0001
+#define SCTP_PEER_ADDR_CHANGE 0x0002
+#define SCTP_REMOTE_ERROR 0x0003
+#define SCTP_SEND_FAILED 0x0004
+#define SCTP_SHUTDOWN_EVENT 0x0005
+#define SCTP_ADAPTATION_INDICATION 0x0006
/* same as above */
-#define SCTP_ADAPTION_INDICATION 0x0006
-#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007
-#define SCTP_AUTHENTICATION_EVENT 0x0008
-#define SCTP_STREAM_RESET_EVENT 0x0009
-#define SCTP_SENDER_DRY_EVENT 0x000a
-
+#define SCTP_ADAPTION_INDICATION 0x0006
+#define SCTP_PARTIAL_DELIVERY_EVENT 0x0007
+#define SCTP_AUTHENTICATION_EVENT 0x0008
+#define SCTP_STREAM_RESET_EVENT 0x0009
+#define SCTP_SENDER_DRY_EVENT 0x000a
+#define SCTP__NOTIFICATIONS_STOPPED_EVENT 0x000b /* we dont send this */
/*
* socket option structs
*/
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 9e1c01a..676e575 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -2008,7 +2008,7 @@ flags_out:
events->sctp_sender_dry_event = 1;
if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT))
- events->sctp_stream_reset_events = 1;
+ events->sctp_stream_reset_event = 1;
SCTP_INP_RUNLOCK(inp);
*optsize = sizeof(struct sctp_event_subscribe);
}
@@ -3650,7 +3650,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
sctp_feature_off(inp, SCTP_PCB_FLAGS_DRYEVNT);
}
- if (events->sctp_stream_reset_events) {
+ if (events->sctp_stream_reset_event) {
sctp_feature_on(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT);
} else {
sctp_feature_off(inp, SCTP_PCB_FLAGS_STREAM_RESETEVNT);
OpenPOWER on IntegriCloud