public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Add RFC 8335 Definitions from Linux 5.12
@ 2021-04-13 22:42 Andreas Roeseler
  2021-04-20 15:21 ` Andreas Roeseler
  2021-04-20 16:39 ` Florian Weimer
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Roeseler @ 2021-04-13 22:42 UTC (permalink / raw)
  To: 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 <andreas.a.roeseler@gmail.com>
---
 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
 /*
-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add RFC 8335 Definitions from Linux 5.12
  2021-04-13 22:42 [PATCH] Add RFC 8335 Definitions from Linux 5.12 Andreas Roeseler
@ 2021-04-20 15:21 ` Andreas Roeseler
  2021-04-20 16:39 ` Florian Weimer
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Roeseler @ 2021-04-20 15:21 UTC (permalink / raw)
  To: libc-alpha

On Tue, 2021-04-13 at 17:42 -0500, Andreas Roeseler wrote:
> 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 <andreas.a.roeseler@gmail.com>
> ---
>  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
>  /*

Please let me know if there is any feedback/comments for this patch



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add RFC 8335 Definitions from Linux 5.12
  2021-04-13 22:42 [PATCH] Add RFC 8335 Definitions from Linux 5.12 Andreas Roeseler
  2021-04-20 15:21 ` Andreas Roeseler
@ 2021-04-20 16:39 ` Florian Weimer
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2021-04-20 16:39 UTC (permalink / raw)
  To: Andreas Roeseler via Libc-alpha

* Andreas Roeseler via Libc-alpha:

> 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 */

I'm a bit surprised how the EXT_* macros step outside of the general
ICMP namespace here.

And the ICMP_EXT_* macros seem to be for different PDU fields even
though they share a common prefix (ICMP_EXT_).

Thanks,
Florian


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-20 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 22:42 [PATCH] Add RFC 8335 Definitions from Linux 5.12 Andreas Roeseler
2021-04-20 15:21 ` Andreas Roeseler
2021-04-20 16:39 ` Florian Weimer

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).