ulpqueue.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* SCTP kernel implementation
  2. * (C) Copyright IBM Corp. 2001, 2004
  3. * Copyright (c) 1999-2000 Cisco, Inc.
  4. * Copyright (c) 1999-2001 Motorola, Inc.
  5. * Copyright (c) 2001 Intel Corp.
  6. * Copyright (c) 2001 Nokia, Inc.
  7. * Copyright (c) 2001 La Monte H.P. Yarroll
  8. *
  9. * These are the definitions needed for the sctp_ulpq type. The
  10. * sctp_ulpq is the interface between the Upper Layer Protocol, or ULP,
  11. * and the core SCTP state machine. This is the component which handles
  12. * reassembly and ordering.
  13. *
  14. * This SCTP implementation is free software;
  15. * you can redistribute it and/or modify it under the terms of
  16. * the GNU General Public License as published by
  17. * the Free Software Foundation; either version 2, or (at your option)
  18. * any later version.
  19. *
  20. * This SCTP implementation is distributed in the hope that it
  21. * will be useful, but WITHOUT ANY WARRANTY; without even the implied
  22. * ************************
  23. * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  24. * See the GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with GNU CC; see the file COPYING. If not, see
  28. * <http://www.gnu.org/licenses/>.
  29. *
  30. * Please send any bug reports or fixes you make to the
  31. * email addresses:
  32. * lksctp developers <linux-sctp@vger.kernel.org>
  33. *
  34. * Written or modified by:
  35. * Jon Grimm <jgrimm@us.ibm.com>
  36. * La Monte H.P. Yarroll <piggy@acm.org>
  37. * Sridhar Samudrala <sri@us.ibm.com>
  38. */
  39. #ifndef __sctp_ulpqueue_h__
  40. #define __sctp_ulpqueue_h__
  41. /* A structure to carry information to the ULP (e.g. Sockets API) */
  42. struct sctp_ulpq {
  43. char pd_mode;
  44. struct sctp_association *asoc;
  45. struct sk_buff_head reasm;
  46. struct sk_buff_head lobby;
  47. };
  48. /* Prototypes. */
  49. struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *,
  50. struct sctp_association *);
  51. void sctp_ulpq_flush(struct sctp_ulpq *ulpq);
  52. void sctp_ulpq_free(struct sctp_ulpq *);
  53. /* Add a new DATA chunk for processing. */
  54. int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
  55. /* Add a new event for propagation to the ULP. */
  56. int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev);
  57. /* Renege previously received chunks. */
  58. void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
  59. /* Perform partial delivery. */
  60. void sctp_ulpq_partial_delivery(struct sctp_ulpq *, gfp_t);
  61. /* Abort the partial delivery. */
  62. void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t);
  63. /* Clear the partial data delivery condition on this socket. */
  64. int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc);
  65. /* Skip over an SSN. */
  66. void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn);
  67. void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32);
  68. #endif /* __sctp_ulpqueue_h__ */