void sctp_ulpq_free(struct sctp_ulpq *);
/* Add a new DATA chunk for processing. */
- int sctp_ulpq_tail_data(struct sctp_ulpq *, sctp_chunk_t *chunk, int priority);
+ int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, int);
-/* Add a new event for propogation to the ULP. */
+/* Add a new event for propagation to the ULP. */
int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev);
- /* Is the ulpqueue empty. */
- int sctp_ulpqueue_is_empty(struct sctp_ulpq *);
+ /* Renege previously received chunks. */
+ void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, int);
+
+ /* Perform partial delivery. */
+ void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, int);
+
+ /* Abort the partial delivery. */
+ void sctp_ulpq_abort_pd(struct sctp_ulpq *, int);
+
+ /* Clear the partial data delivery condition on this socket. */
+ int sctp_clear_pd(struct sock *sk);
#endif /* __sctp_ulpqueue_h__ */
sctp_association_put(asoc);
}
-/* Charge receive window for bytes recieved. */
+/* Charge receive window for bytes received. */
- static void sctp_ulpevent_set_owner_r(struct sk_buff *skb, sctp_association_t *asoc)
+ static void sctp_ulpevent_set_owner_r(struct sk_buff *skb,
+ sctp_association_t *asoc)
{
- sctp_ulpevent_t *event;
+ struct sctp_ulpevent *event;
/* The current stack structures assume that the rcv buffer is
* per socket. For UDP-style sockets this is not true as
return 0;
}
-/* Add a new event for propogation to the ULP. */
+/* Add a new event for propagation to the ULP. */
+ /* Clear the partial delivery mode for this socket. Note: This
+ * assumes that no association is currently in partial delivery mode.
+ */
+ int sctp_clear_pd(struct sock *sk)
+ {
+ struct sctp_opt *sp;
+ sp = sctp_sk(sk);
+
+ sp->pd_mode = 0;
+ if (!skb_queue_empty(&sp->pd_lobby)) {
+ struct list_head *list;
+ sctp_skb_list_tail(&sp->pd_lobby, &sk->receive_queue);
+ list = (struct list_head *)&sctp_sk(sk)->pd_lobby;
+ INIT_LIST_HEAD(list);
+ return 1;
+ }
+ return 0;
+ }
+
+ /* Clear the pd_mode and restart any pending messages waiting for delivery. */
+ static int sctp_ulpq_clear_pd(struct sctp_ulpq *ulpq)
+ {
+ ulpq->pd_mode = 0;
+ return sctp_clear_pd(ulpq->asoc->base.sk);
+ }
+
+
+
int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event)
{
struct sock *sk = ulpq->asoc->base.sk;