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