All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: [PATCH 4/6] sctp: implement user interface definitions for STREAM-RESET
Date: Mon, 09 Mar 2009 03:18:31 +0000	[thread overview]
Message-ID: <49B48A87.7040303@cn.fujitsu.com> (raw)

This patch implementation the user interface definitions for STREAM-RESET
extension.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 include/net/sctp/user.h |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index b259fc5..f722c7f 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -147,6 +147,8 @@ enum sctp_optname {
 #define SCTP_GET_LOCAL_ADDRS	SCTP_GET_LOCAL_ADDRS
 	SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
 #define SCTP_SOCKOPT_CONNECTX	SCTP_SOCKOPT_CONNECTX
+	SCTP_RESET_STREAMS,	/* Stream Reconfiguration */
+#define SCTP_RESET_STREAMS SCTP_RESET_STREAMS
 };
 
 /*
@@ -402,6 +404,18 @@ struct sctp_authkey_event {
 
 enum { SCTP_AUTH_NEWKEY = 0, };
 
+struct sctp_stream_reset_event {
+	__u16 strrst_type;
+	__u16 strrst_flags;
+	__u32 strrst_length;
+	sctp_assoc_t strrst_assoc_id;
+};
+
+enum {
+	SCTP_STREAM_RESET_INBOUND = 0,
+	SCTP_STREAM_RESET_OUTBOUND,
+	SCTP_STREAM_RESET_FAILED,
+};
 
 /*
  * Described in Section 7.3
@@ -417,6 +431,7 @@ struct sctp_event_subscribe {
 	__u8 sctp_partial_delivery_event;
 	__u8 sctp_adaptation_layer_event;
 	__u8 sctp_authentication_event;
+	__u8 sctp_stream_reset_event;
 };
 
 /*
@@ -440,6 +455,7 @@ union sctp_notification {
 	struct sctp_adaptation_event sn_adaptation_event;
 	struct sctp_pdapi_event sn_pdapi_event;
 	struct sctp_authkey_event sn_authkey_event;
+	struct sctp_stream_reset_event sn_strrst_event;
 };
 
 /* Section 5.3.1
@@ -457,6 +473,7 @@ enum sctp_sn_type {
 	SCTP_PARTIAL_DELIVERY_EVENT,
 	SCTP_ADAPTATION_INDICATION,
 	SCTP_AUTHENTICATION_INDICATION,
+	SCTP_STREAM_RESET_EVENT,
 };
 
 /* Notification error codes used to fill up the error fields in some
@@ -758,4 +775,19 @@ typedef struct {
 	int sd;
 } sctp_peeloff_arg_t;
 
+enum sctp_strrst_flags {
+	SCTP_STREAM_RESET_IN = 1<<0,	/* Outgoing SSN Reset Request */
+	SCTP_STREAM_RESET_OUT = 1<<1,	/* Incoming SSN Reset Request */
+	SCTP_STREAM_RESET_BOTH = SCTP_STREAM_RESET_IN | SCTP_STREAM_RESET_OUT,
+	SCTP_STREAM_RESET_TSN = 1<<2,	/* SSN/TSN Reset Request */
+	SCTP_STREAM_RESET_ADD = 1<<3,	/* Add Streams */
+};
+
+struct sctp_stream_reset {
+	sctp_assoc_t strrst_assoc_id;
+	__u16 strrst_flags;
+	__u16 strrst_number_of_streams;
+	__u16 strrst_streams[];
+};
+
 #endif /* __net_sctp_user_h__ */
-- 
1.5.3.8





             reply	other threads:[~2009-03-09  3:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-09  3:18 Wei Yongjun [this message]
2009-03-09 19:05 ` [PATCH 4/6] sctp: implement user interface definitions for STREAM-RESET Vlad Yasevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B48A87.7040303@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.