The interfaces documented in this page are purely glibc.
Reported-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
When a 32-bit app opens a file whose size is too big to be
represented in 31-bits, POSIX.1 specifies the error EOVERFLOW.
Linux used to give EFBIG for this case, but 2.6.24 fixed this.
Also, add some text to describe the error scenario in
more detail.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Some errors were listed under a separate "may" heading.
There's probably no real need to do this; integrate
those errors into the main list.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Most other sockets pages are using the names 'addr'
and 'addrlen'; make these pages do the same.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
If the recvfrom() returned address is truncated, the 'fromlen'
argument indicates the actual size of the address, rather than
a count of the number of bytes in the truncated buffer.
Also clarify that the 'from' argument can be NULL, in which
case 'fromlen' should is unused, and should also be NULL.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
If the returned address is truncated, the 'addrlen' argument
indicates the actual size of the address, rather than a count
of the number of bytes in the truncated buffer.
Also clarify that if 'addr' argument is NULL, then 'addrlen'
should is unused, and should also be NULL.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Many sockets man pages use the name 'sockfd' already.
For consistency, changes the others to do so as well.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Mel Gorman reported that in Linux 2.6.27, 'addr' is rounded
down to a page boundary.
Before kernel 2.6.26, if 'addr' was taken as a hint, it was
rounded up to the next page boundary. Since Linux 2.6.24,
it is rounded down. Therefore, loosen the description of
this point to say that the address is rounded to "a nearby
page boundary".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Mel Gorman <mel@csn.ul.ie>
Internet datagram (since Linux 2.4.27/2.6.8),
and netlink (since Linux 2.6.22) sockets support
the MSG_TRUNC flag for recv(2).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Expand description of setdomainname() and getdomainname().
Note that getdomainname() is implemented as a library function
in glibc.
Note limits on size of domain name.
Reorganize ERRORS list.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Write a paragraph describing sethostname().
Clarify differences between glibc's gethostbyname() and
the kernel gethostbyname() system calls.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>