[Top] [All Lists]

TCP: sendmsg/recvmsg/ioctl(SIOCINQ/SIOCOUTQ)

To: netdev@xxxxxxxxxxx
Subject: TCP: sendmsg/recvmsg/ioctl(SIOCINQ/SIOCOUTQ)
From: "James R. Leu" <jleu@xxxxxxxxxxxxxx>
Date: Thu, 11 Jan 2001 16:42:31 -0600
In-reply-to: <>; from on Thu, Jan 11, 2001 at 01:29:01PM -0000
Organization: none
References: <>
Reply-to: jleu@xxxxxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
It seems that TCPs recvmsg/sendmsg and ioctl for SIOCINQ/SIOCOUTQ do not
check to make sure the socket is connected.

I was unable to find a place that does check to make sure the socket is
connected before doig the above socket ops.

Is it adequte to do:

                if (sk->state != TCPF_ESTABLISHED)

to determin if a TCP socket is connected?  Where should this check (or another
more appropriate check) be made?


PS I'm working with 2.4.0
James R. Leu

<Prev in Thread] Current Thread [Next in Thread>