summaryrefslogtreecommitdiffhomepage
path: root/netifd.h
blob: b70b73c435b799abecb10df4de6189b701f3237a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __NETIFD_H
#define __NETIFD_H

#include <sys/socket.h>
#include <net/if.h>

#include <stdbool.h>
#include <stdio.h>

#include <libubox/list.h>
#include <libubox/uloop.h>

#include <libubus.h>
#include <uci.h>

#ifdef DEBUG
#define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
#else
#define DPRINTF(...) do {} while(0)
#endif

#define __init __attribute__((constructor))

struct device;
struct interface;

extern struct uci_context *uci_ctx;
extern bool config_init;

int avl_strcmp(const void *k1, const void *k2, void *ptr);
void config_init_interfaces(const char *name);

#endif