From patchwork Mon Aug 15 17:15:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 56753 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5E893385802A for ; Mon, 15 Aug 2022 17:16:04 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id B59C63858401 for ; Mon, 15 Aug 2022 17:15:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B59C63858401 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 3E128200F9; Mon, 15 Aug 2022 19:15:51 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PF5amoFdrvak; Mon, 15 Aug 2022 19:15:51 +0200 (CEST) Received: from begin.home (lfbn-orl-1-1261-6.w86-244.abo.wanadoo.fr [86.244.81.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 2CB5A200D1; Mon, 15 Aug 2022 19:15:51 +0200 (CEST) Received: from samy by begin.home with local (Exim 4.96) (envelope-from ) id 1oNdgs-007KeJ-2o; Mon, 15 Aug 2022 19:15:50 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [PATCHv2] Move ip_mreqn structure from Linux to generic Date: Mon, 15 Aug 2022 19:15:50 +0200 Message-Id: <20220815171550.1747664-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, 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: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" I.e. from sysdeps/unix/sysv/linux/bits/in.h to netinet/in.h It is following both the BSD and Linux definitions. Reviewed-by: Florian Weimer --- 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 {