[PATCH] netlink: fix indentation and update NETLINK_* header comments

lanyanzhi97@qq.com posted 1 patch 8 months, 1 week ago
include/uapi/linux/netlink.h       | 51 +++++++++++++++---------------
tools/include/uapi/linux/netlink.h | 48 ++++++++++++++--------------
2 files changed, 49 insertions(+), 50 deletions(-)
[PATCH] netlink: fix indentation and update NETLINK_* header comments
Posted by lanyanzhi97@qq.com 8 months, 1 week ago
From: Yanzhi Lan <lanyanzhi97@qq.com>

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

Signed-off-by: Yanzhi Lan <lanyanzhi97@qq.com>
---
 include/uapi/linux/netlink.h       | 51 +++++++++++++++---------------
 tools/include/uapi/linux/netlink.h | 48 ++++++++++++++--------------
 2 files changed, 49 insertions(+), 50 deletions(-)

diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index f87aaf28a649..96824c61f0ce 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -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 */
 };
 
 /**
diff --git a/tools/include/uapi/linux/netlink.h b/tools/include/uapi/linux/netlink.h
index 0a4d73317759..2650517af44c 100644
--- a/tools/include/uapi/linux/netlink.h
+++ b/tools/include/uapi/linux/netlink.h
@@ -6,39 +6,39 @@
 #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_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 messages to userspace */
-#define NETLINK_GENERIC		16
+#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 */
 };
 
 struct nlmsghdr {
-- 
2.43.0