Why is the argument to sendmsg() typed this way?

Mark Boolootian booloo at lll-crg.llnl.gov
Sat Feb 2 08:43:42 AEST 1991


Someone recently brought to my attention the fact that the documentation ( for
at least BSD4.3) for sendmsg() showed the following prototype:

	cc = sendmsg(s,msg,flags)
	int cc,s;
	struct msghdr msg[];
	int flags;

I'd like to know if anyone has an explanation as to why the msghdr structure
is depicted as an array rather than a pointer.  Even if you did pass in an
array of msghdr's, sendmsg() only would consider the first structure in the
array.  Is there some obscure reason from the dim past as to why the documen-
tation shows the above?

Thanks in advance.  I would appreciate response via email.

cheers,
mb

--

booloo at lll-crg.llnl.gov



More information about the Comp.unix.wizards mailing list