Lines Matching defs:asoc

50 sctp_ss_default_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
55 TAILQ_INIT(&asoc->ss_data.out_wheel);
61 for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
62 stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, &stcb->asoc,
63 &stcb->asoc.strmout[i],
70 sctp_ss_default_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
76 while (!TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
77 struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
79 TAILQ_REMOVE(&asoc->ss_data.out_wheel, TAILQ_FIRST(&asoc->ss_data.out_wheel), ss_params.rr.next_spoke);
83 asoc->last_out_stream = NULL;
99 sctp_ss_default_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
110 TAILQ_INSERT_TAIL(&asoc->ss_data.out_wheel,
120 sctp_ss_default_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc)
122 if (TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
130 sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
144 if (asoc->last_out_stream == strq) {
145 asoc->last_out_stream = TAILQ_PREV(asoc->last_out_stream,
148 if (asoc->last_out_stream == NULL) {
149 asoc->last_out_stream = TAILQ_LAST(&asoc->ss_data.out_wheel,
152 if (asoc->last_out_stream == strq) {
153 asoc->last_out_stream = NULL;
156 TAILQ_REMOVE(&asoc->ss_data.out_wheel, strq, ss_params.rr.next_spoke);
169 struct sctp_association *asoc)
173 strqt = asoc->last_out_stream;
177 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
181 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
199 if (strq == asoc->last_out_stream) {
212 struct sctp_association *asoc SCTP_UNUSED,
215 asoc->last_out_stream = strq;
221 struct sctp_association *asoc SCTP_UNUSED)
228 sctp_ss_default_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
236 sctp_ss_default_set_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
248 sctp_ss_rr_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
260 if (TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
261 TAILQ_INSERT_HEAD(&asoc->ss_data.out_wheel, strq, ss_params.rr.next_spoke);
263 strqt = TAILQ_FIRST(&asoc->ss_data.out_wheel);
270 TAILQ_INSERT_TAIL(&asoc->ss_data.out_wheel, strq, ss_params.rr.next_spoke);
287 struct sctp_association *asoc)
289 return (asoc->last_out_stream);
294 struct sctp_association *asoc)
298 strqt = asoc->last_out_stream;
302 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
306 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
324 if (strq == asoc->last_out_stream) {
332 asoc->last_out_stream = strq;
342 sctp_ss_prio_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
348 while (!TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
349 struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
354 TAILQ_REMOVE(&asoc->ss_data.out_wheel, TAILQ_FIRST(&asoc->ss_data.out_wheel), ss_params.prio.next_spoke);
359 asoc->last_out_stream = NULL;
380 sctp_ss_prio_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
393 if (TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
394 TAILQ_INSERT_HEAD(&asoc->ss_data.out_wheel, strq, ss_params.prio.next_spoke);
396 strqt = TAILQ_FIRST(&asoc->ss_data.out_wheel);
403 TAILQ_INSERT_TAIL(&asoc->ss_data.out_wheel, strq, ss_params.prio.next_spoke);
414 sctp_ss_prio_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
428 if (asoc->last_out_stream == strq) {
429 asoc->last_out_stream = TAILQ_PREV(asoc->last_out_stream, sctpwheel_listhead,
431 if (asoc->last_out_stream == NULL) {
432 asoc->last_out_stream = TAILQ_LAST(&asoc->ss_data.out_wheel,
435 if (asoc->last_out_stream == strq) {
436 asoc->last_out_stream = NULL;
439 TAILQ_REMOVE(&asoc->ss_data.out_wheel, strq, ss_params.prio.next_spoke);
451 struct sctp_association *asoc)
455 strqt = asoc->last_out_stream;
459 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
466 strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
484 if (strq == asoc->last_out_stream) {
496 sctp_ss_prio_get_value(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc SCTP_UNUSED,
507 sctp_ss_prio_set_value(struct sctp_tcb *stcb, struct sctp_association *asoc,
514 sctp_ss_prio_remove(stcb, asoc, strq, NULL, 1);
515 sctp_ss_prio_add(stcb, asoc, strq, NULL, 1);
524 sctp_ss_fb_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
530 while (!TAILQ_EMPTY(&asoc->ss_data.out_wheel)) {
531 struct sctp_stream_out *strq = TAILQ_FIRST(&asoc->ss_data.out_wheel);
536 TAILQ_REMOVE(&asoc->ss_data.out_wheel, TAILQ_FIRST(&asoc->ss_data.out_wheel), ss_params.fb.next_spoke);
540 asoc->last_out_stream = NULL;
561 sctp_ss_fb_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
573 TAILQ_INSERT_TAIL(&asoc->ss_data.out_wheel, strq, ss_params.fb.next_spoke);
582 sctp_ss_fb_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
596 if (asoc->last_out_stream == strq) {
597 asoc->last_out_stream = TAILQ_PREV(asoc->last_out_stream, sctpwheel_listhead,
599 if (asoc->last_out_stream == NULL) {
600 asoc->last_out_stream = TAILQ_LAST(&asoc->ss_data.out_wheel,
603 if (asoc->last_out_stream == strq) {
604 asoc->last_out_stream = NULL;
607 TAILQ_REMOVE(&asoc->ss_data.out_wheel, strq, ss_params.fb.next_spoke);
619 struct sctp_association *asoc)
623 if (asoc->last_out_stream == NULL ||
624 TAILQ_FIRST(&asoc->ss_data.out_wheel) == TAILQ_LAST(&asoc->ss_data.out_wheel, sctpwheel_listhead)) {
625 strqt = TAILQ_FIRST(&asoc->ss_data.out_wheel);
627 strqt = TAILQ_NEXT(asoc->last_out_stream, ss_params.fb.next_spoke);
644 strqt = TAILQ_FIRST(&asoc->ss_data.out_wheel);
652 struct sctp_association *asoc, struct sctp_stream_out *strq,
659 TAILQ_FOREACH(strqt, &asoc->ss_data.out_wheel, ss_params.fb.next_spoke) {
669 asoc->last_out_stream = strq;
678 sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
683 sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc,
690 TAILQ_INIT(&asoc->ss_data.out_list);
698 for (i = 0; i < stcb->asoc.streamoutcnt; i++) {
699 sp = TAILQ_FIRST(&stcb->asoc.strmout[i].outqueue);
707 sctp_ss_fcfs_add(stcb, &stcb->asoc, &stcb->asoc.strmout[i], sp, holds_lock);
717 sctp_ss_fcfs_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
724 while (!TAILQ_EMPTY(&asoc->ss_data.out_list)) {
725 TAILQ_REMOVE(&asoc->ss_data.out_list, TAILQ_FIRST(&asoc->ss_data.out_list), ss_next);
742 sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
751 TAILQ_INSERT_TAIL(&asoc->ss_data.out_list, sp, ss_next);
760 sctp_ss_fcfs_is_empty(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_association *asoc)
762 if (TAILQ_EMPTY(&asoc->ss_data.out_list)) {
770 sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
780 TAILQ_REMOVE(&asoc->ss_data.out_list, sp, ss_next);
791 struct sctp_association *asoc)
796 sp = TAILQ_FIRST(&asoc->ss_data.out_list);
799 strq = &asoc->strmout[sp->stream];