From: Askar Safin <safinaskar@zohomail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org
Subject: [PATCH] ip(7), ipv6(7): small fixes: network byte order, etc
Date: Sun, 12 May 2024 01:16:57 +0300 [thread overview]
Message-ID: <20240511221801.27666-1-safinaskar@zohomail.com> (raw)
Signed-off-by: Askar Safin <safinaskar@zohomail.com>
---
man/man7/ip.7 | 2 +-
man/man7/ipv6.7 | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/man/man7/ip.7 b/man/man7/ip.7
index 4fc9bde..8678979 100644
--- a/man/man7/ip.7
+++ b/man/man7/ip.7
@@ -198,7 +198,7 @@ The
member of
.I struct in_addr
contains the host interface address in network byte order.
-.I in_addr
+.I s_addr
should be assigned one of the
.B INADDR_*
values
diff --git a/man/man7/ipv6.7 b/man/man7/ipv6.7
index d9241cc..e38658f 100644
--- a/man/man7/ipv6.7
+++ b/man/man7/ipv6.7
@@ -105,7 +105,7 @@ Only differences are described in this man page.
.P
To bind an
.B AF_INET6
-socket to any process, the local address should be copied from the
+socket to any interface, the address should be copied from the
.I in6addr_any
variable which has
.I in6_addr
@@ -138,14 +138,14 @@ its source address will be mapped to v6.
.EX
struct sockaddr_in6 {
sa_family_t sin6_family; /* AF_INET6 */
- in_port_t sin6_port; /* port number */
+ in_port_t sin6_port; /* port number in network byte order */
uint32_t sin6_flowinfo; /* IPv6 flow information */
struct in6_addr sin6_addr; /* IPv6 address */
uint32_t sin6_scope_id; /* Scope ID (new in Linux 2.4) */
};
\&
struct in6_addr {
- unsigned char s6_addr[16]; /* IPv6 address */
+ unsigned char s6_addr[16]; /* IPv6 address in network byte order */
};
.EE
.in
@@ -154,14 +154,14 @@ struct in6_addr {
is always set to
.BR AF_INET6 ;
.I sin6_port
-is the protocol port (see
+is the protocol port in network byte order (see
.I sin_port
in
.BR ip (7));
.I sin6_flowinfo
is the IPv6 flow identifier;
.I sin6_addr
-is the 128-bit IPv6 address.
+is the 128-bit IPv6 address in network byte order.
.I sin6_scope_id
is an ID depending on the scope of the address.
It is new in Linux 2.4.
--
2.43.0
next reply other threads:[~2024-05-11 22:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-11 22:16 Askar Safin [this message]
2024-05-17 21:15 ` [PATCH] ip(7), ipv6(7): small fixes: network byte order, etc Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240511221801.27666-1-safinaskar@zohomail.com \
--to=safinaskar@zohomail.com \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).