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
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
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
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 @@
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
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