-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2022 Felix Fietkau <nbd@nbd.name>
*/
#include "utils.h"
#include "siphash.h"
#include "wg.h"
+#include "pex-msg.h"
#include "pex.h"
#include "network.h"
#include "host.h"
#include "service.h"
#include "ubus.h"
+#include "auth-data.h"
+#include "chacha20.h"
extern const char *mssfix_path;
-extern bool dummy_mode;
+extern const char *data_dir;
extern bool debug;
+extern int global_pex_port;
#define D(format, ...) \
do { \
#define D_PEER(net, peer, format, ...) D_NET(net, "host %s " format, network_peer_name(peer), ##__VA_ARGS__)
#define D_SERVICE(net, service, format, ...) D_NET(net, "service %s " format, network_service_name(service), ##__VA_ARGS__)
+#define UNETD_DATA_DIR "/etc/unetd"
#define UNETD_MSS_BPF_PATH "/lib/bpf/mss.o"
#define UNETD_MSS_PRIO_BASE 0x130
+#define UNETD_DATA_UPDATE_DELAY (10 * 1000)
+
void unetd_write_hosts(void);
int unetd_attach_mssfix(int ifindex, int mtu);