412aeb4ee79fb6a7ed6658348c08d62fc9038fe2
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2022 Felix Fietkau <nbd@nbd.name>
10 #include <libubox/vlist.h>
11 #include <libubox/blobmsg.h>
12 #include <libubox/utils.h>
21 extern bool dummy_mode
;
24 #define D(format, ...) \
27 fprintf(stderr, "%s(%d) " format "\n", \
28 __func__, __LINE__, ##__VA_ARGS__); \
31 #define D_NET(net, format, ...) D("network %s " format, network_name(net), ##__VA_ARGS__)
32 #define D_HOST(net, host, format, ...) D_NET(net, "host %s " format, network_host_name(host), ##__VA_ARGS__)
33 #define D_PEER(net, peer, format, ...) D_NET(net, "host %s " format, network_peer_name(peer), ##__VA_ARGS__)
36 void unetd_write_hosts(void);
37 void unetd_ubus_init(void);
38 void unetd_ubus_netifd_update(struct blob_attr
*data
);
39 void unetd_ubus_netifd_add_route(struct network
*net
, union network_endpoint
*ep
);