Lines Matching full:event

125 				  struct sctp_ulpevent *event)  in sctp_intl_store_reasm()  argument
132 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
138 if (event->stream == cevent->stream && in sctp_intl_store_reasm()
139 event->mid == cevent->mid && in sctp_intl_store_reasm()
141 (!(event->msg_flags & SCTP_DATA_FIRST_FRAG) && in sctp_intl_store_reasm()
142 event->fsn > cevent->fsn))) { in sctp_intl_store_reasm()
143 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
147 if ((event->stream == cevent->stream && in sctp_intl_store_reasm()
148 MID_lt(cevent->mid, event->mid)) || in sctp_intl_store_reasm()
149 event->stream > cevent->stream) { in sctp_intl_store_reasm()
150 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
158 if (event->stream < cevent->stream || in sctp_intl_store_reasm()
159 (event->stream == cevent->stream && in sctp_intl_store_reasm()
160 MID_lt(event->mid, cevent->mid))) { in sctp_intl_store_reasm()
164 if (event->stream == cevent->stream && in sctp_intl_store_reasm()
165 event->mid == cevent->mid && in sctp_intl_store_reasm()
167 (event->msg_flags & SCTP_DATA_FIRST_FRAG || in sctp_intl_store_reasm()
168 event->fsn < cevent->fsn)) { in sctp_intl_store_reasm()
175 __skb_queue_tail(&ulpq->reasm, sctp_event2skb(event)); in sctp_intl_store_reasm()
177 __skb_queue_before(&ulpq->reasm, loc, sctp_event2skb(event)); in sctp_intl_store_reasm()
182 struct sctp_ulpevent *event) in sctp_intl_retrieve_partial() argument
192 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_partial()
197 if (cevent->stream < event->stream) in sctp_intl_retrieve_partial()
200 if (cevent->stream > event->stream || in sctp_intl_retrieve_partial()
259 struct sctp_ulpevent *event) in sctp_intl_retrieve_reassembled() argument
272 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_reassembled()
277 if (cevent->stream < event->stream) in sctp_intl_retrieve_reassembled()
279 if (cevent->stream > event->stream) in sctp_intl_retrieve_reassembled()
282 if (MID_lt(cevent->mid, event->mid)) in sctp_intl_retrieve_reassembled()
284 if (MID_lt(event->mid, cevent->mid)) in sctp_intl_retrieve_reassembled()
349 struct sctp_ulpevent *event) in sctp_intl_reasm() argument
354 if (SCTP_DATA_NOT_FRAG == (event->msg_flags & SCTP_DATA_FRAG_MASK)) { in sctp_intl_reasm()
355 event->msg_flags |= MSG_EOR; in sctp_intl_reasm()
356 return event; in sctp_intl_reasm()
359 sctp_intl_store_reasm(ulpq, event); in sctp_intl_reasm()
361 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_reasm()
362 if (sin->pd_mode && event->mid == sin->mid && in sctp_intl_reasm()
363 event->fsn == sin->fsn) in sctp_intl_reasm()
364 retval = sctp_intl_retrieve_partial(ulpq, event); in sctp_intl_reasm()
367 retval = sctp_intl_retrieve_reassembled(ulpq, event); in sctp_intl_reasm()
373 struct sctp_ulpevent *event) in sctp_intl_store_ordered() argument
380 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
385 if (event->stream == cevent->stream && in sctp_intl_store_ordered()
386 MID_lt(cevent->mid, event->mid)) { in sctp_intl_store_ordered()
387 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
391 if (event->stream > cevent->stream) { in sctp_intl_store_ordered()
392 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
400 if (cevent->stream > event->stream) { in sctp_intl_store_ordered()
404 if (cevent->stream == event->stream && in sctp_intl_store_ordered()
405 MID_lt(event->mid, cevent->mid)) { in sctp_intl_store_ordered()
412 __skb_queue_tail(&ulpq->lobby, sctp_event2skb(event)); in sctp_intl_store_ordered()
414 __skb_queue_before(&ulpq->lobby, loc, sctp_event2skb(event)); in sctp_intl_store_ordered()
418 struct sctp_ulpevent *event) in sctp_intl_retrieve_ordered() argument
423 __u16 sid = event->stream; in sctp_intl_retrieve_ordered()
426 event_list = (struct sk_buff_head *)sctp_event2skb(event)->prev; in sctp_intl_retrieve_ordered()
449 struct sctp_ulpevent *event) in sctp_intl_order() argument
455 sid = event->stream; in sctp_intl_order()
457 if (event->mid != sctp_mid_peek(stream, in, sid)) { in sctp_intl_order()
458 sctp_intl_store_ordered(ulpq, event); in sctp_intl_order()
464 sctp_intl_retrieve_ordered(ulpq, event); in sctp_intl_order()
466 return event; in sctp_intl_order()
474 struct sctp_ulpevent *event; in sctp_enqueue_event() local
478 event = sctp_skb2event(skb); in sctp_enqueue_event()
482 !sctp_ulpevent_is_notification(event))) in sctp_enqueue_event()
485 if (!sctp_ulpevent_is_notification(event)) { in sctp_enqueue_event()
490 if (!sctp_ulpevent_is_enabled(event, ulpq->asoc->subscribe)) in sctp_enqueue_event()
510 sctp_ulpevent_free(event); in sctp_enqueue_event()
516 struct sctp_ulpevent *event) in sctp_intl_store_reasm_uo() argument
523 __skb_queue_tail(&ulpq->reasm_uo, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
529 if (event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
530 event->mid == cevent->mid && in sctp_intl_store_reasm_uo()
532 (!(event->msg_flags & SCTP_DATA_FIRST_FRAG) && in sctp_intl_store_reasm_uo()
533 event->fsn > cevent->fsn))) { in sctp_intl_store_reasm_uo()
534 __skb_queue_tail(&ulpq->reasm_uo, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
538 if ((event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
539 MID_lt(cevent->mid, event->mid)) || in sctp_intl_store_reasm_uo()
540 event->stream > cevent->stream) { in sctp_intl_store_reasm_uo()
541 __skb_queue_tail(&ulpq->reasm_uo, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
548 if (event->stream < cevent->stream || in sctp_intl_store_reasm_uo()
549 (event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
550 MID_lt(event->mid, cevent->mid))) in sctp_intl_store_reasm_uo()
553 if (event->stream == cevent->stream && in sctp_intl_store_reasm_uo()
554 event->mid == cevent->mid && in sctp_intl_store_reasm_uo()
556 (event->msg_flags & SCTP_DATA_FIRST_FRAG || in sctp_intl_store_reasm_uo()
557 event->fsn < cevent->fsn)) in sctp_intl_store_reasm_uo()
561 __skb_queue_before(&ulpq->reasm_uo, pos, sctp_event2skb(event)); in sctp_intl_store_reasm_uo()
566 struct sctp_ulpevent *event) in sctp_intl_retrieve_partial_uo() argument
576 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_partial_uo()
581 if (cevent->stream < event->stream) in sctp_intl_retrieve_partial_uo()
583 if (cevent->stream > event->stream) in sctp_intl_retrieve_partial_uo()
647 struct sctp_ulpevent *event) in sctp_intl_retrieve_reassembled_uo() argument
660 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_reassembled_uo()
665 if (cevent->stream < event->stream) in sctp_intl_retrieve_reassembled_uo()
667 if (cevent->stream > event->stream) in sctp_intl_retrieve_reassembled_uo()
670 if (MID_lt(cevent->mid, event->mid)) in sctp_intl_retrieve_reassembled_uo()
672 if (MID_lt(event->mid, cevent->mid)) in sctp_intl_retrieve_reassembled_uo()
738 struct sctp_ulpevent *event) in sctp_intl_reasm_uo() argument
743 if (SCTP_DATA_NOT_FRAG == (event->msg_flags & SCTP_DATA_FRAG_MASK)) { in sctp_intl_reasm_uo()
744 event->msg_flags |= MSG_EOR; in sctp_intl_reasm_uo()
745 return event; in sctp_intl_reasm_uo()
748 sctp_intl_store_reasm_uo(ulpq, event); in sctp_intl_reasm_uo()
750 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_reasm_uo()
751 if (sin->pd_mode_uo && event->mid == sin->mid_uo && in sctp_intl_reasm_uo()
752 event->fsn == sin->fsn_uo) in sctp_intl_reasm_uo()
753 retval = sctp_intl_retrieve_partial_uo(ulpq, event); in sctp_intl_reasm_uo()
756 retval = sctp_intl_retrieve_reassembled_uo(ulpq, event); in sctp_intl_reasm_uo()
828 struct sctp_ulpevent *event; in sctp_ulpevent_idata() local
832 event = sctp_ulpevent_make_rcvmsg(chunk->asoc, chunk, gfp); in sctp_ulpevent_idata()
833 if (!event) in sctp_ulpevent_idata()
836 event->mid = ntohl(chunk->subh.idata_hdr->mid); in sctp_ulpevent_idata()
837 if (event->msg_flags & SCTP_DATA_FIRST_FRAG) in sctp_ulpevent_idata()
838 event->ppid = chunk->subh.idata_hdr->ppid; in sctp_ulpevent_idata()
840 event->fsn = ntohl(chunk->subh.idata_hdr->fsn); in sctp_ulpevent_idata()
842 if (!(event->msg_flags & SCTP_DATA_UNORDERED)) { in sctp_ulpevent_idata()
843 event = sctp_intl_reasm(ulpq, event); in sctp_ulpevent_idata()
844 if (event) { in sctp_ulpevent_idata()
846 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_ulpevent_idata()
848 if (event->msg_flags & MSG_EOR) in sctp_ulpevent_idata()
849 event = sctp_intl_order(ulpq, event); in sctp_ulpevent_idata()
852 event = sctp_intl_reasm_uo(ulpq, event); in sctp_ulpevent_idata()
853 if (event) { in sctp_ulpevent_idata()
855 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_ulpevent_idata()
859 if (event) { in sctp_ulpevent_idata()
860 event_eor = (event->msg_flags & MSG_EOR) ? 1 : 0; in sctp_ulpevent_idata()
934 struct sctp_ulpevent *event; in sctp_intl_start_pd() local
939 event = sctp_intl_retrieve_first(ulpq); in sctp_intl_start_pd()
940 if (event) { in sctp_intl_start_pd()
942 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_intl_start_pd()
945 } while (event); in sctp_intl_start_pd()
950 event = sctp_intl_retrieve_first_uo(ulpq); in sctp_intl_start_pd()
951 if (event) { in sctp_intl_start_pd()
953 __skb_queue_tail(&temp, sctp_event2skb(event)); in sctp_intl_start_pd()
956 } while (event); in sctp_intl_start_pd()
1013 struct sctp_ulpevent *cevent, *event = NULL; in sctp_intl_reap_ordered() local
1036 if (!event) in sctp_intl_reap_ordered()
1037 event = sctp_skb2event(pos); in sctp_intl_reap_ordered()
1042 if (!event && pos != (struct sk_buff *)lobby) { in sctp_intl_reap_ordered()
1051 event = sctp_skb2event(pos); in sctp_intl_reap_ordered()
1055 if (event) { in sctp_intl_reap_ordered()
1056 sctp_intl_retrieve_ordered(ulpq, event); in sctp_intl_reap_ordered()
1218 struct sctp_ulpevent *event = sctp_skb2event(pos); in sctp_intl_reasm_flushtsn() local
1219 __u32 tsn = event->tsn; in sctp_intl_reasm_flushtsn()
1223 sctp_ulpevent_free(event); in sctp_intl_reasm_flushtsn()
1228 struct sctp_ulpevent *event = sctp_skb2event(pos); in sctp_intl_reasm_flushtsn() local
1229 __u32 tsn = event->tsn; in sctp_intl_reasm_flushtsn()
1233 sctp_ulpevent_free(event); in sctp_intl_reasm_flushtsn()
1296 static int do_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event) in do_ulpq_tail_event() argument
1301 __skb_queue_tail(&temp, sctp_event2skb(event)); in do_ulpq_tail_event()
1325 struct sctp_ulpevent *event) in do_sctp_enqueue_event() argument
1330 __skb_queue_tail(&temp, sctp_event2skb(event)); in do_sctp_enqueue_event()