Subject: Re: Obtaining client IP address before accept(2)
To: David Laight <david@l8s.co.uk>
From: Jonathan Stone <jonathan@Pescadero.dsg.stanford.edu>
List: tech-kern
Date: 07/30/2005 06:06:16
In message <20050714180902.GD972@snowdrop.l8s.co.uk>,
David Laight writes:
>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).
[Catching up on old email....]
A paper from circa 1989 describing an ST-II implementation for a BSD
networking stack describes a socket-API extension which did precisely
the way Rob Newberry desires. If (dim) memory serves, Steve Pink &co
were involved.
(I'm browser-less right now, and my photocopy of the paper is very
deeply buried, so I can't provide a real citation. If you want one,
please email)