[M3devel] New Socket.[im]3? was: Re: sin_len?

Dragiša Durić dragisha at m3w.org
Sun Aug 23 10:47:57 CEST 2009


There were once (and still is, but not only ones for IPv4) different
APIs for TCP and UDP. cmass people unified that in Socket.i3 API, but
only for IPv4... What we really need here is even more general
Socket.i3, covering AF_UNIX and IPv6...

To accomplish this, we have to generalize (OO-ize :) ) Socket.EndPoint
to include IPv4/IPv6/AF_UNIX (whatever it's called on Windows, named
pipe or...) addresses so Socket(Posix|WIN32).m3 can decide about how to
progress through related operations. 

Good news - Socket interface is unused from current cm3 source tree. Bad
news - we don't know about other clients to it. Good news - this is
Modula-3 and such changes are easy do detect and easier to change.

Thus said... This is probably nothing for 5.8 to care about. If others
agreee, and nobody does it, I can find some time in following months to
unify work I already have done for AF_UNIX and also to cook what is
needed for IPv6 (not much I believe).

And of course there's always a "but". What will we do about SCTP? 

On Sun, 2009-08-23 at 08:11 +0000, Jay K wrote:
> I was going to convert from a portable idealized form of struct_sockaddr_in/un, but I could only support AF_INET and AF_LOCAL/UNIX, and there are many others, so this isn't really viable. Instead I'll strive for the current approach of duplicating the headers reliably, in this small case.
>  
>  - Jay
> 
> 
> 
> 
> ----------------------------------------
> > From: jay.krell at cornell.edu
> > To: m3devel at elegosoft.com
> > Date: Sun, 23 Aug 2009 07:28:42 +0000
> > Subject: [M3devel] sin_len?
> >
> >
> > I'm looking to
> > - remove the platform dependency defining struct_sockaddr_in
> > - provide a platform independent struct_sockaddr_un
> >
> > What is the deal with the sin_len field?
> > We never fill it in?
> > It is difficult to find documentation as to the meaning of the field.
> >
> > There is this:
> >
> > http://lists.samba.org/archive/rsync/2002-February/001531.html
> >
> > But I believe we have always just left it as zero and I will probably do that.
> >
> >
> > I believe the historical practise here is out of date with IPv6 around, as well.
> >
> > - Jay
-- 
Dragiša Durić <dragisha at m3w.org>




More information about the M3devel mailing list