This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: struct msghdr in socket.h is wrong


On Oct 15 22:23, Sam Steingold wrote:
> > * Corinna Vinschen <pbevaan-pltjva@pltjva.pbz> [2005-10-12 22:42:34 +0200]:
> >
> > On Oct 12 15:17, Sam Steingold wrote:
> >> cyswin/socket.h:
> >> 
> >> struct msghdr
> >> {
> >> 	void	*	msg_name;	/* Socket name			*/
> >> 	int		msg_namelen;	/* Length of name		*/
> >> 	struct iovec *	msg_iov;	/* Data blocks			*/
> >> 	int		msg_iovlen;	/* Number of blocks		*/
> >> 	void	*	msg_accrights;	/* Per protocol magic (eg BSD file descriptor passing) */
> >> 	int		msg_accrightslen;	/* Length of rights list */
> >> };
> >
> > This is the so called "older" implementation of struct msghdr as
> > defined up to 4.2BSD.  Since it's quite useless so far and since
> 
> I am not sure I quite understand what you mean by useless.
> is cygwin implementation somehow deficient?
> 
sendmsg and recvmsg don't utilize the msg_accrights/msg_accrightslen member.

> > applications using this structure should accomodate the old
> > implementation anyway, I don't see a good reason to change this right
> > now.
> 
> the only reason applications have to accommodate the old implementation
> is that some unixes still stick with it.

So, from a portability perspective...

> if you switch to the posix msghdr, I, for one, would not have to
> accomodate the old implementation.

I won't change it now.  I'll change it at one point when there's some
functionality.

Hint: Applications using only the first four members of this structure
will be binary compatible...


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]