0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef __sctp_stream_sched_h__
0017 #define __sctp_stream_sched_h__
0018
0019 struct sctp_sched_ops {
0020
0021 int (*set)(struct sctp_stream *stream, __u16 sid, __u16 value,
0022 gfp_t gfp);
0023 int (*get)(struct sctp_stream *stream, __u16 sid, __u16 *value);
0024
0025
0026 int (*init)(struct sctp_stream *stream);
0027
0028 int (*init_sid)(struct sctp_stream *stream, __u16 sid, gfp_t gfp);
0029
0030 void (*free)(struct sctp_stream *stream);
0031
0032
0033 void (*enqueue)(struct sctp_outq *q, struct sctp_datamsg *msg);
0034
0035 struct sctp_chunk *(*dequeue)(struct sctp_outq *q);
0036
0037 void (*dequeue_done)(struct sctp_outq *q, struct sctp_chunk *chunk);
0038
0039 void (*sched_all)(struct sctp_stream *steam);
0040
0041 void (*unsched_all)(struct sctp_stream *steam);
0042 };
0043
0044 int sctp_sched_set_sched(struct sctp_association *asoc,
0045 enum sctp_sched_type sched);
0046 int sctp_sched_get_sched(struct sctp_association *asoc);
0047 int sctp_sched_set_value(struct sctp_association *asoc, __u16 sid,
0048 __u16 value, gfp_t gfp);
0049 int sctp_sched_get_value(struct sctp_association *asoc, __u16 sid,
0050 __u16 *value);
0051 void sctp_sched_dequeue_done(struct sctp_outq *q, struct sctp_chunk *ch);
0052
0053 void sctp_sched_dequeue_common(struct sctp_outq *q, struct sctp_chunk *ch);
0054 int sctp_sched_init_sid(struct sctp_stream *stream, __u16 sid, gfp_t gfp);
0055 struct sctp_sched_ops *sctp_sched_ops_from_stream(struct sctp_stream *stream);
0056
0057 void sctp_sched_ops_register(enum sctp_sched_type sched,
0058 struct sctp_sched_ops *sched_ops);
0059 void sctp_sched_ops_prio_init(void);
0060 void sctp_sched_ops_rr_init(void);
0061
0062 #endif