<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 10, 2014 at 6:21 PM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
On Thu, Jul 10, 2014 at 03:31:37PM +0200, Bert Freudenberg wrote:<br>
<div class="">><br>
><br>
> On 10.07.2014, at 01:54, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
> > Hi Max,<br>
> ><br>
> > I've integrated, but there's a conflict with the Cog sources because there's already support for RAW sockets in the Qwaq/Terf VM. That means socket type 2 is already taken. So I've integrated like this:<br>
> ><br>
> > #define TCPSocketType 0<br>
> > #define UDPSocketType 1<br>
> > #ifdef HAVE_SD_DAEMON<br>
> > # define ProvidedTCPSocketType 2<br>
> > # define RAWSocketType 3<br>
> > #else<br>
> > # define RAWSocketType 2<br>
> > #endif<br>
> ><br>
> > But I would prefer to integrate this:<br>
> ><br>
> > #define TCPSocketType 0<br>
> > #define UDPSocketType 1<br>
> > # define RAWSocketType 2<br>
> > #define ProvidedTCPSocketType 3<br>
> ><br>
> > Is it too late for you to change the Smalltalk code so that ProvidedTCPSocketType is 3?<br>
><br>
</div>> Speaking of which, would it make sense to reserve more socket types?<br>
><br>
> According to <a href="http://www.freedesktop.org/software/systemd/man/systemd.socket.html" target="_blank">http://www.freedesktop.org/software/systemd/man/systemd.socket.html</a> there are TCP stream (SOCK_STREAM), UDP datagram (SOCK_DGRAM), and sequential packet (SOCK_SEQPACKET) sockets.<br>
><br>
> - Bert -<br>
><br>
<br>
There is quite a range of protocol families and socket types, so I'm not sure<br>
it is worth worrying about it too much right now. But I suppose we could adopt<br>
some sort of convention like this:<br>
<br>
<br>
#define TCPSocketType 0 /* SOCK_STREAM on AF_INET or AF_INET6 */<br>
#define UDPSocketTyp 1 /* SOCK_DGRAM on AF_INET or AF_INET6 */<br>
#define RAWSocketType 2 /* SOCK_RAW on AF_INET or AF_INET6 */<br>
#define SeqPacketSocketType 3 /* SOCK_SEQPACKET on AF_INET or AF_INET6 */<br>
#define ReliableDGramSocketType 4 /* SOCK_RDM on AF_INET or AF_INET6 */<br>
<br>
#define ReuseExistingSocket 256<br>
<br>
#define ProvidedTCPSocketType TCPSocketType + ReuseExistingSocket<br>
#define ProvidedUDPSocketType UDPSocketType + ReuseExistingSocket<br>
#define ProvidedRAWSocketType RAWSocketType + ReuseExistingSocket<br>
#define ProvidedSeqPacketSocketType SeqPacketSocketType + ReuseExistingSocket<br>
#define ProvidedReliableDGramSocketType ReliableDGramSocketType + ReuseExistingSocket<br></blockquote><div><br></div><div>+1. But let's use</div><div> </div><div>#define ReuseExistingSocket 65536<br>
</div><div><br></div><div>ok?</div></div><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>