]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/net/sctp/stream_interleave.h
Merge tag 'sched_urgent_for_v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-jammy-kernel.git] / include / net / sctp / stream_interleave.h
CommitLineData
47505b8b 1/* SPDX-License-Identifier: GPL-2.0-or-later */
0c3f6f65
XL
2/* SCTP kernel implementation
3 * (C) Copyright Red Hat Inc. 2017
4 *
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)
7 *
0c3f6f65
XL
8 * Please send any bug reports or fixes you make to the
9 * email addresses:
10 * lksctp developers <linux-sctp@vger.kernel.org>
11 *
12 * Written or modified by:
13 * Xin Long <lucien.xin@gmail.com>
14 */
15
16#ifndef __sctp_stream_interleave_h__
17#define __sctp_stream_interleave_h__
18
19struct sctp_stream_interleave {
20 __u16 data_chunk_len;
0fc2ea92 21 __u16 ftsn_chunk_len;
0c3f6f65
XL
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);
668c9beb 26 void (*assign_number)(struct sctp_chunk *chunk);
9d4ceaf1 27 bool (*validate_data)(struct sctp_chunk *chunk);
bd4d627d
XL
28 int (*ulpevent_data)(struct sctp_ulpq *ulpq,
29 struct sctp_chunk *chunk, gfp_t gfp);
9162e0ed
XL
30 int (*enqueue_event)(struct sctp_ulpq *ulpq,
31 struct sctp_ulpevent *event);
94014e8d
XL
32 void (*renege_events)(struct sctp_ulpq *ulpq,
33 struct sctp_chunk *chunk, gfp_t gfp);
be4e0ce1 34 void (*start_pd)(struct sctp_ulpq *ulpq, gfp_t gfp);
65f5e357 35 void (*abort_pd)(struct sctp_ulpq *ulpq, gfp_t gfp);
8e0c3b73
XL
36 /* (I-)FORWARD-TSN process */
37 void (*generate_ftsn)(struct sctp_outq *q, __u32 ctsn);
0fc2ea92 38 bool (*validate_ftsn)(struct sctp_chunk *chunk);
47b20a88 39 void (*report_ftsn)(struct sctp_ulpq *ulpq, __u32 ftsn);
de60fe91
XL
40 void (*handle_ftsn)(struct sctp_ulpq *ulpq,
41 struct sctp_chunk *chunk);
0c3f6f65
XL
42};
43
44void sctp_stream_interleave_init(struct sctp_stream *stream);
45
46#endif /* __sctp_stream_interleave_h__ */