Subject: Re: Obtaining client IP address before accept(2)
To: Rob Newberry <robthedude@mac.com>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 07/14/2005 19:09:02
On Wed, Jul 13, 2005 at 11:50:24PM -0700, Rob Newberry wrote:
> The sockets API on a TCP socket simply won't let you do what you want  
> (I read the rest of the thread, but I'm responding to the first  
> message).
> 
> STREAMS and he XTI interface did have a concept of this -- you could  
> get called back when the TCP SYN arrive.  You had the option of  
> "accepting" the connection (which would reply with another TCP SYN)  
> or rejecting it (sending a TCP RST).

Not on any of the STREAMs based TCP implementations I've seen.
IIRC the XTI for TCP explicitely states that the SYN-ACK will be
sent before any handshake with the application takes place.
(The same isn't true for typical implemetations of other protocols
using the XTI/TLI and STREAMS).

	David

-- 
David Laight: david@l8s.co.uk