Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 02:33:24PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 13:38:06) > > On Thu, Jun 16, 2016 at 01:26:15PM +, Fabien Siron wrote: > > > Quoting Dmitry V. Levin (2016-06-16 10:08:22) > > > > Alternatively, rather than making decode_netlink_iov work like

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Fabien Siron
Quoting Dmitry V. Levin (2016-06-16 13:38:06) > On Thu, Jun 16, 2016 at 01:26:15PM +, Fabien Siron wrote: > > Quoting Dmitry V. Levin (2016-06-16 10:08:22) > > > Alternatively, rather than making decode_netlink_iov work like > > > tprint_iov_upto, you can extend tprint_iov_upto to print netlink

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 01:22:12PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 01:36:47) > > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: [...] > As verbose must be used instead of show_fd_path, the following seems better: > > switch (verbose(tcp) ? getfdproto

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 01:26:15PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 10:08:22) > > On Thu, Jun 16, 2016 at 04:36:47AM +0300, Dmitry V. Levin wrote: > > > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: > > [...] > > > > +void > > > > +decode_netlink_iov(

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Fabien Siron
Quoting Dmitry V. Levin (2016-06-16 10:08:22) > On Thu, Jun 16, 2016 at 04:36:47AM +0300, Dmitry V. Levin wrote: > > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: > [...] > > > +void > > > +decode_netlink_iov(struct tcb *tcp, unsigned long len, unsigned long > > > addr, > > > +

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Fabien Siron
Quoting Dmitry V. Levin (2016-06-16 01:36:47) > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: > > This commit introduces a general socket netlink parser which prints > > the header and a string for the remaining part of the buffer. It doesn't > > handle all the netlink flags and typ

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 04:36:47AM +0300, Dmitry V. Levin wrote: > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: [...] > > +void > > +decode_netlink(struct tcb *tcp, unsigned long addr, unsigned long size) > > +{ > > + struct nlmsghdr nlmsghdr; > > + > > + if (size < sizeof(stru

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 04:36:47AM +0300, Dmitry V. Levin wrote: > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: [...] > > +void > > +decode_netlink_iov(struct tcb *tcp, unsigned long len, unsigned long addr, > > + unsigned long data_size) > > +{ > > + unsigned long i

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-15 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: > This commit introduces a general socket netlink parser which prints > the header and a string for the remaining part of the buffer. It doesn't > handle all the netlink flags and types because the parser needs more > information. It wil

[PATCH v3 2/7] Add a general netlink socket parser

2016-06-15 Thread Fabien Siron
This commit introduces a general socket netlink parser which prints the header and a string for the remaining part of the buffer. It doesn't handle all the netlink flags and types because the parser needs more information. It will be done soon. * net.c (printsock): Return family. (do_msghdr): Call