From patchwork Sun May 2 22:58:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Roeseler X-Patchwork-Id: 43204 X-Patchwork-Delegate: fweimer@redhat.com 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 2C9B53844008; Sun, 2 May 2021 22:59:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C9B53844008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619996340; bh=9R/813++MoZtmQk/1E9JmiQHz8PAHc5oiKLz+BClngI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=buszIh+jmGRJ6n3AT9Exhdi3nZvLTl3NoxiD+wqN7QG4T2+u6TheRHOmSKV1EGUsO rG++KrY6G4930+KE1VZCH5OHmRMUVOn5jE6Buom1ZRsFUBdA2Ml1UtWAssfb5bMlHq n5DTD9nVsvDcQCQj/oKlPexqoIcYwDknKfMkEtRQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 39585385781A for ; Sun, 2 May 2021 22:58:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 39585385781A Received: by mail-io1-xd2c.google.com with SMTP id z24so626673ioj.7 for ; Sun, 02 May 2021 15:58: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=9R/813++MoZtmQk/1E9JmiQHz8PAHc5oiKLz+BClngI=; b=kO5tc7jBMncUhUTwh3wWyhIQKR7swDqfasQ17QpyHVOWg62p80LDQVr3wO7ntsZezw x/3a3w3YPv8Uw3rjmL7/OuoKd0p5xqlOF3YBpR38RRQcEvVqPe+Eux/9Bu8sb0N56KzW Tjk+tymX4MUDtTJ7loUsBe6AigOARYe6PUNrxiDLojl/h+y3TFZaVcoo8LJQOsrfPMBb zl2rEgPYAah1RcacKb1SCl9KlpccV4uELkYP+CQH0fzG05PKHR3uB6LWQNnxqzEjeU8Y vDGN4cgDKU0lULKOHTuWcVTJMYytvV1vGOLWruztwKPHe3V7leIYCF2HP9NvgvGtX8PO QO/w== X-Gm-Message-State: AOAM532ihQfxRlIRJueg+/RZkVfDboxxvv0pThcz5680RVzqLQrIAzRx c8k5P1Ske6Nbw2zLDlmKKdTqnBxJcCQ= X-Google-Smtp-Source: ABdhPJx3wHfh/mEkBTwgQSQzFmb+QbaCz3pBZJBhv9Opg/1UfJfpMW6x9W5Eqh3g19dBu4DGE78Fag== X-Received: by 2002:a5d:9659:: with SMTP id d25mr12769302ios.146.1619996337632; Sun, 02 May 2021 15:58: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 m20sm3202680ilj.43.2021.05.02.15.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 15:58:57 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH V3] Add RFC 8335 Definitions from Linux 5.13 Date: Sun, 2 May 2021 17:58:54 -0500 Message-Id: <20210502225854.3295-1-andreas.a.roeseler@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 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 Cc: fweimer@redhat.com 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.13. 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=e542d29ca81d005651680a0a697b72ca13ddc4cc 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 --- Changes: v1 -> v2: - Add more specific prefixes to constants v2 -> v3: - Updated URLs - Corrected Linux version that will include the definitions (5.13) --- inet/netinet/icmp6.h | 2 ++ sysdeps/gnu/netinet/ip_icmp.h | 18 ++++++++++++++++++ 2 files changed, 20 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..ec7137253f 100644 --- a/sysdeps/gnu/netinet/ip_icmp.h +++ b/sysdeps/gnu/netinet/ip_icmp.h @@ -89,6 +89,24 @@ struct icmphdr #define ICMP_EXC_TTL 0 /* TTL count exceeded */ #define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ +/* Codes for ICMP_EXT_ECHO (PROBE) */ +#define ICMP_EXT_ECHO 42 +#define ICMP_EXT_ECHOREPLY 43 +#define ICMP_EXT_CODE_MAL_QUERY 1 /* Malformed Query */ +#define ICMP_EXT_CODE_NO_IF 2 /* No such Interface */ +#define ICMP_EXT_CODE_NO_TABLE_ENT 3 /* No table entry */ +#define ICMP_EXT_CODE_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */ + +/* Constants for EXT_ECHO (PROBE) */ +#define ICMP_EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply */ +#define ICMP_EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply */ +#define ICMP_EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply */ +#define ICMP_EXT_ECHO_CTYPE_NAME 1 +#define ICMP_EXT_ECHO_CTYPE_INDEX 2 +#define ICMP_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 /*