tp->bytes_acked = 0; 
int tcp_disconnect(struct sock *sk, int flags){	struct inet_sock *inet = inet_sk(sk);	struct inet_connection_sock *icsk = inet_csk(sk);	struct tcp_sock *tp = tcp_sk(sk);	int err = 0;	int old_state = sk->sk_state;	if (old_state != TCP_CLOSE)		tcp_set_state(sk, TCP_CLOSE);	/* ABORT function of RFC793 */	if (old_state == TCP_LISTEN) {		inet_csk_listen_stop(sk);	} else if (tcp_need_reset(old_state) ||		   (tp->snd_nxt != tp->write_seq &&		    (1 << old_state) & (TCPF_CLOSING | TCPF_LAST_ACK))) {		/* The last check adjusts for discrepance of Linux wrt. RFC		 * states		 */		tcp_send_active_reset(sk, gfp_any());		sk->sk_err = ECONNRESET;	} else if (old_state == TCP_SYN_SENT)		sk->sk_err = ECONNRESET;	tcp_clear_xmit_timers(sk);	__skb_queue_purge(&sk->sk_receive_queue);	sk_stream_writequeue_purge(sk);	__skb_queue_purge(&tp->out_of_order_queue);	inet->dport = 0;	if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK))		inet_reset_saddr(sk);	sk->sk_shutdown = 0;	sock_reset_flag(sk, SOCK_DONE);	tp->srtt = 0;	if ((tp->write_seq += tp->max_window + 2) == 0)		tp->write_seq = 1;	icsk->icsk_backoff = 0;	tp->snd_cwnd = 2;	icsk->icsk_probes_out = 0;	tp->packets_out = 0;	tp->snd_ssthresh = 0x7fffffff;	tp->snd_cwnd_cnt = 0;	tcp_set_ca_state(sk, TCP_CA_Open);	tcp_clear_retrans(tp);	inet_csk_delack_init(sk);	sk->sk_send_head = NULL;	tp->rx_opt.saw_tstamp = 0;	tcp_sack_reset(&tp->rx_opt);	__sk_dst_reset(sk);	BUG_TRAP(!inet->num || icsk->icsk_bind_hash);	sk->sk_error_report(sk);	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/9772efb970780aeed488c19d8b4afd46c3b484af/tcp.c/clean/net/ipv4/tcp.c