public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2-next, v3 1/2] iproute2: expose netlink constants in UAPI
@ 2024-12-04 14:02 Yuyang Huang
  2024-12-04 14:02 ` [PATCH iproute2-next, v3 2/2] iproute2: add 'ip monitor mcaddr' support Yuyang Huang
  2024-12-04 16:28 ` [PATCH iproute2-next, v3 1/2] iproute2: expose netlink constants in UAPI Stephen Hemminger
  0 siblings, 2 replies; 8+ messages in thread
From: Yuyang Huang @ 2024-12-04 14:02 UTC (permalink / raw)
  To: Yuyang Huang
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, David Ahern, roopa, jiri, stephen, jimictw, prohr,
	liuhangbin, nicolas.dichtel, andrew, netdev,
	Maciej Żenczykowski, Lorenzo Colitti

This change adds the following multicast related netlink constants to
the UAPI:

* RTNLGRP_IPV4_MCADDR and RTNLGRP_IPV6_MCADDR: Netlink multicast
  groups for IPv4 and IPv6 multicast address changes.
* RTM_NEWMULTICAST and RTM_DELMULTICAST: Netlink message types for
  multicast address additions and deletions.

Exposing these constants in the UAPI enables ip monitor to effectively
monitor and manage multicast group memberships.

Cc: Maciej Żenczykowski <maze@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Yuyang Huang <yuyanghuang@google.com>
---

Changelog since v2:
- Align RTM_NEWMULTICAST and RTM_GETMULTICAST enum definitions with
  existing code style.

 include/uapi/linux/rtnetlink.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 4e6c8e14..04be20ee 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -93,7 +93,11 @@ enum {
 	RTM_NEWPREFIX	= 52,
 #define RTM_NEWPREFIX	RTM_NEWPREFIX
 
-	RTM_GETMULTICAST = 58,
+	RTM_NEWMULTICAST = 56,
+#define RTM_NEWMULTICAST RTM_NEWMULTICAST
+	RTM_DELMULTICAST,
+#define RTM_DELMULTICAST RTM_DELMULTICAST
+	RTM_GETMULTICAST,
 #define RTM_GETMULTICAST RTM_GETMULTICAST
 
 	RTM_GETANYCAST	= 62,
@@ -772,6 +776,10 @@ enum rtnetlink_groups {
 #define RTNLGRP_TUNNEL		RTNLGRP_TUNNEL
 	RTNLGRP_STATS,
 #define RTNLGRP_STATS		RTNLGRP_STATS
+	RTNLGRP_IPV4_MCADDR,
+#define RTNLGRP_IPV4_MCADDR	RTNLGRP_IPV4_MCADDR
+	RTNLGRP_IPV6_MCADDR,
+#define RTNLGRP_IPV6_MCADDR    RTNLGRP_IPV6_MCADDR
 	__RTNLGRP_MAX
 };
 #define RTNLGRP_MAX	(__RTNLGRP_MAX - 1)
-- 
2.47.0.338.g60cca15819-goog


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

end of thread, other threads:[~2024-12-05 10:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-04 14:02 [PATCH iproute2-next, v3 1/2] iproute2: expose netlink constants in UAPI Yuyang Huang
2024-12-04 14:02 ` [PATCH iproute2-next, v3 2/2] iproute2: add 'ip monitor mcaddr' support Yuyang Huang
2024-12-04 14:17   ` Nicolas Dichtel
2024-12-04 14:48     ` Yuyang Huang
2024-12-05  8:26       ` Nicolas Dichtel
2024-12-05 10:45         ` Yuyang Huang
2024-12-04 16:28 ` [PATCH iproute2-next, v3 1/2] iproute2: expose netlink constants in UAPI Stephen Hemminger
2024-12-05  3:46   ` Yuyang Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox