In IPv4,IP_MTU is only supported by getsockopt.
In IPv6, we can use IPV6_MTU to set socket's MTU,
but the return value of getsockopt() is the path MTU.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
When SO_SNDTIMEO is set before connect(), then connect()
may return EWOULDBLOCK when the timeout fires.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Notes from Bert Hubert:
Recently PowerDNS needed to support the getting of the
original destination address of packets received on ::.
Following the advice in ipv6(7) generated an error on
setsockopt().
Some googling confirmed that setsockopt() with
IPV6_PKTINFO indeed does not work, but we found that
IPV6_RECVPKTINFO did.
Our experiences are detailed in
http://bert-hubert.blogspot.nl/2012/10/on-binding-datagram-udp-sockets-to-any.html
Please find attached a quite naive patch to ipv6.7 that at
least fixes 'my' problem, but does not document if
IPV6_PKTINFO ever worked as a flag. It does document that
IPV6_RECVPKTINFO is available since 2.6.13.
Please let me know if this patch is acceptable, or if you
want me to dig deeper into the IPV6_PKTINFO situation.
Notes from mtk:
Drop mention of IPV6_PKTINFO; that's IPV6_2292PKTINFO nowadays
(and needs to be documented). And, confusingly, there's nowadays
an IPV6_PKTINFO that is a quite different thig.
With kernel commit 333fad5364d6b457c8d837f7d05802d2aaf8a961
(Sep 2005) PV6_PKTINFO disappeared from the
getsockopt/setsockopt API, and IPV6_2292PKTINFO took its place.
Meanwhile, IPV6_RECVPKTINFO was added.
Then kernel commit b24a2516d10751d7ed5afb58420df25370c9dffb
(Dec 2008) added IPV6_PKTINFO back to the
getsockopt/getsockopt API, but with what looks to be a
rather different meaning (it takes a 'struct in6_pktinfo'
as the third arg).
This seems consistent (if confusing) with the RFCs:
http://www.ietf.org/rfc/rfc2292.txthttp://www.ietf.org/rfc/rfc3542.txt (obsoletes 2292)
Both of those RFCs define an IPV6_PKTINO sockopt, but the
former takes an int arg, and the latter takes a
'struct in6_pktinfo'.
So, my summary of your patch is that it's correct. (But I think
that IPV6_RECVPKTINFO is present since 2.6.14, not 2.6.13.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The line(s) in the NAME section should only use capitals
where English usage dictates that. Otherwise, use
lowercase throughout.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Existing pages variously use "userspace or "user space".
But, "userspace" is not quite an English word.
So change "userspace" to "user space" or, when used
attributively, "user-space".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
For a better visual result, disable justification and hyphenation
in SEE ALSO where page names are long.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
<groff: iso_8859-2.7>:89: warning: can't find special character `shc'
This is the only "iso_8859-*.7" file that has this (now)
undefined character. The code in column four in "iso_8859-1.7" is
"0x2D" ("HYPHEN, MINUS SIGN" or "HYPHEN-MINUS") instead of "0xAD".
See Debian bug 156154 (or package "manpages").
There should be an explanation for this graphic character and the
code should be 0xAD in iso_8859-1.7 (as in all others), even
though "[gn]roff" does not display a "HYPHEN" in that position of
the table.
The line with "SOFT HYPHEN" gets a footnote and a short
explanation.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The syntax .UR http://example.com paired with .UE will create
links which one can interact, if the pager allows that. One
way to see the effect is ask the man(1) command to use browser
display, e.g.:
man -H man7/uri.7
("\:" is optional groff syntax to permit hyphenless line breaks.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
uri(7) documents that "Older documents suggested inserting the
prefix 'URL:' just before the URI, but this form has never
caught on." and advise to "enclosed in angle brackets" (and a
few other alternatives).
This patch removes an instance of 'URL:' from the page.
Reported-By: Denis Barbier <bouzim@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As reported by Herbert Xu, these should not be considered as PIDs.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383296
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The man page formerly noted the bash(1) v1 command to do this.
Reported-by: Aaron Peschel <aaron.peschel@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Commit 4a19ec5800fc3bb64e2d87c4d9fdd9e636086fe0 in Jan 2008 added
the new SO_MARK socket option.
This patch is based on text from the commit message.
See https://bugzilla.kernel.org/show_bug.cgi?id=16461.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fis warning from "groff -ww ..." (or "man --warnings=w ..."):
<groff: mdoc.7>:294: warning:
tab character in unquoted macro argument
In one table the distance between columns is too small in the
"ps" output. (Bug in the groff "doc.tmac" macro?)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
From "man -ww ..." (groff -ww ...):
<standard input>:541: warning:
tab character in unquoted macro argument
[+3 similar warnings]
<standard input>:813: warning: macro `Pu' not defined
Usage: .Rv -std in sections 2 and 3 only (#1669)
mdoc warning: A .Bl directive has no matching .El (#1821)
String "Pu" defined as a row of punctuation characters.
".Bl" and ".El" fixed.
Some arguments, that start with a period or are the name of a
macro, protected with "\&".
Variable name for macro ".Rv" corrected.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix warning from "man ..." ("nroff -ww ..."):
nroff: netlink.7: warning: around line 195:
table wider than line width
Horizontal line incorporated into table.
No right adjustment of text blocks in tables.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673875
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix warning from "man ..." ("nroff -ww ..."):
nroff: rtnetlink.7: warning: around line 415:
table wider than line width
Column gutter reduced to fit line length.
Right adjustment in text blocks removed in tables.
Some header made centered in tables.
One table put on same page.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674051
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Including <sys/types.h> and <sys/ipc.h> isn't needed on Linux
and isn't really relevant for the explanation on this page.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
There's no need to mention that the 'ipc_perm' structure
is defined in <sys/ipc.h>. That's an implementation detail,
and furthermore <sys/ipc.h> is itself included by the other
System V IPC header files. The current text might lead the
reader to conclude that they must include <sys/ipc.h>, which
is not the case (it is required neither on Linux, nor by the
standards).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix warning from "man ..." ("nroff -ww ..."):
nroff: netdevice.7: warning: around line 98:
table wider than line width
Fix: No right adjustment in text blocks in tables.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673873
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man(1) on the present page yields errors:
grotty: ... character above first line discarded
The culprit is "Dl 0 -xxxx" (vertical line) where "xxxx" is
one line (40 nroff units) too long. Or there is a bug in
"grotty". "nroff" or "tbl" makes an empty line where a page is.
The patch fixes the problem by setting the page length to
a large value.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673436
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
From "nroff -ww -t ...":
warning: around line 44: table wider than line width
Columns are made narrower (column gutter decreased).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Fix following from "groff -t -ww ...":
warning: around line 53: table wider than line width
Extra indent for "troff" makes the table look misplaced
(default "ps" output).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Some of the sockets/network protocol pages included names of
the corresponding address family constants in the NAME line,
but this wasn't done consistently across all pages, and probably
it adds little value in those pages that did do this. So, remove
these constants from those pages that have them in the NAME
section.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
It must be a very long time since the statement there
about SIGLOST was true. (The text seems to date back to
1996.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This patch clarifies that 0xc0 and 0xc1 are not valid in any UTF-8
encoding[0], and it also references RFC 3629 instead of RFC 2279.
[0] In order to have 0xc0, you'd have to have a two-byte encoding
with all the data bits zero in the first byte (and thus only six
bits of data), which would be an ASCII character encoded in the
non-shortest form. Similarly with 0xc1.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=538641
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
A change in 2.6.28 restored the 2.2 behavior:
https://lkml.org/lkml/2009/6/30/499
Reported-by: lepton <ytht.net@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
In tcp.7, about TCP_MAXSEG, it reads
If this option is set before connection establishment,
it also changes the MSS value announced to the other
end in the initial packet.
It is correct for kernel version 2.2, but it is not
correct for modern kernel such as 2.4 and 2.6.
On a linux box with a modern kernel, the setting for
TCP_MAXSEG won't change the MSS value announced to the
other end.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As reported by Alexey:
socket(7) says:
SO_BROADCAST
Set or get the broadcast flag. When enabled, datagram sockets
receive packets sent to a broadcast address and they are allowed
to send packets to a broadcast address. This option has no
effect on stream-oriented sockets.
I believe the second sentence is half wrong: when I try it, it
only affects the ability to send broadcast datagrams. You can only
receive broadcast datagrams if you bind to INADDR_ANY and don't
connect. The POSIX standard agrees with my tests and disagrees
with the manpage:
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_10.html
Reported-by: Alexey Toptygin <alexeyt@freeshell.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This patch adds common but missing SIOC configuration ioctls to
the netdevice.7 manual pages that are not documented anywhere
else. SIOCSIFPFLAGS and SIOCGIFPFLAGS are linux-specific. Flag
values come from Linux 2.6.25 kernel headers for sockios. The
others are standard BSD ioctls that have alwasy been implemented
by Linux and were verified from inspecting netdevice.c kernel
code.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
As noted by reporter:
* The code sample given for the NAME section is incomplete because
the actual content sample is not given.
* Additionally, the description assumes that the item described is
a command, which need not be the case.
* The command makewhatis is not present on my system; the
documented tool to create the whatis database is called mandb.
* The description on .SH NAME in man(7) should either copy the
relevant paragraph of lexgrog(1) or refer to it.
Reported by: Kristof Zelechovski <giecrilj@stegny.2a.pl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Benjamin Poirier <benjamin.poirier@gmail.com>
Reported-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
I noticed what appears to be a discrepancy between the ip(7)
man page and the kernel code with regards to the IP DF flag
for UDP sockets.
The man page says that "The don't-fragment flag is set on all
outgoing datagrams" and that the ip_no_pmtu_disc sysctl affects
only SOCK_STREAM sockets. This is quickly disproved by doing:
echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc
firing up netcat and looking at a few outgoing UDP packets in
wireshark (they don't have the DF flag set).
1) in the words of `man 7 ip`:
IP_MTU_DISCOVER (since Linux 2.2)
Set or receive the Path MTU Discovery setting for a socket.
When enabled, Linux will perform Path MTU Discovery as defined
in RFC 1191 on this socket. The don't-fragment flag is set on
all outgoing datagrams. The system-wide default is controlled
by the /proc/sys/net/ipv4/ip_no_pmtu_disc file for SOCK_STREAM
sockets, and disabled on all others.
2) in net/ipv4/af_inet.c:inet_create():
if (ipv4_config.no_pmtu_disc)
inet->pmtudisc = IP_PMTUDISC_DONT;
else
inet->pmtudisc = IP_PMTUDISC_WANT;
and pmtudisc is left alone from there on for UDP sockets.
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Starting with Linux 2.6.33, the CONFIG_SECURITY_FILE_CAPABILITIES
has been removed, and file capabilities are always part of the
kernel.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This flag was added in Linux 2.6.36.
See kernel commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Please find inline another tiny patch in order to shrink
the definite article from some other pages (found with
"rgrep -i ' \\\- the' man*").
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The patch addresses the uppercase hexadecimal numbers
minor issue for iso_8859-10.7. Please note that this
patch also address a minor s/ca/CB/ typo.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
koi8-u.7 was not the only character set page displaying lowercase
hexadecimal numbers. The patch addresses this minor issue for
armscii-8.7 (other will follow, capitalized number are mostly used,
and that is the way they are presented in Unicode.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
koi8-u.7 seems to be the only character set page displaying
lowercase hexadecimal numbers. The inline patch address this
minor issue.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
he koi8-r(7) (Russian Net Character Set) manual page refers to
iso-8859-7(7) manual page, which is the Latin/Greek one. I guess it
should refer instead to the iso-8859-5(7) (Latin/Cyrillic) one. This is
addressed at the end of the patch.
It has also been spotted that letter names are different in this manual
page and in the Unicode related page [0], the first part of the page
address this.
0: http://www.unicode.org/charts/PDF/U0400.pdf
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>