^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /* SCTP kernel implementation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * (C) Copyright Red Hat Inc. 2017
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * These are definitions used by the stream schedulers, defined in RFC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * draft ndata (https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Please send any bug reports or fixes you make to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * email addresses:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * lksctp developers <linux-sctp@vger.kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * Written or modified by:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * Xin Long <lucien.xin@gmail.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #ifndef __sctp_stream_interleave_h__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define __sctp_stream_interleave_h__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) struct sctp_stream_interleave {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) __u16 data_chunk_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) __u16 ftsn_chunk_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) /* (I-)DATA process */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) struct sctp_chunk *(*make_datafrag)(const struct sctp_association *asoc,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) const struct sctp_sndrcvinfo *sinfo,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) int len, __u8 flags, gfp_t gfp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) void (*assign_number)(struct sctp_chunk *chunk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) bool (*validate_data)(struct sctp_chunk *chunk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) int (*ulpevent_data)(struct sctp_ulpq *ulpq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) struct sctp_chunk *chunk, gfp_t gfp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) int (*enqueue_event)(struct sctp_ulpq *ulpq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) struct sctp_ulpevent *event);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) void (*renege_events)(struct sctp_ulpq *ulpq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) struct sctp_chunk *chunk, gfp_t gfp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) void (*start_pd)(struct sctp_ulpq *ulpq, gfp_t gfp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) void (*abort_pd)(struct sctp_ulpq *ulpq, gfp_t gfp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) /* (I-)FORWARD-TSN process */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) void (*generate_ftsn)(struct sctp_outq *q, __u32 ctsn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) bool (*validate_ftsn)(struct sctp_chunk *chunk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) void (*report_ftsn)(struct sctp_ulpq *ulpq, __u32 ftsn);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) void (*handle_ftsn)(struct sctp_ulpq *ulpq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) struct sctp_chunk *chunk);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) void sctp_stream_interleave_init(struct sctp_stream *stream);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #endif /* __sctp_stream_interleave_h__ */