[PATCH 0/13] Implement dumping udp sockets via sock_diag netlink
From: Pavel Emelyanov <hidden>
Date: 2011-12-09 16:20:57
Hi! This is an extension of inet_diag module and the new udp_diag one. Plus the patch for iproute's ss to dump udp sockets via netlink (applies on top of previous patch for new NETLINK_SOCK_DIAG API [1]). The overall idea is: Patch the inet_diag module so that the protocol level handlers are called indirectly from the very beginning, not just for getting the tcp_info bits. Implement the udp_diag module that provides callbacks for IPPROTO_UDP and IPPROTO_UDPLITE protocols. The existing inet request packet (inet_diag_req) format used to request for TCP/DCCP sockets is used for UDP socket as well, although not all the state bits matter for UDP. When sending back the reply the existing format (inet_diag_message) is used as well. Some bits on this struct are meaningless for UDP, but I hope that setting these to 0 and wasting some space on reply skb worth the saved amount of new code on both -- the kernel side and the userspace side (i.e. ss tool). The data that is stored in an nl attribute but doesn't exist for UDP is just not provided. Signed-off-by: Pavel Emelyanov <redacted> [1] http://www.spinics.net/lists/netdev/msg182467.html