4 #include <sys/socket.h>
10 #include <libubox/list.h>
11 #include <libubox/uloop.h>
17 #define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
19 #define DPRINTF(format, ...) no_debug(format, ## __VA_ARGS__)
22 static inline void no_debug(const char *fmt, ...)
26 #define __init __attribute__((constructor))
31 extern struct uci_context *uci_ctx;
32 extern bool config_init;
34 int avl_strcmp(const void *k1, const void *k2, void *ptr);
35 void config_init_interfaces(const char *name);
38 static inline int fls(int x)
44 if (!(x & 0xffff0000u)) {
48 if (!(x & 0xff000000u)) {
52 if (!(x & 0xf0000000u)) {
56 if (!(x & 0xc0000000u)) {
60 if (!(x & 0x80000000u)) {