- cli_print(cli, "\tNext Recv:\t%u", session[s].nr);
- cli_print(cli, "\tNext Send:\t%u", session[s].ns);
+ if (session[s].session_timeout)
+ {
+ clockt opened = session[s].opened;
+ if (session[s].bundle && bundle[session[s].bundle].num_of_links > 1)
+ opened = bundle[session[s].bundle].online_time;
+
+ cli_print(cli, "\tSess Timeout:\t%u seconds", session[s].session_timeout - (opened ? abs(time_now - opened) : 0));
+ }
+
+ if (session[s].idle_timeout)
+ cli_print(cli, "\tIdle Timeout:\t%u seconds", session[s].idle_timeout - (session[s].last_data ? abs(time_now - session[s].last_data) : 0));
+
+ if (session[s].timeout)
+ {
+ cli_print(cli, "\tRemaining time:\t%u",
+ (session[s].bundle && bundle[session[s].bundle].num_of_links > 1)
+ ? (unsigned) (session[s].timeout - bundle[session[s].bundle].online_time)
+ : (unsigned) (session[s].timeout - (time_now - session[s].opened)));
+ }
+