Skip to contentSkip to conversation

netlink: fix indentation and update NETLINK_* header comments

PATCH New [email protected] 1 participant 1 message Oct 10, 2025 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netlink: fix indentation and update NETLINK_* header comments

From: Yanzhi Lan <[email protected]>

This patch fixes inconsistent indentation and updates the comments for all NETLINK_* constants in include/uapi/linux/netlink.h.

---
 include/uapi/linux/netlink.h       | 51 +++++++++++++++---------------
 tools/include/uapi/linux/netlink.h | 48 ++++++++++++++--------------
 2 files changed, 49 insertions(+), 50 deletions(-)
include/uapi/linux/netlink.h +25 -26
index f87aaf28a649..96824c61f0ce 100644
@@ -6,39 +6,38 @@
 #include <linux/socket.h> /* for __kernel_sa_family_t */
 #include <linux/types.h>
 
-#define NETLINK_ROUTE		0	/* Routing/device hook				*/
-#define NETLINK_UNUSED		1	/* Unused number				*/
-#define NETLINK_USERSOCK	2	/* Reserved for user mode socket protocols 	*/
-#define NETLINK_FIREWALL	3	/* Unused number, formerly ip_queue		*/
-#define NETLINK_SOCK_DIAG	4	/* socket monitoring				*/
+#define NETLINK_ROUTE		0	/* Routing/device hook */
+#define NETLINK_UNUSED		1	/* Unused number */
+#define NETLINK_USERSOCK	2	/* Reserved for user mode socket protocols */
+#define NETLINK_FIREWALL	3	/* Unused number, formerly ip_queue */
+#define NETLINK_SOCK_DIAG	4	/* socket monitoring */
 #define NETLINK_NFLOG		5	/* netfilter/iptables ULOG */
-#define NETLINK_XFRM		6	/* ipsec */
+#define NETLINK_XFRM		6	/* IPsec framework */
 #define NETLINK_SELINUX		7	/* SELinux event notifications */
-#define NETLINK_ISCSI		8	/* Open-iSCSI */
-#define NETLINK_AUDIT		9	/* auditing */
-#define NETLINK_FIB_LOOKUP	10	
-#define NETLINK_CONNECTOR	11
-#define NETLINK_NETFILTER	12	/* netfilter subsystem */
-#define NETLINK_IP6_FW		13
-#define NETLINK_DNRTMSG		14	/* DECnet routing messages (obsolete) */
-#define NETLINK_KOBJECT_UEVENT	15	/* Kernel messages to userspace */
-#define NETLINK_GENERIC		16
+#define NETLINK_ISCSI		8	/* Open-iSCSI notifications */
+#define NETLINK_AUDIT		9	/* auditing subsystem messages */
+#define NETLINK_FIB_LOOKUP	10	/* FIB lookup (used by routing daemons) */
+#define NETLINK_CONNECTOR	11	/* Connector for kernel <-> userspace */
+#define NETLINK_NETFILTER	12	/* netfilter subsystem messages */
+#define NETLINK_IP6_FW		13	/* IPv6 firewall notifications (legacy) */
+#define NETLINK_DNRTMSG		14	/* DECnet routing messages */
+#define NETLINK_KOBJECT_UEVENT	15	/* Kernel uevent messages to userspace */
+#define NETLINK_GENERIC		16  /* Generic netlink family */
 /* leave room for NETLINK_DM (DM Events) */
-#define NETLINK_SCSITRANSPORT	18	/* SCSI Transports */
-#define NETLINK_ECRYPTFS	19
-#define NETLINK_RDMA		20
-#define NETLINK_CRYPTO		21	/* Crypto layer */
-#define NETLINK_SMC		22	/* SMC monitoring */
-
+#define NETLINK_SCSITRANSPORT	18	/* SCSI transport notifications */
+#define NETLINK_ECRYPTFS	19	/* eCryptfs filesystem notifications */
+#define NETLINK_RDMA		20	/* RDMA subsystem notifications */
+#define NETLINK_CRYPTO		21	/* Crypto layer messages */
+#define NETLINK_SMC			22	/* SMC monitoring */
 #define NETLINK_INET_DIAG	NETLINK_SOCK_DIAG
 
-#define MAX_LINKS 32		
+#define MAX_LINKS 32
 
 struct sockaddr_nl {
-	__kernel_sa_family_t	nl_family;	/* AF_NETLINK	*/
-	unsigned short	nl_pad;		/* zero		*/
-	__u32		nl_pid;		/* port ID	*/
-       	__u32		nl_groups;	/* multicast groups mask */
+	__kernel_sa_family_t	nl_family;	/* AF_NETLINK */
+	unsigned short	nl_pad;		/* zero */
+	__u32		nl_pid;		/* port ID */
+	__u32		nl_groups;	/* multicast groups mask */
 };
 
 /**
tools/include/uapi/linux/netlink.h +24 -24

63 lines not on this page · raw message

Signature · 1 line
2.43.0