Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /* SCTP kernel implementation
0003  * (C) Copyright Red Hat Inc. 2017
0004  *
0005  * These are definitions used by the stream schedulers, defined in RFC
0006  * draft ndata (https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-11)
0007  *
0008  * Please send any bug reports or fixes you make to the
0009  * email addresses:
0010  *    lksctp developers <linux-sctp@vger.kernel.org>
0011  *
0012  * Written or modified by:
0013  *   Xin Long <lucien.xin@gmail.com>
0014  */
0015 
0016 #ifndef __sctp_stream_interleave_h__
0017 #define __sctp_stream_interleave_h__
0018 
0019 struct sctp_stream_interleave {
0020     __u16   data_chunk_len;
0021     __u16   ftsn_chunk_len;
0022     /* (I-)DATA process */
0023     struct sctp_chunk *(*make_datafrag)(const struct sctp_association *asoc,
0024                         const struct sctp_sndrcvinfo *sinfo,
0025                         int len, __u8 flags, gfp_t gfp);
0026     void    (*assign_number)(struct sctp_chunk *chunk);
0027     bool    (*validate_data)(struct sctp_chunk *chunk);
0028     int (*ulpevent_data)(struct sctp_ulpq *ulpq,
0029                  struct sctp_chunk *chunk, gfp_t gfp);
0030     int (*enqueue_event)(struct sctp_ulpq *ulpq,
0031                  struct sctp_ulpevent *event);
0032     void    (*renege_events)(struct sctp_ulpq *ulpq,
0033                  struct sctp_chunk *chunk, gfp_t gfp);
0034     void    (*start_pd)(struct sctp_ulpq *ulpq, gfp_t gfp);
0035     void    (*abort_pd)(struct sctp_ulpq *ulpq, gfp_t gfp);
0036     /* (I-)FORWARD-TSN process */
0037     void    (*generate_ftsn)(struct sctp_outq *q, __u32 ctsn);
0038     bool    (*validate_ftsn)(struct sctp_chunk *chunk);
0039     void    (*report_ftsn)(struct sctp_ulpq *ulpq, __u32 ftsn);
0040     void    (*handle_ftsn)(struct sctp_ulpq *ulpq,
0041                    struct sctp_chunk *chunk);
0042 };
0043 
0044 void sctp_stream_interleave_init(struct sctp_stream *stream);
0045 
0046 #endif /* __sctp_stream_interleave_h__ */