[netsniff-ng] [PATCH 0/3] flowtop: Misc updates: filter state, refresh flag reset

2015-12-16 Thread Vadim Kochan
There are just few different changes like:
1) Show family in filter status bar
2) Show if 'Active' flows mode is selected in filter status bar
3) Reset do_refresh flag immideately if it is enabled to make able
   refresh flows again if this flag was changed while refreshing.

Vadim Kochan (3):
  flowtop: Show selected proto family
  flowtop: Indicate if 'active' flows mode is selected
  flowtop: Refresh flows if filter was changed while flows loading

 flowtop.c | 35 ---
 1 file changed, 24 insertions(+), 11 deletions(-)

-- 
2.6.3

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[netsniff-ng] [PATCH 3/3] flowtop: Refresh flows if filter was changed while flows loading

2015-12-16 Thread Vadim Kochan
Reset do_reload_flows flag before dump flows. It allows to change
filter state more dynamically

Signed-off-by: Vadim Kochan 
---
 flowtop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flowtop.c b/flowtop.c
index d90e1ee..1d438ba 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -1676,12 +1676,12 @@ static void *collector(void *null __maybe_unused)
if (!do_reload_flows) {
usleep(USEC_PER_SEC * interval);
} else {
+   do_reload_flows = false;
+
flow_list_destroy(_list);
 
collector_create_filter(ct_event);
collector_dump_flows();
-
-   do_reload_flows = false;
}
 
collector_refresh_flows(ct_update);
-- 
2.6.3

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[netsniff-ng] [PATCH 2/3] flowtop: Indicate if 'active' flows mode is selected

2015-12-16 Thread Vadim Kochan
Show 'Active' filter status if 'a' was pressed.

Signed-off-by: Vadim Kochan 
---
 flowtop.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/flowtop.c b/flowtop.c
index 52e4bef..d90e1ee 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -1146,6 +1146,7 @@ static void draw_flows(WINDOW *screen, struct flow_list 
*fl,
}
 
