Boost logo

Boost :

From: Oliver.Kowalke_at_[hidden]
Date: 2007-02-08 07:48:35


> The recvmsg() function call uses a msghdr structure to
> minimize the number of directly supplied parameters. This
> structure is defined in <sys/socket.h> and includes the fol-
> lowing members:
>
> caddr_t msg_name; /* optional address */
> int msg_namelen; /* size of address */
> struct iovec *msg_iov; /* scatter/gather array */
> int msg_iovlen; /* # elements in msg_iov */
> caddr_t msg_accrights; /* access rights sent/received
> */
> int msg_accrightslen;
>
> Based on this information I have replaced all the
> occurrences of msg.msg_control = 0; msg.msg_controllen = 0;
> msg.msg_flags = 0; With msg.msg_accrights = 0;
> msg.msg_accrightslen = 0;

This is the same behaviour on HP/UX. Without _XOPEN_SOURCE_EXTENDED (on
HP/UX) you get the old HP/UX specific socket api (-> different structes
like struct msghdr). The same seams to apply to Solaris 10. Maybe you
can find an hint in the documention for a special compiler flag in order
to get X/Open compliant functions and structures as Christopher uses in
its code. It would be cumbersome to manage each special UNIX flaviour
socket api in you code. Using an standardized api would be better for
future investments and because the UNIX supplier can deprecate its old
socket api too in future.

Oliver


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk