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

2016-06-16 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:13:06PM +0300, Dmitry V. Levin wrote: > On Wed, Jun 15, 2016 at 09:09:19AM +, Fabien Siron wrote: > > Quoting Dmitry V. Levin (2016-06-14 12:00:30) > > > On Mon, Jun 13, 2016 at 02:37:22PM +, Fabien Siron wrote: > > > > +static void > > > > +printsockbuf(struct tc

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

2016-06-15 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 09:09:19AM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-14 12:00:30) > > On Mon, Jun 13, 2016 at 02:37:22PM +, Fabien Siron wrote: > > > +static void > > > +printsockbuf(struct tcb *tcp, int fd, long addr, long addrlen) > > > +{ > > > + int proto = g

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

2016-06-15 Thread Fabien Siron
Quoting Dmitry V. Levin (2016-06-14 12:00:30) > On Mon, Jun 13, 2016 at 02:37:22PM +, Fabien Siron wrote: > > +static void > > +printsockbuf(struct tcb *tcp, int fd, long addr, long addrlen) > > +{ > > + int proto = getfdproto(tcp, fd); > > This operation costs a few syscalls so it shouldn

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

2016-06-14 Thread Dmitry V. Levin
On Mon, Jun 13, 2016 at 02:37:22PM +, 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 v2 2/7] Add a general netlink socket parser

2016-06-13 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 (get_family): New function. (do_msghdr): Call