[bind10-dev] Resend: Re: proposed system design and inter-process protocol for shared memory

Francis Dupont fdupont at isc.org
Thu Mar 7 10:25:30 UTC 2013


> As a matter of fact, I still believe that is TCP.

=> no, PF_UNIX doesn't use any network protocol: it just moves buffers.

> The socket is created with something like:
> 
>   socket(AF_UNIX, SOCK_STREAM, 0)

=> should be PF_UNIX in place of AF_UNIX even protocol families and
address families have always the same value.

> I guess this is clear enough (from man socket):

=> ah! Why it is not TP4? Or any other stream transport protocol?

BTW please remember PF_UNIX SOCK_STREAM provides really a stream
so doesn't preserve packet boundaries! If for instance you use one
to send two control messages in two send()s, a recv()s at the
other end can return the first message or both. I had already
a trouble with this (solved by moving to SOCK_DGRAM which was
I needed in fact) and of course debugging had enough impact
to never show this phenomenon (:-)...

A final note: PF_UNIX is UNIX, not POSIX. So it is NOT portable.
TCP to 127.0.0.1 or ::1 provides the same abstraction and is
portable (at the exception of the Windows 8 modern UI where it
is a privileged operation but this environment will *never*
support a "desktop" application like BIND 10).

Regards

Francis.Dupont at fdupont.fr


More information about the bind10-dev mailing list