162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* SCTP kernel implementation 362306a36Sopenharmony_ci * (C) Copyright IBM Corp. 2001, 2004 462306a36Sopenharmony_ci * Copyright (c) 1999-2000 Cisco, Inc. 562306a36Sopenharmony_ci * Copyright (c) 1999-2001 Motorola, Inc. 662306a36Sopenharmony_ci * Copyright (c) 2001 Intel Corp. 762306a36Sopenharmony_ci * Copyright (c) 2001 Nokia, Inc. 862306a36Sopenharmony_ci * Copyright (c) 2001 La Monte H.P. Yarroll 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * These are the definitions needed for the sctp_ulpq type. The 1162306a36Sopenharmony_ci * sctp_ulpq is the interface between the Upper Layer Protocol, or ULP, 1262306a36Sopenharmony_ci * and the core SCTP state machine. This is the component which handles 1362306a36Sopenharmony_ci * reassembly and ordering. 1462306a36Sopenharmony_ci * 1562306a36Sopenharmony_ci * Please send any bug reports or fixes you make to the 1662306a36Sopenharmony_ci * email addresses: 1762306a36Sopenharmony_ci * lksctp developers <linux-sctp@vger.kernel.org> 1862306a36Sopenharmony_ci * 1962306a36Sopenharmony_ci * Written or modified by: 2062306a36Sopenharmony_ci * Jon Grimm <jgrimm@us.ibm.com> 2162306a36Sopenharmony_ci * La Monte H.P. Yarroll <piggy@acm.org> 2262306a36Sopenharmony_ci * Sridhar Samudrala <sri@us.ibm.com> 2362306a36Sopenharmony_ci */ 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#ifndef __sctp_ulpqueue_h__ 2662306a36Sopenharmony_ci#define __sctp_ulpqueue_h__ 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci/* A structure to carry information to the ULP (e.g. Sockets API) */ 2962306a36Sopenharmony_cistruct sctp_ulpq { 3062306a36Sopenharmony_ci char pd_mode; 3162306a36Sopenharmony_ci struct sctp_association *asoc; 3262306a36Sopenharmony_ci struct sk_buff_head reasm; 3362306a36Sopenharmony_ci struct sk_buff_head reasm_uo; 3462306a36Sopenharmony_ci struct sk_buff_head lobby; 3562306a36Sopenharmony_ci}; 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci/* Prototypes. */ 3862306a36Sopenharmony_civoid sctp_ulpq_init(struct sctp_ulpq *ulpq, struct sctp_association *asoc); 3962306a36Sopenharmony_civoid sctp_ulpq_flush(struct sctp_ulpq *ulpq); 4062306a36Sopenharmony_civoid sctp_ulpq_free(struct sctp_ulpq *); 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci/* Add a new DATA chunk for processing. */ 4362306a36Sopenharmony_ciint sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci/* Add a new event for propagation to the ULP. */ 4662306a36Sopenharmony_ciint sctp_ulpq_tail_event(struct sctp_ulpq *, struct sk_buff_head *skb_list); 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ci/* Renege previously received chunks. */ 4962306a36Sopenharmony_civoid sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci/* Perform partial delivery. */ 5262306a36Sopenharmony_civoid sctp_ulpq_partial_delivery(struct sctp_ulpq *, gfp_t); 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci/* Abort the partial delivery. */ 5562306a36Sopenharmony_civoid sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t); 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci/* Clear the partial data delivery condition on this socket. */ 5862306a36Sopenharmony_ciint sctp_clear_pd(struct sock *sk, struct sctp_association *asoc); 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci/* Skip over an SSN. */ 6162306a36Sopenharmony_civoid sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn); 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_civoid sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32); 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci__u16 sctp_ulpq_renege_list(struct sctp_ulpq *ulpq, 6662306a36Sopenharmony_ci struct sk_buff_head *list, __u16 needed); 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#endif /* __sctp_ulpqueue_h__ */ 69