[netsniff-ng] [PATCH 4/5] screen: Add helpers to easy use color by name

2016-03-23 Thread Vadim Kochan
Added macros which allow easy specify color pair like: INIT_COLOR(YELLOW, BLACK); COLOR(YELLOW, BLACK); COLOR_ON(YELLOW, BLACK); by calculating pair id via generic formula. Added shorter color names via new enum. Signed-off-by: Vadim Kochan --- screen.h | 17

[netsniff-ng] [PATCH 0/5] flowtop: Layout change to 1-row view

2016-03-23 Thread Vadim Kochan
Changed flows list layout to look more a top-like output with header and in 1 line. When -s option is specified then layout changes to 2 lines view including with src peer info and dst under it on next line. Also shortified flow state names to allocate less space. Removed presenter_get_port be

[netsniff-ng] [PATCH 2/5] flowtop: Change flows layout to 1-row view

2016-03-23 Thread Vadim Kochan
Changed flows list layout to look more a top-like output with header and in 1 line. When -s option is specified then layout changes to 2 lines view including with src peer info and dst under it on next line. Also shortified flow state names to allocate less space. Removed presenter_get_port be

[netsniff-ng] [PATCH 1/5] geoip: Allow to get country 3-code

2016-03-23 Thread Vadim Kochan
Add func to get country code-3 name by IPv4/6 address Signed-off-by: Vadim Kochan --- geoip.c | 14 ++ geoip.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/geoip.c b/geoip.c index ee654a6..917b1a7 100644 --- a/geoip.c +++ b/geoip.c @@ -339,6 +339,20 @@

[netsniff-ng] [PATCH 5/5] flowtop: Use new colors naming & helpers

2016-03-23 Thread Vadim Kochan
Use new colors definitions via enum variables instead of numbers which helps to undrerstand better which kind of color is used. Signed-off-by: Vadim Kochan --- flowtop.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff

[netsniff-ng] [PATCH 3/5] flowtop: Add display option to show src info

2016-03-23 Thread Vadim Kochan
Add 's' key option to toggle source peer info at runtime, behaviour is the same like for '-s' command line option. Signed-off-by: Vadim Kochan --- flowtop.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/flowtop.c b/flowtop.c index