<p>Hm. Didn't notice that usage.<br>
That aux struct could be wrapped in #ifndef _cplusplus and then be included in the header file.</p>
<p>This could look like this</p>
<pre><code>diff --git a/sys/include/net/ndp.h b/sys/include/net/ndp.h
index 01751bb38..0510b2015 100644
--- a/sys/include/net/ndp.h
+++ b/sys/include/net/ndp.h
@@ -334,7 +334,7 @@ typedef struct __attribute__((packed)) {
 } ndp_opt_mtu_t;
 
 /**
- * @brief   Recursive DNS server option format
+ * @brief   Recursive DNS server option format without payload
  * @extends ndp_opt_t
  *
  * @see     [RFC 8106, section 5.1](https://tools.ietf.org/html/rfc8106#section-5.1)
@@ -344,9 +344,24 @@ typedef struct __attribute__((packed)) {
     uint8_t len;            /**< length in units of 8 octets */
     network_uint16_t resv;  /**< reserved field */
     network_uint32_t ltime; /**< lifetime in seconds */
-    ipv6_addr_t addrs[];    /**< addresses of IPv6 recursive DNS servers */
 } ndp_opt_rdnss_t;
 
+#ifndef __cplusplus
+/**
+ * @brief   Recursive DNS server option format with payload
+ * @extends ndp_opt_rdnss_t
+ *
+ * @see     [RFC 8106, section 5.1](https://tools.ietf.org/html/rfc8106#section-5.1)
+ */
+typedef struct __attribute__((packed)) {
+    uint8_t type;           /**< option type */
+    uint8_t len;            /**< length in units of 8 octets */
+    network_uint16_t resv;  /**< reserved field */
+    network_uint32_t ltime; /**< lifetime in seconds */
+    ipv6_addr_t addrs[];    /**< addresses of IPv6 recursive DNS servers */
+} ndp_opt_rdnss_impl_t;
+#endif
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib.c b/sys/net/gnrc/network_layer/ipv6/nib/nib.c
index deef221b7..8c0561c3d 100644
--- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c
+++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c
@@ -413,7 +413,7 @@ static void _handle_mtuo(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
                          const ndp_opt_mtu_t *mtuo);
 #if GNRC_IPV6_NIB_CONF_DNS
 static uint32_t _handle_rdnsso(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
-                               const ndp_opt_rdnss_t *rdnsso);
+                               const ndp_opt_rdnss_impl_t *rdnsso);
 #endif
 #if GNRC_IPV6_NIB_CONF_MULTIHOP_P6C
 static uint32_t _handle_pio(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
@@ -729,7 +729,7 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
             case NDP_OPT_RDNSS:
                 next_timeout = _min(_handle_rdnsso(netif,
                                                    (icmpv6_hdr_t *)rtr_adv,
-                                                   (ndp_opt_rdnss_t *)opt),
+                                                   (ndp_opt_rdnss_impl_t *)opt),
                                     next_timeout);
                 break;
 #endif
@@ -1349,7 +1349,7 @@ static void _handle_mtuo(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
 
 #if GNRC_IPV6_NIB_CONF_DNS
 static uint32_t _handle_rdnsso(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
-                               const ndp_opt_rdnss_t *rdnsso)
+                               const ndp_opt_rdnss_impl_t *rdnsso)
 {
     uint32_t ltime = UINT32_MAX;
     const ipv6_addr_t *addr;
diff --git a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c
index c42477cfe..511006552 100644
--- a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c
+++ b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c
@@ -234,7 +234,7 @@ gnrc_pktsnip_t *gnrc_ndp_opt_rdnss_build(uint32_t ltime, ipv6_addr_t *addrs,
     gnrc_pktsnip_t *pkt = gnrc_ndp_opt_build(NDP_OPT_RDNSS, opt_size, next);
 
     if (pkt != NULL) {
-        ndp_opt_rdnss_t *rdnss_opt = pkt->data;
+        ndp_opt_rdnss_impl_t *rdnss_opt = pkt->data;
         rdnss_opt->resv.u16 = 0;
         rdnss_opt->ltime = byteorder_htonl(ltime);
         for (unsigned i = 0; i < addrs_num; i++) {
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/11299?email_source=notifications&email_token=ABE7WYCPL2GB3U6M7QF7KNDQLS3SRA5CNFSM4HB3F3Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7VS34A#issuecomment-535506416">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBTA3PGIUI4FEUSIR3QLS3SRANCNFSM4HB3F3YQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYGGCYLZ6CYETS6QRRLQLS3SRA5CNFSM4HB3F3Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7VS34A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11299?email_source=notifications\u0026email_token=ABE7WYCPL2GB3U6M7QF7KNDQLS3SRA5CNFSM4HB3F3Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7VS34A#issuecomment-535506416",
"url": "https://github.com/RIOT-OS/RIOT/pull/11299?email_source=notifications\u0026email_token=ABE7WYCPL2GB3U6M7QF7KNDQLS3SRA5CNFSM4HB3F3Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7VS34A#issuecomment-535506416",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>