Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /* SCTP kernel implementation
0003  * (C) Copyright IBM Corp. 2001, 2004
0004  * Copyright (c) 1999-2000 Cisco, Inc.
0005  * Copyright (c) 1999-2001 Motorola, Inc.
0006  * Copyright (c) 2001 Intel Corp.
0007  * Copyright (c) 2001 Nokia, Inc.
0008  * Copyright (c) 2001 La Monte H.P. Yarroll
0009  *
0010  * These are the definitions needed for the sctp_ulpq type.  The
0011  * sctp_ulpq is the interface between the Upper Layer Protocol, or ULP,
0012  * and the core SCTP state machine.  This is the component which handles
0013  * reassembly and ordering.
0014  *
0015  * Please send any bug reports or fixes you make to the
0016  * email addresses:
0017  *    lksctp developers <linux-sctp@vger.kernel.org>
0018  *
0019  * Written or modified by:
0020  *   Jon Grimm             <jgrimm@us.ibm.com>
0021  *   La Monte H.P. Yarroll <piggy@acm.org>
0022  *   Sridhar Samudrala     <sri@us.ibm.com>
0023  */
0024 
0025 #ifndef __sctp_ulpqueue_h__
0026 #define __sctp_ulpqueue_h__
0027 
0028 /* A structure to carry information to the ULP (e.g. Sockets API) */
0029 struct sctp_ulpq {
0030     char pd_mode;
0031     struct sctp_association *asoc;
0032     struct sk_buff_head reasm;
0033     struct sk_buff_head reasm_uo;
0034     struct sk_buff_head lobby;
0035 };
0036 
0037 /* Prototypes. */
0038 struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *,
0039                  struct sctp_association *);
0040 void sctp_ulpq_flush(struct sctp_ulpq *ulpq);
0041 void sctp_ulpq_free(struct sctp_ulpq *);
0042 
0043 /* Add a new DATA chunk for processing. */
0044 int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
0045 
0046 /* Add a new event for propagation to the ULP. */
0047 int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sk_buff_head *skb_list);
0048 
0049 /* Renege previously received chunks.  */
0050 void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
0051 
0052 /* Perform partial delivery. */
0053 void sctp_ulpq_partial_delivery(struct sctp_ulpq *, gfp_t);
0054 
0055 /* Abort the partial delivery. */
0056 void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t);
0057 
0058 /* Clear the partial data delivery condition on this socket. */
0059 int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc);
0060 
0061 /* Skip over an SSN. */
0062 void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn);
0063 
0064 void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32);
0065 
0066 __u16 sctp_ulpq_renege_list(struct sctp_ulpq *ulpq,
0067                 struct sk_buff_head *list, __u16 needed);
0068 
0069 #endif /* __sctp_ulpqueue_h__ */