summaryrefslogtreecommitdiff
path: root/src/platform/nmp-object.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-10-10 12:39:34 +0200
committerThomas Haller <thaller@redhat.com>2017-10-10 12:54:22 +0200
commit71e668b5c3df25236a3c1e84aacb59f64f41c6b6 (patch)
tree18c17218c1f814afddf542aca1c0e813b8844ce6 /src/platform/nmp-object.h
parent7cc817ebfa2d76e5b288f3fcd12611992d756126 (diff)
downloadNetworkManager-th/ndisc-routing.tar.gz
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)
{