7d60528f435f8fed75b9f9ad5ca70371b1373f62
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License.
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
15 * Copyright (C) 2020 embedd.ch
16 * Copyright (C) 2020 Felix Fietkau <nbd@nbd.name>
17 * Copyright (C) 2020 John Crispin <john@phrozen.org>
20 #ifndef __APMGR_NODE_H
21 #define __APMGR_NODE_H
25 enum local_req_state
{
33 struct usteer_local_node
{
34 struct usteer_node node
;
36 struct ubus_subscriber ev
;
37 struct uloop_timeout update
;
43 struct ubus_request req
;
44 struct uloop_timeout req_timer
;
52 uint64_t time
, time_busy
;
54 struct kvlist script_data
;
58 struct uloop_timeout update
;
61 struct ubus_request req
;
68 struct usteer_remote_node
{
72 struct usteer_node node
;
73 struct interface
*iface
;
78 extern struct avl_tree local_nodes
;
79 extern struct avl_tree remote_nodes
;
81 #define for_each_local_node(node) \
82 avl_for_each_element(&local_nodes, node, avl) \