<div dir="ltr"><div>On 4 June 2017 at 17:56, Dmitry V. Levin <<a href="mailto:ldv@altlinux.org">ldv@altlinux.org</a>> wrote:</div><div>> On Sun, Jun 04, 2017 at 03:57:08PM +0800, JingPiao Chen wrote:</div><div>> > On Fri, Jun 02, 2017 at 06:25:28PM +0300, Dmitry V. Levin wrote:</div><div>> > > On Fri, May 05, 2017 at 06:21:17PM +0800, JingPiao Chen wrote:</div><div>[...]</div><div>> > > I suggest implementing a default decoder of NLMSG_DONE messages that</div><div>> > > would print the integer in case of len == sizeof(int) and fall back</div><div>> > > to  printstrn for other lengths.</div><div>> ></div><div>> > I updated the patch. default decoder[1]:</div><div>> </div><div>> Thanks.</div><div>> </div><div>> > diff --git a/netlink.c b/netlink.c</div><div>> > index 678343c..104a65f 100644</div><div>> > --- a/netlink.c</div><div>> > +++ b/netlink.c</div><div>> > @@ -120,6 +120,12 @@ decode_payload(struct tcb *const tcp,</div><div>> >   if (nlmsghdr->nlmsg_type == NLMSG_ERROR) {</div><div>> >   decode_nlmsgerr(tcp, addr, len);</div><div>> >   return;</div><div>> > + } else if (nlmsghdr->nlmsg_type == NLMSG_DONE && len == sizeof(int)) {</div><div>> > + int total_len;</div><div>> </div><div>> btw, why do you call it total_len?  This integer can contain anything.</div><div><br></div><div>My mistake, now total_len is not a good name, I renamed it to num.</div><div><br></div><div>--</div><div>JingPiao Chen</div></div>