summaryrefslogtreecommitdiff
path: root/src/platform/nmp-object.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform/nmp-object.h')
-rw-r--r--src/platform/nmp-object.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/platform/nmp-object.h b/src/platform/nmp-object.h
index c2310eb971..c257350908 100644
--- a/src/platform/nmp-object.h
+++ b/src/platform/nmp-object.h
@@ -279,6 +279,28 @@ struct _NMPObject {
};
};
+/*****************************************************************************/
+
+/* also define NDisc related types as NMPObject. They are mostly independent from
+ * platform code, so we could go ahead and implement them as an independent type
+ * hierarchie deriving from NMDedupMultiObj/NMObjBaseInst.
+ *
+ * However, it's convenient if the existing object accessors (NMP_OBJECT_GET_TYPE(), etc)
+ * work for all objects alive. Hence, implement them also as NMPObject. */
+
+typedef struct {
+ struct in6_addr address;
+ guint32 timestamp;
+ guint32 lifetime;
+ NMIcmpv6RouterPref preference;
+} NMPNDiscGateway;
+
+typedef struct {
+ NMPNDiscGateway _public;
+} NMPObjectNDiscGateway;
+
+/*****************************************************************************/
+
static inline gboolean
NMP_CLASS_IS_VALID (const NMPClass *klass)
{