09 Aug, 2016

1 commit


12 Jul, 2016

3 commits

  • This patch adds SCTP_PR_ASSOC_STATUS to sctp sockopt, which is used
    to dump the prsctp statistics info from the asoc. The prsctp statistics
    includes abandoned_sent/unsent from the asoc. abandoned_sent is the
    count of the packets we drop packets from retransmit/transmited queue,
    and abandoned_unsent is the count of the packets we drop from out_queue
    according to the policy.

    Note: another option for prsctp statistics dump described in rfc is
    SCTP_PR_STREAM_STATUS, which is used to dump the prsctp statistics
    info from each stream. But by now, linux doesn't yet have per stream
    statistics info, it needs rfc6525 to be implemented. As the prsctp
    statistics for each stream has to be based on per stream statistics,
    we will delay it until rfc6525 is done in linux.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     
  • This patch adds SCTP_DEFAULT_PRINFO to sctp sockopt. It is used
    to set/get sctp Partially Reliable Policies' default params,
    which includes 3 policies (ttl, rtx, prio) and their values.

    Still, if we set policy params in sndinfo, we will use the params
    of sndinfo against chunks, instead of the default params.

    In this patch, we will use 5-8bit of sp/asoc->default_flags
    to store prsctp policies, and reuse asoc->default_timetolive
    to store their values. It means if we enable and set prsctp
    policy, prior ttl timeout in sctp will not work any more.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     
  • According to section 4.5 of rfc7496, prsctp_enable should be per asoc.
    We will add prsctp_enable to both asoc and ep, and replace the places
    where it used net.sctp->prsctp_enable with asoc->prsctp_enable.

    ep->prsctp_enable will be initialized with net.sctp->prsctp_enable, and
    asoc->prsctp_enable will be initialized with ep->prsctp_enable. We can
    also modify it's value through sockopt SCTP_PR_SUPPORTED.

    Signed-off-by: Xin Long
    Signed-off-by: David S. Miller

    Xin Long
     

17 Jul, 2014

4 commits

  • This patch implements section 8.1.31. of RFC6458, which adds support
    for setting/retrieving SCTP_DEFAULT_SNDINFO:

    Applications that wish to use the sendto() system call may wish
    to specify a default set of parameters that would normally be
    supplied through the inclusion of ancillary data. This socket
    option allows such an application to set the default sctp_sndinfo
    structure. The application that wishes to use this socket option
    simply passes the sctp_sndinfo structure (defined in Section 5.3.4)
    to this call. The input parameters accepted by this call include
    snd_sid, snd_flags, snd_ppid, and snd_context. The snd_flags
    parameter is composed of a bitwise OR of SCTP_UNORDERED, SCTP_EOF,
    and SCTP_SENDALL. The snd_assoc_id field specifies the association
    to which to apply the parameters. For a one-to-many style socket,
    any of the predefined constants are also allowed in this field.
    The field is ignored for one-to-one style sockets.

    Joint work with Daniel Borkmann.

    Signed-off-by: Geir Ola Vaagland
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Geir Ola Vaagland
     
  • This patch implements section 5.3.6. of RFC6458, that is, support
    for 'SCTP Next Receive Information Structure' (SCTP_NXTINFO) which
    is placed into ancillary data cmsghdr structure for each recvmsg()
    call, if this information is already available when delivering the
    current message.

    This option can be enabled/disabled via setsockopt(2) on SOL_SCTP
    level by setting an int value with 1/0 for SCTP_RECVNXTINFO in
    user space applications as per RFC6458, section 8.1.30.

    The sctp_nxtinfo structure is defined as per RFC as below ...

    struct sctp_nxtinfo {
    uint16_t nxt_sid;
    uint16_t nxt_flags;
    uint32_t nxt_ppid;
    uint32_t nxt_length;
    sctp_assoc_t nxt_assoc_id;
    };

    ... and provided under cmsg_level IPPROTO_SCTP, cmsg_type
    SCTP_NXTINFO, while cmsg_data[] contains struct sctp_nxtinfo.

    Joint work with Daniel Borkmann.

    Signed-off-by: Geir Ola Vaagland
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Geir Ola Vaagland
     
  • This patch implements section 5.3.5. of RFC6458, that is, support
    for 'SCTP Receive Information Structure' (SCTP_RCVINFO) which is
    placed into ancillary data cmsghdr structure for each recvmsg()
    call.

    This option can be enabled/disabled via setsockopt(2) on SOL_SCTP
    level by setting an int value with 1/0 for SCTP_RECVRCVINFO in user
    space applications as per RFC6458, section 8.1.29.

    The sctp_rcvinfo structure is defined as per RFC as below ...

    struct sctp_rcvinfo {
    uint16_t rcv_sid;
    uint16_t rcv_ssn;
    uint16_t rcv_flags;

    uint32_t rcv_ppid;
    uint32_t rcv_tsn;
    uint32_t rcv_cumtsn;
    uint32_t rcv_context;
    sctp_assoc_t rcv_assoc_id;
    };

    ... and provided under cmsg_level IPPROTO_SCTP, cmsg_type
    SCTP_RCVINFO, while cmsg_data[] contains struct sctp_rcvinfo.
    An sctp_rcvinfo item always corresponds to the data in msg_iov.

    Joint work with Daniel Borkmann.

    Signed-off-by: Geir Ola Vaagland
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Geir Ola Vaagland
     
  • This patch implements section 5.3.4. of RFC6458, that is, support
    for 'SCTP Send Information Structure' (SCTP_SNDINFO) which can be
    placed into ancillary data cmsghdr structure for sendmsg() calls.

    The sctp_sndinfo structure is defined as per RFC as below ...

    struct sctp_sndinfo {
    uint16_t snd_sid;
    uint16_t snd_flags;
    uint32_t snd_ppid;
    uint32_t snd_context;
    sctp_assoc_t snd_assoc_id;
    };

    ... and supplied under cmsg_level IPPROTO_SCTP, cmsg_type
    SCTP_SNDINFO, while cmsg_data[] contains struct sctp_sndinfo.
    An sctp_sndinfo item always corresponds to the data in msg_iov.

    Joint work with Daniel Borkmann.

    Signed-off-by: Geir Ola Vaagland
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Geir Ola Vaagland
     

07 Dec, 2013

1 commit

  • Several files refer to an old address for the Free Software Foundation
    in the file header comment. Resolve by replacing the address with
    the URL so that we do not have to keep
    updating the header comments anytime the address changes.

    CC: Vlad Yasevich
    CC: Neil Horman
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jeff Kirsher
     

25 Jul, 2013

1 commit

  • The SCTP mailing list address to send patches or questions
    to is linux-sctp@vger.kernel.org and not
    lksctp-developers@lists.sourceforge.net anymore. Therefore,
    update all occurences.

    Signed-off-by: Daniel Borkmann
    Acked-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

10 Apr, 2013

1 commit

  • This patch introduces an UAPI header for the SCTP protocol,
    so that we can facilitate the maintenance and development of
    user land applications or libraries, in particular in terms
    of header synchronization.

    To not break compatibility, some fragments from lksctp-tools'
    netinet/sctp.h have been carefully included, while taking care
    that neither kernel nor user land breaks, so both compile fine
    with this change (for lksctp-tools I tested with the old
    netinet/sctp.h header and with a newly adapted one that includes
    the uapi sctp header). lksctp-tools smoke test run through
    successfully as well in both cases.

    Suggested-by: Neil Horman
    Cc: Neil Horman
    Cc: Vlad Yasevich
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann