linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xin Long <lucien.xin@gmail.com>
To: network dev <netdev@vger.kernel.org>, linux-sctp@vger.kernel.org
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	davem@davemloft.net
Subject: [PATCH net-next 0/4] sctp: add subscribe per asoc and sockopt SCTP_EVENT
Date: Mon, 12 Nov 2018 16:26:41 +0000	[thread overview]
Message-ID: <cover.1542039672.git.lucien.xin@gmail.com> (raw)

This patchset mainly adds the Event Subscription sockopt described in
rfc6525#section-6.2:

Subscribing to events as described in [RFC6458] uses a setsockopt()
call with the SCTP_EVENT socket option.  This option takes the
following structure, which specifies the association, the event type
(using the same value found in the event type field), and an on/off
boolean.

  struct sctp_event {
    sctp_assoc_t se_assoc_id;
    uint16_t     se_type;
    uint8_t      se_on;
  };

The user fills in the se_type field with the same value found in the
strreset_type field, i.e., SCTP_STREAM_RESET_EVENT.  The user will
also fill in the se_assoc_id field with either the association to set
this event on (this field is ignored for one-to-one style sockets) or
one of the reserved constant values defined in [RFC6458].  Finally,
the se_on field is set with a 1 to enable the event or a 0 to disable
the event.

As for the old SCTP_EVENTS Option with struct sctp_event_subscribe,
it's being DEPRECATED.

Xin Long (4):
  sctp: define subscribe in sctp_sock as __u16
  sctp: add subscribe per asoc
  sctp: rename enum sctp_event to sctp_event_type
  sctp: add sockopt SCTP_EVENT

 include/net/sctp/constants.h |   2 +-
 include/net/sctp/sm.h        |   4 +-
 include/net/sctp/structs.h   |   4 +-
 include/net/sctp/ulpevent.h  |  39 ++++++++------
 include/uapi/linux/sctp.h    |  13 ++++-
 net/sctp/associola.c         |   2 +
 net/sctp/chunk.c             |   8 ++-
 net/sctp/primitive.c         |   2 +-
 net/sctp/sm_sideeffect.c     |  12 ++---
 net/sctp/sm_statetable.c     |   2 +-
 net/sctp/socket.c            | 126 ++++++++++++++++++++++++++++++++++++++++---
 net/sctp/stream_interleave.c |  12 +++--
 net/sctp/ulpqueue.c          |   8 +--
 13 files changed, 184 insertions(+), 50 deletions(-)

-- 
2.1.0

             reply	other threads:[~2018-11-12 16:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 16:26 Xin Long [this message]
     [not found] ` <7ecc29f2a93410e51c32a433417bcf84a9aaf44c.1542039673.git.lucien.xin@gmail.com>
     [not found]   ` <fb63fe1e7b08dfc38a3da8670584296660ba5e16.1542039673.git.lucien.xin@gmail.com>
2018-11-12 16:26     ` [PATCH net-next 3/4] sctp: rename enum sctp_event to sctp_event_type Xin Long
2018-11-12 16:26       ` [PATCH net-next 4/4] sctp: add sockopt SCTP_EVENT Xin Long
2018-11-13  6:35 ` [PATCH net-next 0/4] sctp: add subscribe per asoc and " Xin Long

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=cover.1542039672.git.lucien.xin@gmail.com \
    --to=lucien.xin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).