public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Subject: [PATCHv2] Move ip_mreqn structure from Linux to generic
Date: Mon, 15 Aug 2022 19:15:50 +0200	[thread overview]
Message-ID: <20220815171550.1747664-1-samuel.thibault@ens-lyon.org> (raw)

I.e. from sysdeps/unix/sysv/linux/bits/in.h to netinet/in.h

It is following both the BSD and Linux definitions.
---
 inet/netinet/in.h                 | 13 +++++++++++++
 sysdeps/unix/sysv/linux/bits/in.h |  8 --------
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index 1633bc64e4..362eb9e9e7 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -278,6 +278,19 @@ struct ip_mreq
     struct in_addr imr_interface;
   };
 
+/* IPv4 multicast request with interface index.  */
+struct ip_mreqn
+  {
+    /* IP multicast address of group.  */
+    struct in_addr imr_multiaddr;
+
+    /* Local IP address of interface.  */
+    struct in_addr imr_address;
+
+    /* Interface index.  */
+    int imr_ifindex;
+  };
+
 struct ip_mreq_source
   {
     /* IP multicast address of group.  */
diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
index af6898a5ce..00d10d812c 100644
--- a/sysdeps/unix/sysv/linux/bits/in.h
+++ b/sysdeps/unix/sysv/linux/bits/in.h
@@ -146,14 +146,6 @@ struct ip_opts
     char ip_opts[40];		/* Actually variable in size.  */
   };
 
-/* Like `struct ip_mreq' but including interface specification by index.  */
-struct ip_mreqn
-  {
-    struct in_addr imr_multiaddr;	/* IP multicast address of group */
-    struct in_addr imr_address;		/* local IP address of interface */
-    int	imr_ifindex;			/* Interface index */
-  };
-
 /* Structure used for IP_PKTINFO.  */
 struct in_pktinfo
   {
-- 
2.35.1


             reply	other threads:[~2022-08-15 17:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 17:15 Samuel Thibault [this message]
2022-08-15 19:58 ` Florian Weimer
2022-08-15 20:44   ` Samuel Thibault

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=20220815171550.1747664-1-samuel.thibault@ens-lyon.org \
    --to=samuel.thibault@ens-lyon.org \
    --cc=libc-alpha@sourceware.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).