Subject: Re: sendfile()? Re: SO_LINGER dead: I get an immediate RST on 2.6.24?

From: Evgeniy Polyakov <[email-masked]>
Date: Mon, 12 Jan 2009 02:18:59 +0300

On Mon, Jan 12, 2009 at 12:08:24AM +0100, bert hubert ([email-masked]) wrote:
> I fully understand. Sometimes I have to talk to stupid devices though. What
> I do find is the TCP_INFO ioctl, which offers this field in struct tcp_info:
> 
>         __u32   tcpi_unacked;
> 
> Which comes from:
> 
> struct tcp_sock {
> ...
>         u32     packets_out;    /* Packets which are "in flight"        */
> ...
> }
> 
> If this becomes 0, perhaps this might tell me everything I sent was acked?

0 means that there are noin-flight packets, which is effectively number
of unacked packets. So if your application waits for this field to
become zero, it will wait for all sent packets to be acked.

-- 
	Evgeniy Polyakov