[964] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Rejecting tcp connections before accept()

daemon@ATHENA.MIT.EDU (Stephen R. van den Berg)
Wed Aug 23 01:17:20 1995

From: srb@cuci.nl (Stephen R. van den Berg)
Date: Tue, 22 Aug 1995 10:26:11 +0200
In-Reply-To: Mike Shaver's message as of 1995 Aug 21 Mon  7:13.
       <199508211113.HAA01191@neon.ingenia.com>
To: linux-net@vger.rutgers.edu

Mike Shaver <shaver@neon.ingenia.com> wrote:
>Or you could add a hear() system call that would return a struct
>something *, which could be checked for stuff like source and
>destination address and port before calling accept()...

Not necessary.  Simply give getpeername() the ability to operate
on the socket you are listening on.  It should then return the
address of the next connection that is to be accepted.
But you still need an ioctl() of sorts to throw away the connection
is you don't want it.
-- 
Sincerely,                                                          srb@cuci.nl
           Stephen R. van den Berg (AKA BuGless).

In this signature, the concluding three words `were left out'.

home help back first fref pref prev next nref lref last post