summaryrefslogtreecommitdiffhomepage
path: root/src/odhcpd.h
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2019-02-05 12:09:44 +0100
committerHans Dedecker <dedeckeh@gmail.com>2019-02-05 16:38:23 +0100
commit9f25dd8af76dc30e54ddcbb4a284058e598951d5 (patch)
tree63c568f94b71069bff3e25c59eed4a148f382a59 /src/odhcpd.h
parentf21a0a7bbc31ff8b519e566087e5b425c39480c6 (diff)
treewide: use avl tree to store interfaces
Store the interfaces in an avl tree iso a linear linked list Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/odhcpd.h')
-rw-r--r--src/odhcpd.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/odhcpd.h b/src/odhcpd.h
index 5157f1f..a1d89e8 100644
--- a/src/odhcpd.h
+++ b/src/odhcpd.h
@@ -22,6 +22,7 @@
#include <libubox/blobmsg.h>
#include <libubox/list.h>
#include <libubox/uloop.h>
+#include <libubox/avl.h>
// RFC 6106 defines this router advertisement option
#define ND_OPT_ROUTE_INFO 24
@@ -145,7 +146,7 @@ struct lease {
struct interface {
- struct list_head head;
+ struct avl_node avl;
int ifindex;
char *ifname;
@@ -245,7 +246,7 @@ struct interface {
char *filter_class;
};
-extern struct list_head interfaces;
+extern struct avl_tree interfaces;
#define RA_MANAGED_NO_MFLAG 0
#define RA_MANAGED_MFLAG 1