[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_nib: provide functions to get offset of public timestamps (#16706)

benpicco notifications at github.com
Fri Aug 6 15:17:38 CEST 2021


@benpicco commented on this pull request.

I guess there is no way to query the life time of a `gnrc_ipv6_nib_ft_t`, right? 

> + *
+ * @param[in] ple   A prefix list entry.
+ *
+ * @return  The time difference in milliseconds until the prefix list entry
+ *          is valid. UINT32_MAX if it is valid forever.
+ */
+static inline uint32_t gnrc_ipv6_nib_pl_valid_offset(const gnrc_ipv6_nib_pl_t *ple)
+{
+
+    return (ple->valid_until == UINT32_MAX)
+        ? UINT32_MAX
+        : (ple->valid_until - evtimer_now_msec());
+}
+
+/**
+ * @brief   Provides the time difference in milliseconds until the prefix list

```suggestion
 * @brief   Provides the time in milliseconds for which the prefix list
```
?

"until the prefix list entry is preferred" is confusing - to me it sounds like it would only be preferred *after* this time has elapsed. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16706#pullrequestreview-724342986
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210806/97aac7c8/attachment.htm>


More information about the notifications mailing list