Add network link + address monitiring via osysmon_rtnl.c
diff --git a/osysmon.h b/osysmon.h
index b7a0505..399a2bc 100644
--- a/osysmon.h
+++ b/osysmon.h
@@ -9,54 +9,14 @@
 
 #include "value_node.h"
 
-/* information gathered from sysinfo(2) */
-struct osysmon_state_sysinfo {
-	unsigned long uptime_secs;
-	unsigned long loads[3];
-	unsigned long freeram;
-};
-
-/* one network interface */
-struct osysmon_state_iface {
-	char name[IFNAMSIZ+1];
-	uint32_t flags;	/* enum net_device_flags IFF_* */
-	uint8_t hwasddr[6];
-	uint32_t ipaddr;
-};
-
-/* information gathered from RTNL via libmnl */
-struct osysmon_state_rtnl {
-	struct osysmon_state_iface iface[8];
-	unsigned int num_iface;
-	struct {
-		char *ifname;
-		uint32_t ipaddr;
-	} default_route;
-};
-
-#if 0
-struct osysmon_state_gbproxy {
-	char ns_state[32];
-	char bssgp_state[32];
-};
-
-struct osysmon_state_bts {
-	bool rf_locked;
-};
-
-struct osysmon_state_bsc {
-	struct osysmon_state_bts bts[8];
-	unsigned int num_bts;
-	char a_state[32];
-};
-#endif
+struct rtnl_client_state;
 
 struct osysmon_state {
-	struct osysmon_state_sysinfo sysinfo;
-	struct osysmon_state_rtnl rtnl;
-
+	struct rtnl_client_state *rcs;
 	/* list of 'struct ctrl client' */
 	struct llist_head ctrl_clients;
+	/* list of 'struct netdev' */
+	struct llist_head netdevs;
 };
 
 extern struct osysmon_state *g_oss;
@@ -66,6 +26,7 @@
 enum osysmon_vty_node {
 	CTRL_CLIENT_NODE = _LAST_OSMOVTY_NODE + 1,
 	CTRL_CLIENT_GETVAR_NODE,
+	NETDEV_NODE,
 };
 
 
@@ -73,5 +34,9 @@
 int osysmon_ctrl_init();
 int osysmon_ctrl_poll(struct value_node *parent);
 
+int osysmon_rtnl_go_parent(struct vty *vty);
+int osysmon_rtnl_init();
+int osysmon_rtnl_poll(struct value_node *parent);
+
 int osysmon_sysinfo_init();
 int osysmon_sysinfo_poll(struct value_node *parent);