Subject: Re: erroneous ack packet, ideas please?
To: Andrew Brown <codewarrior@daemon.org>
From: Stefan Grefen <grefen@hprc.tandem.com>
List: tech-net
Date: 07/21/1997 09:09:36
In message <199707191857.OAA20219@untraceable.net>  Andrew Brown wrote:
> > From: Stefan Grefen
> >> From: Duncan McEwan
> >> I think Stefan's point was not that the facility already existed, but that the
> >> interface existed (for iso sockets) and therefore the "right" solution would
> >> be
> >> to extend that interface to apply to ip sockets, rather than invent a new 
> >> ioctl
> >> to do the job.  If my interpretation was wrong, just ignore me :-)
> >
> >This is the correct interpretation. 
> >I think having more than interface for the same basic thing is bad.
> >The eager sockets are doing excatly what the ISO protocols are doing, just
> >dequeing the request without sneding an ack/nack to the other site.
> >BTW. I had a look at this before, and I think the code is already in the
> >generic socket-code. All that is needed is a change in tcp_usrreq, to establish
> >or reject the connection as needed.
> 
> granted, i haven't looked at current code (but i will soon :), but i
> think it's a little more than just a "change in tcp_usrreq" since in
> the code i'm reading (1.2), tcp_input() does all the handling of
> sockets in the semi-opened state.  a lot of the hacery i'm doing is in
> there.  the rest (a little in kern/sys_socket.c to dispatch the
> ioctl(), two bits in netinet/tcp_usrreq.c to handle the setsockopt()
> and getsockopt(), and three #defines and a prototype in netinet/tcp.h,
> netinet/tcp_var.h, and sys/sockio.h) is miniscule.

I was talking only about replacing the ioctls to do the accept/reject 
(just to make that clear).
You would call the same functions the ioctl calls, when an implicit state-change 
is needed. (a read/write on not yet connected socket (do the accept) and the
right thing on recv/sendmsg calls without data pointers. 
I think this is of the same complexity than the ioctls, it just makes the calls
from a different place.

> 
> >If don't want to change things there, I offer to do it.
> 
> most of what i planned to do is now done.  all i have to do is "port"
> it to current in order to make it the least bit useful...

Again only the ioctl replacement ... 

Stefan

> 
> -- 
> |-----< "CODE WARRIOR" >-----|
> andrew@echonyc.com (TheMan)        * "ah!  i see you have the internet
> codewarrior@daemon.org                               that goes *ping*!"
> warfare@graffiti.com      * "information is power -- share the wealth."

--
Stefan Grefen                                Tandem Computers Europe Inc.
grefen@hprc.tandem.com                       High Performance Research Center
If a group of N persons implements a COBOL compiler, there will be N-1
passes.  Someone in the group has to be the manager.
                -- T. Cheatham