Lines Matching refs:stream

489 		cur_stream = mtcp->smap[mtcpq->events[offset++].sockid].stream;  in FlushBufferedReadEvents()
557 tcp_stream *stream; in HandleApplicationCalls() local
563 while ((stream = StreamDequeue(mtcp->connectq))) { in HandleApplicationCalls()
564 if (stream->state != TCP_ST_SYN_SENT) { in HandleApplicationCalls()
566 TCPStateToString(stream)); in HandleApplicationCalls()
569 stream->cb_events |= MOS_ON_CONN_START | in HandleApplicationCalls()
572 if (stream->pair_stream != NULL) in HandleApplicationCalls()
573 stream->pair_stream->cb_events |= in HandleApplicationCalls()
576 AddtoControlList(mtcp, stream, cur_ts); in HandleApplicationCalls()
580 while ((stream = StreamDequeue(mtcp->sendq))) { in HandleApplicationCalls()
581 stream->sndvar->on_sendq = FALSE; in HandleApplicationCalls()
582 AddtoSendList(mtcp, stream); in HandleApplicationCalls()
586 while ((stream = StreamDequeue(mtcp->ackq))) { in HandleApplicationCalls()
587 stream->sndvar->on_ackq = FALSE; in HandleApplicationCalls()
588 EnqueueACK(mtcp, stream, cur_ts, ACK_OPT_AGGREGATE); in HandleApplicationCalls()
594 while ((stream = StreamDequeue(mtcp->closeq))) { in HandleApplicationCalls()
595 struct tcp_send_vars *sndvar = stream->sndvar; in HandleApplicationCalls()
601 sndvar->fss = stream->snd_nxt; in HandleApplicationCalls()
605 RemoveFromTimeoutList(mtcp, stream); in HandleApplicationCalls()
607 if (stream->have_reset) { in HandleApplicationCalls()
609 if (stream->state != TCP_ST_CLOSED_RSVD) { in HandleApplicationCalls()
610 stream->close_reason = TCP_RESET; in HandleApplicationCalls()
611 stream->state = TCP_ST_CLOSED_RSVD; in HandleApplicationCalls()
612 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
613 TRACE_STATE("Stream %d: TCP_ST_CLOSED_RSVD\n", stream->id); in HandleApplicationCalls()
614 DestroyTCPStream(mtcp, stream); in HandleApplicationCalls()
621 StreamInternalEnqueue(mtcp->closeq_int, stream); in HandleApplicationCalls()
632 if (stream->state == TCP_ST_ESTABLISHED) { in HandleApplicationCalls()
633 stream->state = TCP_ST_FIN_WAIT_1; in HandleApplicationCalls()
634 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
635 TRACE_STATE("Stream %d: TCP_ST_FIN_WAIT_1\n", stream->id); in HandleApplicationCalls()
637 } else if (stream->state == TCP_ST_CLOSE_WAIT) { in HandleApplicationCalls()
638 stream->state = TCP_ST_LAST_ACK; in HandleApplicationCalls()
639 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
640 TRACE_STATE("Stream %d: TCP_ST_LAST_ACK\n", stream->id); in HandleApplicationCalls()
642 stream->control_list_waiting = TRUE; in HandleApplicationCalls()
644 } else if (stream->state != TCP_ST_CLOSED_RSVD) { in HandleApplicationCalls()
646 if (stream->state == TCP_ST_ESTABLISHED) { in HandleApplicationCalls()
647 stream->state = TCP_ST_FIN_WAIT_1; in HandleApplicationCalls()
648 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
649 TRACE_STATE("Stream %d: TCP_ST_FIN_WAIT_1\n", stream->id); in HandleApplicationCalls()
651 } else if (stream->state == TCP_ST_CLOSE_WAIT) { in HandleApplicationCalls()
652 stream->state = TCP_ST_LAST_ACK; in HandleApplicationCalls()
653 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
654 TRACE_STATE("Stream %d: TCP_ST_LAST_ACK\n", stream->id); in HandleApplicationCalls()
658 AddtoControlList(mtcp, stream, cur_ts); in HandleApplicationCalls()
668 stream = StreamInternalDequeue(mtcp->closeq_int); in HandleApplicationCalls()
670 if (stream->sndvar->on_control_list) { in HandleApplicationCalls()
671 StreamInternalEnqueue(mtcp->closeq_int, stream); in HandleApplicationCalls()
673 } else if (stream->state != TCP_ST_CLOSED_RSVD) { in HandleApplicationCalls()
675 stream->sndvar->on_closeq_int = FALSE; in HandleApplicationCalls()
676 if (stream->state == TCP_ST_ESTABLISHED) { in HandleApplicationCalls()
677 stream->state = TCP_ST_FIN_WAIT_1; in HandleApplicationCalls()
678 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
679 TRACE_STATE("Stream %d: TCP_ST_FIN_WAIT_1\n", stream->id); in HandleApplicationCalls()
681 } else if (stream->state == TCP_ST_CLOSE_WAIT) { in HandleApplicationCalls()
682 stream->state = TCP_ST_LAST_ACK; in HandleApplicationCalls()
683 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
684 TRACE_STATE("Stream %d: TCP_ST_LAST_ACK\n", stream->id); in HandleApplicationCalls()
686 AddtoControlList(mtcp, stream, cur_ts); in HandleApplicationCalls()
688 stream->sndvar->on_closeq_int = FALSE; in HandleApplicationCalls()
694 while ((stream = StreamDequeue(mtcp->resetq))) { in HandleApplicationCalls()
695 stream->sndvar->on_resetq = FALSE; in HandleApplicationCalls()
698 RemoveFromTimeoutList(mtcp, stream); in HandleApplicationCalls()
700 if (stream->have_reset) { in HandleApplicationCalls()
701 if (stream->state != TCP_ST_CLOSED_RSVD) { in HandleApplicationCalls()
702 stream->close_reason = TCP_RESET; in HandleApplicationCalls()
703 stream->state = TCP_ST_CLOSED_RSVD; in HandleApplicationCalls()
704 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
705 TRACE_STATE("Stream %d: TCP_ST_CLOSED_RSVD\n", stream->id); in HandleApplicationCalls()
706 DestroyTCPStream(mtcp, stream); in HandleApplicationCalls()
711 } else if (stream->sndvar->on_control_list || in HandleApplicationCalls()
712 stream->sndvar->on_send_list || stream->sndvar->on_ack_list) { in HandleApplicationCalls()
714 stream->sndvar->on_resetq_int = TRUE; in HandleApplicationCalls()
715 StreamInternalEnqueue(mtcp->resetq_int, stream); in HandleApplicationCalls()
718 if (stream->state != TCP_ST_CLOSED_RSVD) { in HandleApplicationCalls()
719 stream->close_reason = TCP_ACTIVE_CLOSE; in HandleApplicationCalls()
720 stream->state = TCP_ST_CLOSED_RSVD; in HandleApplicationCalls()
721 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
722 TRACE_STATE("Stream %d: TCP_ST_CLOSED_RSVD\n", stream->id); in HandleApplicationCalls()
723 AddtoControlList(mtcp, stream, cur_ts); in HandleApplicationCalls()
734 stream = StreamInternalDequeue(mtcp->resetq_int); in HandleApplicationCalls()
736 if (stream->sndvar->on_control_list || in HandleApplicationCalls()
737 stream->sndvar->on_send_list || stream->sndvar->on_ack_list) { in HandleApplicationCalls()
739 StreamInternalEnqueue(mtcp->resetq_int, stream); in HandleApplicationCalls()
742 stream->sndvar->on_resetq_int = FALSE; in HandleApplicationCalls()
744 if (stream->state != TCP_ST_CLOSED_RSVD) { in HandleApplicationCalls()
745 stream->close_reason = TCP_ACTIVE_CLOSE; in HandleApplicationCalls()
746 stream->state = TCP_ST_CLOSED_RSVD; in HandleApplicationCalls()
747 stream->cb_events |= MOS_ON_TCP_STATE_CHANGE; in HandleApplicationCalls()
748 TRACE_STATE("Stream %d: TCP_ST_CLOSED_RSVD\n", stream->id); in HandleApplicationCalls()
749 AddtoControlList(mtcp, stream, cur_ts); in HandleApplicationCalls()
757 while ((stream = StreamDequeue(mtcp->destroyq))) { in HandleApplicationCalls()
758 DestroyTCPStream(mtcp, stream); in HandleApplicationCalls()
1192 mtcp->smap[i].stream = NULL; in InitializeMTCPManager()
1501 i, TCPStateToString(mtcp->smap[i].stream)); in mtcp_free_context()
1503 DumpStream(mtcp, mtcp->smap[i].stream); in mtcp_free_context()