tcp_sockclosed(struct tcpcb *tp)

{



	DEBUG_CALL("tcp_sockclosed");

	DEBUG_ARG("tp = %p", tp);



	switch (tp->t_state) {



	case TCPS_CLOSED:

	case TCPS_LISTEN:

	case TCPS_SYN_SENT:

		tp->t_state = TCPS_CLOSED;

		tp = tcp_close(tp);

		break;



	case TCPS_SYN_RECEIVED:

	case TCPS_ESTABLISHED:

		tp->t_state = TCPS_FIN_WAIT_1;

		break;



	case TCPS_CLOSE_WAIT:

		tp->t_state = TCPS_LAST_ACK;

		break;

	}

	if (tp)

		tcp_output(tp);

}

tcp_sockclosed(struct tcpcb *tp)

{



	DEBUG_CALL("tcp_sockclosed");

	DEBUG_ARG("tp = %p", tp);



	switch (tp->t_state) {



	case TCPS_CLOSED:

	case TCPS_LISTEN:

	case TCPS_SYN_SENT:

		tp->t_state = TCPS_CLOSED;

		tp = tcp_close(tp);

		break;



	case TCPS_SYN_RECEIVED:

	case TCPS_ESTABLISHED:

		tp->t_state = TCPS_FIN_WAIT_1;

		break;



	case TCPS_CLOSE_WAIT:

		tp->t_state = TCPS_LAST_ACK;

		break;

	}

	if (tp)

		tcp_output(tp);

}

	if (tp) 		tcp_output(tp);
FUNC_0(struct tcpcb *VAR_0)

{



	DEBUG_CALL("FUNC_0");

	DEBUG_ARG("VAR_0 = %p", VAR_0);



	switch (VAR_0->t_state) {



	case TCPS_CLOSED:

	case TCPS_LISTEN:

	case TCPS_SYN_SENT:

		VAR_0->t_state = TCPS_CLOSED;

		VAR_0 = tcp_close(VAR_0);

		break;



	case TCPS_SYN_RECEIVED:

	case TCPS_ESTABLISHED:

		VAR_0->t_state = TCPS_FIN_WAIT_1;

		break;



	case TCPS_CLOSE_WAIT:

		VAR_0->t_state = TCPS_LAST_ACK;

		break;

	}

	if (VAR_0)

		tcp_output(VAR_0);

}

FUNC_0(struct tcpcb *VAR_0)
{ DEBUG_CALL("FUNC_0"); DEBUG_ARG("VAR_0 = %p", VAR_0); switch (VAR_0->t_state) { case TCPS_CLOSED:
case TCPS_LISTEN:
case TCPS_SYN_SENT:
VAR_0->t_state = TCPS_CLOSED; VAR_0 = tcp_close(VAR_0); break; case TCPS_SYN_RECEIVED:
case TCPS_ESTABLISHED:
VAR_0->t_state = TCPS_FIN_WAIT_1; break; case TCPS_CLOSE_WAIT:
VAR_0->t_state = TCPS_LAST_ACK; break; } if (VAR_0)
tcp_output(VAR_0); }