ulpqueue.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /* SCTP kernel implementation
  3. * (C) Copyright IBM Corp. 2001, 2004
  4. * Copyright (c) 1999-2000 Cisco, Inc.
  5. * Copyright (c) 1999-2001 Motorola, Inc.
  6. * Copyright (c) 2001 Intel Corp.
  7. * Copyright (c) 2001 Nokia, Inc.
  8. * Copyright (c) 2001 La Monte H.P. Yarroll
  9. *
  10. * These are the definitions needed for the sctp_ulpq type. The
  11. * sctp_ulpq is the interface between the Upper Layer Protocol, or ULP,
  12. * and the core SCTP state machine. This is the component which handles
  13. * reassembly and ordering.
  14. *
  15. * Please send any bug reports or fixes you make to the
  16. * email addresses:
  17. * lksctp developers <[email protected]>
  18. *
  19. * Written or modified by:
  20. * Jon Grimm <[email protected]>
  21. * La Monte H.P. Yarroll <[email protected]>
  22. * Sridhar Samudrala <[email protected]>
  23. */
  24. #ifndef __sctp_ulpqueue_h__
  25. #define __sctp_ulpqueue_h__
  26. /* A structure to carry information to the ULP (e.g. Sockets API) */
  27. struct sctp_ulpq {
  28. char pd_mode;
  29. struct sctp_association *asoc;
  30. struct sk_buff_head reasm;
  31. struct sk_buff_head reasm_uo;
  32. struct sk_buff_head lobby;
  33. };
  34. /* Prototypes. */
  35. struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *,
  36. struct sctp_association *);
  37. void sctp_ulpq_flush(struct sctp_ulpq *ulpq);
  38. void sctp_ulpq_free(struct sctp_ulpq *);
  39. /* Add a new DATA chunk for processing. */
  40. int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
  41. /* Add a new event for propagation to the ULP. */
  42. int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sk_buff_head *skb_list);
  43. /* Renege previously received chunks. */
  44. void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t);
  45. /* Perform partial delivery. */
  46. void sctp_ulpq_partial_delivery(struct sctp_ulpq *, gfp_t);
  47. /* Abort the partial delivery. */
  48. void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t);
  49. /* Clear the partial data delivery condition on this socket. */
  50. int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc);
  51. /* Skip over an SSN. */
  52. void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn);
  53. void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *, __u32);
  54. __u16 sctp_ulpq_renege_list(struct sctp_ulpq *ulpq,
  55. struct sk_buff_head *list, __u16 needed);
  56. #endif /* __sctp_ulpqueue_h__ */