[riot-notifications] [RIOT-OS/RIOT] gnrc/nib: add NIB event bus (#14022)

Martine Lenders notifications at github.com
Tue May 12 12:56:01 CEST 2020


@miri64 requested changes on this pull request.

I mostly disagree now with the scope of the event, which IMHO is all over the place.

> @@ -288,6 +288,19 @@ enum {
     GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC,
 };
 
+/**
+ * @brief   Types for GNRC_NETIF_BUS_NIB per-interface message bus
+ */
+typedef enum {
+    /**
+     * @brief   Address registration successful
+     *
+     * The Address registration with the boarder router was successful.

1.

```suggestion
     * The Address registration with the border router was successful.
```

2. This comment is misleading, as registration only happens to the upstream router in normal configuration. For registration with the border router, [multihop DAD](https://tools.ietf.org/html/rfc6775#section-8.2) is required, which currently is not implemented.

> @@ -288,6 +288,19 @@ enum {
     GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC,
 };
 
+/**
+ * @brief   Types for GNRC_NETIF_BUS_NIB per-interface message bus
+ */
+typedef enum {
+    /**
+     * @brief   Address registration successful
+     *
+     * The Address registration with the boarder router was successful.
+     * The node now has a global prefix.

Address registration and prefix configuration are two distinct events. The prefix configuration actually happens simultaneously with the assignment of the address to the interface, so before address registration is even kicked off. Also, nodes don't have prefixes. Interfaces have.

> @@ -288,6 +288,19 @@ enum {
     GNRC_IPV6_NIB_ROUTE_INFO_TYPE_NSC,
 };
 
+/**
+ * @brief   Types for GNRC_NETIF_BUS_NIB per-interface message bus
+ */
+typedef enum {
+    /**
+     * @brief   Address registration successful
+     *
+     * The Address registration with the boarder router was successful.
+     * The node now has a global prefix.
+     */
+    GNRC_IPV6_NIB_EVENT_REG_SUCCESS,

`REG_SUCCESS` is somehow both very unspecific (which reg was success?) and very 6LoWPAN-specific (once you figured out, which reg was success).

Maybe, to also to be able to use this with [address validation in classic DAD](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c#L212-L213), rescope the event to `GNRC_IPV6_NIB_EVENT_ADDR_VALID`? Then this can also be used for the link-local addresses, which [with 6Lo-ND are always assumed to be valid](https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/network_layer/ipv6/nib/_nib-slaac.c#L75-L79).

-- 
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/14022#pullrequestreview-409918096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200512/4e5d5a67/attachment.htm>


More information about the notifications mailing list