Joachim Worringen writes:
> Is ancillary data is used by many real-world applications? I have never 
> seen it (which does not mean much, though).

Yes.  See socket.h(3HEAD) and ip(7P).  The supported ancillary data
messages are listed there.  You need this feature if you want to read
credentials on local sockets, receive information about your IP peer,
or control how the packets are transmitted on a packet-by-packet
basis.

It's used all over the place.  Search for Makefile* with -lxnet --
it's commonly used by routing applications, the DHCP client, and
applications where we have to do something special with the packets.

> ./uts/common/fs/sockfs/socksyscalls.c
>       case SOV_XPG4_2:
>           (version != SOV_XPG4_2) ? 0 : _SOCONNECT_XPG4_2, CRED());
>           &optlen_res, (version != SOV_XPG4_2) ? 0 : _SOGETSOCKOPT_XPG4_2,

Those are fairly important.

> > Anything that calls __xnet_socket directly is broken.  I hope it's
> > actually calling socket() and compiling with the right flags ...
> 
> Yes, I checked the source, they use socket(). However, I wonder how this 
> is mapped to __xnet_socket as
> - no _XOPEN_SOURCE define anywhere, only _XOPEN_XPG4 is set, which 
> should not trigger this remapping
> - -lxnet is only used as a "hack" - from configure.in (the only 
> occurence of -lxnet):

I'm not familiar with that application; you'll have to ask the
developers of it for more information.

> I guess I have to ask some MySQL people I know. Seems they compile their 
> binaries for publishing from different sources.

Yes.

> >> The reason why I care at all is that we are implementing plug-in sockets 
> >> for low-latency communication (see project volo).
> > 
> > Sounds good ... but both XPG and old-style sockets are required.
> 
> old-style is BSD here, right?

Yes, where you have msg_accrights (descriptor passing only) in 'struct
msghdr' instead of msg_control and msg_controllen (ancillary data).

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to