From patchwork Tue Apr 13 22:42:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Roeseler X-Patchwork-Id: 42980 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 C169039524A9; Tue, 13 Apr 2021 22:43:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C169039524A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1618353782; bh=9sADLncxVVGHAQNc6kI6CiRlb5dYfW3ymdrH8vN/Z0A=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=GM3FqjT+P31l4ACKPy/PqclQqejhTITczrS2FGgzYQvhNVWQuhY5W7lUoX5Eo3Tgy 1T9MCUMsRIQk7tRs2UDklodZCoLUhy+1uUOK9k9uTs2SJNN/LAE6rFXFYqsRE0OiTG l/tApIUf2UKu/GvEt2XLIk/V+AWalRDTYzDlSnzo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 7E77A3858012 for ; Tue, 13 Apr 2021 22:42:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7E77A3858012 Received: by mail-oi1-x231.google.com with SMTP id i81so18633595oif.6 for ; Tue, 13 Apr 2021 15:42:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9sADLncxVVGHAQNc6kI6CiRlb5dYfW3ymdrH8vN/Z0A=; b=WEQQcdqV3REPteTG0m2v5haBibTyue6maDqWOqDCBLNcvGVUd9uoul2SWz/sKpj7da aXCvCjpAodINyEGPjFVROF8Mfs6QcfcBxobeu8Kc0a6bLQWesqpmOKSeOA9IIZQwYmgN whUBZgAzGGtZf/b/mfCIDN4rW39k+5FXlh4iVy69CuRUPK/qPcvLF4DiCN7AkR6a/EF+ lnKmSwQoTgsiwknCOFzFGAP6PFC22I4wD+jPFoBapVBhkRG65sfP396DRaL+QxcigVLY NMXBSjvcq4jeRLuzbDYnKbm2AHk5WgYTS5rqcteMT/6syrDFAo3V/FgWbfUnfrnx/gTK IlXA== X-Gm-Message-State: AOAM533lOG3JqlhnHx5Gu2kElMBqh2/eXZI69+lPndnUC77+FPHnccYc R0g9VfeRis9J+V/w4u5EqTupwqQevcA= X-Google-Smtp-Source: ABdhPJytw9837qQQhxP7T3cETH55xLr06QEGcIMnX5pQdA5Si7Cdu+ybfo48mcm8BO/3GgEulie16A== X-Received: by 2002:aca:db05:: with SMTP id s5mr22238oig.134.1618353777881; Tue, 13 Apr 2021 15:42:57 -0700 (PDT) Received: from aroeseler-ly545.hsd1.ut.comcast.net ([2601:681:8800:baf9:1ee4:d363:8fe6:b64f]) by smtp.googlemail.com with ESMTPSA id i3sm3076482oov.2.2021.04.13.15.42.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 15:42:57 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] Add RFC 8335 Definitions from Linux 5.12 Date: Tue, 13 Apr 2021 17:42:55 -0500 Message-Id: <20210413224255.1746849-1-andreas.a.roeseler@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-Patchwork-Original-From: Andreas Roeseler via Libc-alpha From: Andreas Roeseler Reply-To: Andreas Roeseler Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" RFC 8335 defines the network utility PROBE, which builds off of the capabilities of Ping to query more detailed interface information from networking nodes. The definitions included in this patchset have been accepted into the linux net-next branch and will be included in Linux 5.12. This patchset adds the same definitions to the glibc for use in the iputils package. The relevant commits for the Linux definitions can be found here: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=2b246b2569cd2ac6ff700d0dce56b8bae29b1842 https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=750f4fc2a12f6632b5aa04526bf57fa06bfe8467 These changes have been tested by running the glibc tests on x86_64 Signed-off-by: Andreas Roeseler --- inet/netinet/icmp6.h | 2 ++ sysdeps/gnu/netinet/ip_icmp.h | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/inet/netinet/icmp6.h b/inet/netinet/icmp6.h index 22b82335ec..f0df16123e 100644 --- a/inet/netinet/icmp6.h +++ b/inet/netinet/icmp6.h @@ -69,6 +69,8 @@ struct icmp6_hdr #define MLD_LISTENER_QUERY 130 #define MLD_LISTENER_REPORT 131 #define MLD_LISTENER_REDUCTION 132 +#define ICMP6_EXT_ECHO_REQUEST 160 +#define ICMP6_EXT_ECHO_REPLY 161 #define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ #define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */ diff --git a/sysdeps/gnu/netinet/ip_icmp.h b/sysdeps/gnu/netinet/ip_icmp.h index 5db7ac7c37..1fd6317df4 100644 --- a/sysdeps/gnu/netinet/ip_icmp.h +++ b/sysdeps/gnu/netinet/ip_icmp.h @@ -89,6 +89,23 @@ struct icmphdr #define ICMP_EXC_TTL 0 /* TTL count exceeded */ #define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ +/* Codes for EXT_ECHO (PROBE) */ +#define ICMP_EXT_ECHO 42 +#define ICMP_EXT_ECHOREPLY 43 +#define ICMP_EXT_MAL_QUERY 1 /* Malformed Query */ +#define ICMP_EXT_NO_IF 2 /* No such Interface */ +#define ICMP_EXT_NO_TABLE_ENT 3 /* No such Table Entry */ +#define ICMP_EXT_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */ + +/* Constants for EXT_ECHO (PROBE) */ +#define EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply message */ +#define EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply message */ +#define EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply message */ +#define EXT_ECHO_CTYPE_NAME 1 +#define EXT_ECHO_CTYPE_INDEX 2 +#define EXT_ECHO_CTYPE_ADDR 3 +#define ICMP_AFI_IP 1 /* Address Family Identifier for ipv4 */ +#define ICMP_AFI_IP6 2 /* Address Family Identifier for ipv6 */ #ifdef __USE_MISC /*