From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 72B0A3858415 for ; Mon, 15 Aug 2022 19:58:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72B0A3858415 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-166-Mlv5-w8-OeGpL9pN8SdU-A-1; Mon, 15 Aug 2022 15:58:42 -0400 X-MC-Unique: Mlv5-w8-OeGpL9pN8SdU-A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA8F885A584; Mon, 15 Aug 2022 19:58:42 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D5BF1400E403; Mon, 15 Aug 2022 19:58:41 +0000 (UTC) From: Florian Weimer To: Samuel Thibault Cc: libc-alpha@sourceware.org Subject: Re: [PATCHv2] Move ip_mreqn structure from Linux to generic References: <20220815171550.1747664-1-samuel.thibault@ens-lyon.org> Date: Mon, 15 Aug 2022 21:58:39 +0200 In-Reply-To: <20220815171550.1747664-1-samuel.thibault@ens-lyon.org> (Samuel Thibault's message of "Mon, 15 Aug 2022 19:15:50 +0200") Message-ID: <875yiti8i8.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2022 19:58:46 -0000 * Samuel Thibault: > 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 > { This version looks okay to me. Same definition, still under __USE_MISC. Reviewed-by: Florian Weimer Thanks, Florian