remote: close file on usteer_init_local_id fread fail
[project/usteer.git] / node.h
diff --git a/node.h b/node.h
index 7d60528f435f8fed75b9f9ad5ca70371b1373f62..77a512f08eab1e19e591090333621afeb85f9f21 100644 (file)
--- a/node.h
+++ b/node.h
@@ -25,6 +25,7 @@
 enum local_req_state {
        REQ_IDLE,
        REQ_CLIENTS,
+       REQ_STATUS,
        REQ_RRM_SET_LIST,
        REQ_RRM_GET_OWN,
        __REQ_MAX
@@ -51,7 +52,14 @@ struct usteer_local_node {
 
        uint64_t time, time_busy;
 
-       struct kvlist script_data;
+       struct kvlist node_info;
+
+       struct uloop_timeout bss_tm_queries_timeout;
+       struct list_head bss_tm_queries;
+
+       int beacon_interval;
+
+       uint16_t band_steering_interval;
 
        struct {
                bool present;
@@ -62,25 +70,40 @@ struct usteer_local_node {
                bool req_pending;
                bool status_complete;
        } netifd;
+
+       unsigned int link_measurement_tries;
 };
 
 struct interface;
-struct usteer_remote_node {
+
+struct usteer_remote_host {
        struct avl_node avl;
+
+       struct list_head nodes;
+       struct blob_attr *host_info;
+       char *addr;
+};
+
+struct usteer_remote_node {
+       struct list_head list;
+       struct list_head host_list;
        const char *name;
 
+       struct usteer_remote_host *host;
        struct usteer_node node;
-       struct interface *iface;
 
        int check;
 };
 
 extern struct avl_tree local_nodes;
-extern struct avl_tree remote_nodes;
+extern struct list_head remote_nodes;
+extern struct avl_tree remote_hosts;
 
 #define for_each_local_node(node)                      \
        avl_for_each_element(&local_nodes, node, avl)   \
                if (!node->disabled)
 
+#define for_each_remote_node(rn)                       \
+       list_for_each_entry(rn, &remote_nodes, list)
 
 #endif