aboutsummaryrefslogtreecommitdiffstats
path: root/src/llc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/llc.cpp')
-rw-r--r--src/llc.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/llc.cpp b/src/llc.cpp
index 2997ec14..c0c517f3 100644
--- a/src/llc.cpp
+++ b/src/llc.cpp
@@ -102,3 +102,12 @@ void gprs_llc::calc_pdu_lifetime(BTS *bts, const uint16_t pdu_delay_csec, struct
timeradd(&now, &csec, tv);
}
+
+bool gprs_llc::is_frame_expired(struct timeval *tv_now, struct timeval *tv)
+{
+ /* Timeout is infinite */
+ if (tv->tv_sec == 0 && tv->tv_usec == 0)
+ return false;
+
+ return timercmp(tv_now, tv, >);
+}