summaryrefslogtreecommitdiff
path: root/ui.c
diff options
context:
space:
mode:
authorpdw <>2002-10-29 20:35:06 +0000
committerpdw <>2002-10-29 20:35:06 +0000
commitea08b5287180e82c24e38b920750a0a114033040 (patch)
tree89979f091c66b7402d8a34c790a464c868c9392f /ui.c
parent18524e9045e5db74bc2bcfca43e2bd6027ef805d (diff)
downloadiftop-ea08b5287180e82c24e38b920750a0a114033040.zip
Announces selected interface on startup.
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/ui.c b/ui.c
index 788b861..e793de2 100644
--- a/ui.c
+++ b/ui.c
@@ -624,7 +624,16 @@ void ui_curses_init() {
halfdelay(2);
}
+void showhelp(const char * s) {
+ strncpy(helpmsg, s, HELP_MSG_SIZE);
+ showhelphint = 1;
+ helptimer = time(NULL);
+ persistenthelp = 0;
+ tick(1);
+}
+
void ui_init() {
+ char msg[20];
ui_curses_init();
erase();
@@ -635,17 +644,13 @@ void ui_init() {
service_hash = serv_hash_create();
serv_hash_initialise(service_hash);
+ snprintf(msg,20,"Listening on %s",options.interface);
+ showhelp(msg);
-}
-void showhelp(const char * s) {
- strncpy(helpmsg, s, HELP_MSG_SIZE);
- showhelphint = 1;
- helptimer = time(NULL);
- persistenthelp = 0;
- tick(1);
}
+
void showportstatus() {
if(options.showports == OPTION_PORTS_ON) {
showhelp("Port display ON");