net/mgmt: Move NET_EVENT_INFO_MAX_SIZE into net core's private header
First because nobody needs to know that besides net_mgmt core and
secondary to avoid possible circular dependancy on
net_mgmt.h/net_event.h.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
diff --git a/include/net/net_event.h b/include/net/net_event.h
index 701903e..996bd0f 100644
--- a/include/net/net_event.h
+++ b/include/net/net_event.h
@@ -183,13 +183,7 @@
u8_t prefix_len;
};
-/* Maximum size of "struct net_event_ipv6_addr" or
- * "struct net_event_ipv6_nbr" or "struct net_event_ipv6_route".
- * NOTE: Update comments here and calculate which struct occupies max size.
- */
-#define NET_EVENT_INFO_MAX_SIZE sizeof(struct net_event_ipv6_route)
-
-#endif
+#endif /* CONFIG_NET_MGMT_EVENT_INFO */
#ifdef __cplusplus
}
diff --git a/subsys/net/ip/net_mgmt.c b/subsys/net/ip/net_mgmt.c
index 9e2734a..8356cb6 100644
--- a/subsys/net/ip/net_mgmt.c
+++ b/subsys/net/ip/net_mgmt.c
@@ -17,6 +17,8 @@
#include <misc/slist.h>
#include <net/net_mgmt.h>
+#include "net_private.h"
+
struct mgmt_event_entry {
u32_t event;
struct net_if *iface;
diff --git a/subsys/net/ip/net_private.h b/subsys/net/ip/net_private.h
index c0c546d..e588626 100644
--- a/subsys/net/ip/net_private.h
+++ b/subsys/net/ip/net_private.h
@@ -15,6 +15,19 @@
#include <net/net_context.h>
#include <net/net_pkt.h>
+#ifdef CONFIG_NET_MGMT_EVENT_INFO
+
+#include <net/net_event.h>
+
+/* Maximum size of "struct net_event_ipv6_addr" or
+ * "struct net_event_ipv6_nbr" or "struct net_event_ipv6_route".
+ * NOTE: Update comments here and calculate which struct occupies max size.
+ */
+
+#define NET_EVENT_INFO_MAX_SIZE sizeof(struct net_event_ipv6_route)
+
+#endif /* CONFIG_NET_MGMT_EVENT_INFO */
+
#include "connection.h"
extern void net_pkt_init(void);