[PATCH v7 06/18] netlink: decode AF_INET inet_diag_msg attributes
JingPiao Chen
chenjingpiao at gmail.com
Sat Jul 1 15:27:24 UTC 2017
On Sat, Jul 01, 2017 at 01:11:24PM +0300, Dmitry V. Levin wrote:
> On Wed, Jun 28, 2017 at 09:40:01AM +0800, JingPiao Chen wrote:
> > * netlink_sock_diag.c: Include <linux/sock_diag.h>.
>
> +(print_meminfo, decode_meminfo, decode_inet_diag_meminfo,
> +decode_tcpvegas_info, decode_tcp_dctcp_info, decode_tcp_bbr_info):
> +New functions.
>
> > (inet_diag_msg_nla_decoders): New array.
> > (decode_inet_diag_msg): Use it.
> > * linux/inet_diag.h (inet_diag_meminfo, tcpvegas_info,
> > tcp_dctcp_info, tcp_bbr_info): New structures.
> > * linux/sock_diag.h (SK_MEMINFO_VARS): New macro.
>
> Applied, thanks.
>
> I also applied v4.17-127-g4817a29 before this commit and
> v4.17-136-g1c2e012 on top of it. These changes reduce redundancy
> in printing structure field names and ensure that structure field names
> are printed properly.
>
> Please follow this approach when adding new diag decoders.
Ok. It seem I should use PRINT_FIELD_* macro when decode other protocol now.
--
JingPiao Chen
More information about the Strace-devel
mailing list