Re: Problem with unix sockets: SOCK_DGRAM ignores MSG_TRUNC

2007-02-07 Thread Daniel Kabs
On Monday 05 February 2007 01:52, David Miller wrote: > What UDP is doing is different, it's returning the full packet length > when the packet is larger then the given buffer size, but it does this > irregardless of whether you set MSG_TRUNC in the recvmsg() passed-in > flags. UDP itself sets the

Re: Problem with unix sockets: SOCK_DGRAM ignores MSG_TRUNC

2007-02-07 Thread Daniel Kabs
On Tuesday 06 February 2007 21:11, David Schwartz wrote: > > Why not improve consistency and make unix_dgram_recvmsg() return the > > full packet length? So it would behave as UDP does. What do you think > > about adding the following code to linux/net/unix/af_unix.c: > > It would be nice if the wo

Re: Problem with unix sockets: SOCK_DGRAM ignores MSG_TRUNC

2007-02-06 Thread Daniel Kabs
On Monday 05 February 2007 01:52, David Miller wrote: > > Thus I used recv() with flags MSG_TRUNC|MSG_PEEK in order to detect > > message truncation due to insufficient buffer size. > > What part of "Only valid for packet sockets" from the manual page > escapes you? :-)) > It's a feature which onl

Problem with unix sockets: SOCK_DGRAM ignores MSG_TRUNC

2007-01-29 Thread Daniel Kabs
->len - sizeof(struct udphdr); ... Why doesn't unix_dgram_recvmsg() in linux/net/unix/af_unix.c contain code to this effect? Is this a feature or a bug? What is the correct semantics of MSG_TRUNC when used for unix sockets? Cheers Daniel Kabs PS: According to some lkml archives, my

unix(7) and MSG_TRUNC semantics

2007-01-11 Thread Daniel Kabs
doesn't unix_dgram_recvmsg() in linux/net/unix/af_unix.c contain code to this effect? Is this a feature or a bug? Cheers Daniel Kabs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vge