mvwprintw(screen, 1, 2, "Kernel netfilter flows(%u) for ", flows);
+
if (what & INCLUDE_IPV4)
printw("IPv4,");
if (what & INCLUDE_IPV6)
@@ -1162,6 +1163,9 @@ static void draw_flows(WINDOW *screen, struct flow_list 
*fl,
printw("ICMP,");
if (what & INCLUDE_ICMP && what & INCLUDE_IPV6)
printw("ICMP6,");
+   if (show_active_only)
+   printw("Active,");
+
printw(" [+%d]", skip_lines);
 
if (is_flow_collecting)
-- 
2.6.3

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[netsniff-ng] Re: [PATCH 1/4] netsniff-ng: nlmsg: Resolve genl family name

2015-12-16 Thread Vadim Kochan
On Tue, Dec 08, 2015 at 05:00:52PM +0100, Tobias Klauser wrote:
> On 2015-11-30 at 01:05:04 +0100, Vadim Kochan  wrote:
> > Print name of resolved genl family name by type
> 
> This patch does quite a bit more than the description says (i.e. the
> init/uninit hooks). Please be a bit more verbose in your patch
> descriptions.
> 
> > Signed-off-by: Vadim Kochan 
> > ---
> >  dissector_netlink.c |  3 ++
> >  proto.h | 15 ++
> >  proto_nlmsg.c   | 82 
> > +
> >  protos.h|  2 +-
> >  4 files changed, 96 insertions(+), 6 deletions(-)
> > 
> > diff --git a/dissector_netlink.c b/dissector_netlink.c
> > index 2b23a99..b4de112 100644
> > --- a/dissector_netlink.c
> > +++ b/dissector_netlink.c
> > @@ -19,10 +19,13 @@ static inline void dissector_init_exit(int type)
> >  
> >  void dissector_init_netlink(int fnttype)
> >  {
> > +   proto_ops_init(_ops);
> > +
> > dissector_init_entry(fnttype);
> > dissector_init_exit(fnttype);
> >  }
> >  
> >  void dissector_cleanup_netlink(void)
> >  {
> > +   proto_ops_uninit(_ops);
> >  }
> > diff --git a/proto.h b/proto.h
> > index 0cc1fd8..03a07e2 100644
> > --- a/proto.h
> > +++ b/proto.h
> > @@ -10,6 +10,7 @@
> >  
> >  #include 
> >  #include 
> > +#include 
> 
> What is this needed for?
> 
> >  
> >  #include "tprintf.h"
> >  
> > @@ -20,6 +21,8 @@ struct protocol {
> > const unsigned int key;
> > void (*print_full)(struct pkt_buff *pkt);
> > void (*print_less)(struct pkt_buff *pkt);
> > +   void (*init)(void);
> > +   void (*uninit)(void);
> 
> I don't think the very specific case of dissecting genl family messages
> deserves the introduction of these hooks. How about just doing the init
> work the first time the genl stuff is actually used?

Yes, init can be done on demand within proto_nlmsg.c module by 1st, but what 
about uninit ?
May be at least uninit/cleanup/exit hook might be added only which will
close genl socket if it is not NULL ?

Regards,

> 
> Sorry for the brevity, I currently have a very limited bandwidth to
> review patches...

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[netsniff-ng] Re: [PATCH v4 1/6] proc: Add function to execute process with argv list

2015-12-16 Thread Tobias Klauser
On 2015-12-16 at 10:05:33 +0100, vkochan  wrote:
> Hi,
> 
> On Wed, Dec 16, 2015 at 09:34:28AM +0100, Tobias Klauser wrote:
> > On 2015-12-15 at 22:09:10 +0100, Vadim Kochan  wrote:
> > > Add proc_exec function which executes given process with
> > > argv list via fork + execvp.
> > > 
> > > It allows to replace 'system' call approach which is used
> > > for invoking cpp and securely extend it with additional options
> > > like -D.
> > > 
> > > Signed-off-by: Vadim Kochan 
> > > ---
> > 
> > For future patch series where you send multiple version, please add a
> > small changelog here (below the ---) of what changed between the
> > versions. Otherwise it's more cumbersome to determine whether something
> > has changed in the patch at all and needs a new review. This means
> > review time will be larger for the maintainers :(
> 
> Usually I do this but I was thinking that maintainer will review the
> whole submitted changes, and may be this changelog might be useless ...
> actually I assumed that maintainer will do not trust the changelog but
> will go review each line again.

Not necessarily. I want to avoid duplicating work, so I usually only
to a full review on patches which were actually changed and check
whether review comments have been addressed. Having a changelog helps to
quickly identify whether the patch author thinks they have adressed all
review comments with this.

> > For larger patch series, please also send along a cover letter (git
> > format-patch --cover-letter) where you give a short summary of the
> > overall idea of the series. In this case, adding the version changelog
> > to the cover letter is preferred.
> 
> Really I was doing that but I observed that you responded only to each
> patch so I decided that may be you skip the cover letter.

Sure, I only respond to the patches themselves, but the cover letter is
still useful. Please note that me not replying to the cover letter does not
imply I didn't read it :), I'd reply to the cover letter in case I
applied the series as a whole or if I had change requests to the overall
idea of the series.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[netsniff-ng] Re: [PATCH v4 1/6] proc: Add function to execute process with argv list

2015-12-16 Thread vkochan
Hi,

On Wed, Dec 16, 2015 at 09:34:28AM +0100, Tobias Klauser wrote:
> On 2015-12-15 at 22:09:10 +0100, Vadim Kochan  wrote:
> > Add proc_exec function which executes given process with
> > argv list via fork + execvp.
> > 
> > It allows to replace 'system' call approach which is used
> > for invoking cpp and securely extend it with additional options
> > like -D.
> > 
> > Signed-off-by: Vadim Kochan 
> > ---
> 
> For future patch series where you send multiple version, please add a
> small changelog here (below the ---) of what changed between the
> versions. Otherwise it's more cumbersome to determine whether something
> has changed in the patch at all and needs a new review. This means
> review time will be larger for the maintainers :(

Usually I do this but I was thinking that maintainer will review the
whole submitted changes, and may be this changelog might be useless ...
actually I assumed that maintainer will do not trust the changelog but
will go review each line again.

> 
> For larger patch series, please also send along a cover letter (git
> format-patch --cover-letter) where you give a short summary of the
> overall idea of the series. In this case, adding the version changelog
> to the cover letter is preferred.

Really I was doing that but I observed that you responded only to each
patch so I decided that may be you skip the cover letter.

> 
> There's no need to do this for this patch series, please just keep in
> mind for future patches. I'll review this series as soon as I find some
> time.
> 
> Thanks

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.