2019-05-23 17:14:41 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2008-01-11 22:57:09 +08:00
|
|
|
/* SCTP kernel implementation
|
2005-04-17 06:20:36 +08:00
|
|
|
* (C) Copyright IBM Corp. 2001, 2004
|
|
|
|
* Copyright (c) 1999-2000 Cisco, Inc.
|
|
|
|
* Copyright (c) 1999-2001 Motorola, Inc.
|
|
|
|
* Copyright (c) 2001 Intel Corp.
|
|
|
|
* Copyright (c) 2001 Nokia, Inc.
|
|
|
|
* Copyright (c) 2001 La Monte H.P. Yarroll
|
|
|
|
*
|
|
|
|
* These are the definitions needed for the sctp_ulpq type. The
|
|
|
|
* sctp_ulpq is the interface between the Upper Layer Protocol, or ULP,
|
|
|
|
* and the core SCTP state machine. This is the component which handles
|
|
|
|
* reassembly and ordering.
|
|
|
|
*
|
|
|
|
* Please send any bug reports or fixes you make to the
|
|
|
|
* email addresses:
|
2013-07-23 20:51:47 +08:00
|
|
|
* lksctp developers <linux-sctp@vger.kernel.org>
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* Written or modified by:
|
|
|
|
* Jon Grimm <jgrimm@us.ibm.com>
|
|
|
|
* La Monte H.P. Yarroll <piggy@acm.org>
|
|
|
|
* Sridhar Samudrala <sri@us.ibm.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __sctp_ulpqueue_h__
|
|
|
|
#define __sctp_ulpqueue_h__
|
|
|
|
|
|
|
|
/* A structure to carry information to the ULP (e.g. Sockets API) */
|
|
|
|
struct sctp_ulpq {
|
|
|
|
char pd_mode;
|
|
|
|
struct sctp_association *asoc;
|
|
|
|
struct sk_buff_head reasm;
|
2017-12-08 21:04:09 +08:00
|
|
|
struct sk_buff_head reasm_uo;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct sk_buff_head lobby;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Prototypes. */
|
|
|
|
struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *,
|
|
|
|
struct sctp_association *);
|
2007-03-20 08:01:17 +08:00
|
|
|
void sctp_ulpq_flush(struct sctp_ulpq *ulpq);
|
2005-04-17 06:20:36 +08:00
|
|
|
void sctp_ulpq_free(struct sctp_ulpq *);
|
|
|
|
|
|
|
|
/* Add a new DATA chunk for processing. */
|
2005-10-07 14:46:04 +08:00
|
|
|
int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Add a new event for propagation to the ULP. */
|
2019-04-12 06:02:07 +08:00
|
|
|
int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sk_buff_head *skb_list);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Renege previously received chunks. */
|
2005-10-07 14:46:04 +08:00
|
|
|
void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Perform partial delivery. */
|
2012-10-29 16:32:13 +08:00
|
|
|
void sctp_ulpq_partial_delivery(struct sctp_ulpq *, gfp_t);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Abort the partial delivery. */
|
2005-10-07 14:46:04 +08:00
|
|
|
void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Clear the partial data delivery condition on this socket. */
|
2007-04-21 03:23:15 +08:00
|
|
|
int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Skip over an SSN. */
|
|
|
|
void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn);
|
|
|
|
|
2007-07-14 05:01:19 +08:00
|
|
|
void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2017-12-08 21:04:06 +08:00
|
|
|
__u16 sctp_ulpq_renege_list(struct sctp_ulpq *ulpq,
|
|
|
|
struct sk_buff_head *list, __u16 needed);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2017-12-08 21:04:06 +08:00
|
|
|
#endif /* __sctp_ulpqueue_h__ */
|