aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_llc_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/gprs/gprs_llc_vty.c')
-rw-r--r--openbsc/src/gprs/gprs_llc_vty.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_llc_vty.c b/openbsc/src/gprs/gprs_llc_vty.c
index ab5269922..f399b2752 100644
--- a/openbsc/src/gprs/gprs_llc_vty.c
+++ b/openbsc/src/gprs/gprs_llc_vty.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
+#include <time.h>
#include <arpa/inet.h>
@@ -69,9 +70,13 @@ static uint8_t valid_sapis[] = { 1, 2, 3, 5, 7, 8, 9, 11 };
static void vty_dump_llme(struct vty *vty, struct gprs_llc_llme *llme)
{
unsigned int i;
+ struct timespec now_tp = {0};
+ clock_gettime(CLOCK_MONOTONIC, &now_tp);
- vty_out(vty, "TLLI %08x (Old TLLI %08x) BVCI=%u NSEI=%u: State %s%s",
+ vty_out(vty, "TLLI %08x (Old TLLI %08x) BVCI=%u NSEI=%u Age=%d: State %s%s",
llme->tlli, llme->old_tlli, llme->bvci, llme->nsei,
+ llme->age_timestamp == GPRS_LLME_RESET_AGE ? 0 :
+ (int)(now_tp.tv_sec - (time_t)llme->age_timestamp),
get_value_string(gprs_llc_state_strs, llme->state), VTY_NEWLINE);
for (i = 0; i < ARRAY_SIZE(valid_sapis); i++) {