Re: Linux recvfrom() broken (was: DNS problems)

Mark Delany (markd@mira.net)
Wed, 19 Aug 1998 08:03:02 -0900


>"Upon successful completion the functions return the number of octets
> received"
>
>Unfortunately it does not say if the 'number of octets received' is the
>number copied or the number removed from the queue. 2.0 interprets it
>as the number removed from the queue. Im not sure what 2.1 does - I would
>assume nobody gratuitiously changed the API.

>The only way to answer this one is for someone wiht the right links to
>refer the question to the POSIX 1003.1g committee for clarification. I
>could certainly build a convincing case for either side here.

Hmm. Is there any other data exchanging system call that returns the bytes
available in the queue rather than the bytes transferred to/from user-space?

It strikes me as semantically surprising to have a "bytes-received" value
returned into user space that is greater than the supplied buffer length as
it breaks the most I/O common coding constructs. But as you say, maybe 1003.1g
had other considerations on their mind.

Regards.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html