1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2021 Felix Fietkau <nbd@nbd.name>
9 #include <libubox/uloop.h>
13 static int usage(const char *progname
)
15 fprintf(stderr
, "Usage: %s [options]\n"
17 " -f: force reload of BPF programs\n"
18 " -l <file> Load defaults from <file>\n"
19 " -o only load program/maps without running as daemon\n"
25 int main(int argc
, char **argv
)
27 const char *load_file
= NULL
;
28 bool force_init
= false;
32 while ((ch
= getopt(argc
, argv
, "fl:o")) != -1) {
44 return usage(argv
[0]);
48 if (qosify_loader_init(force_init
))
51 if (qosify_map_init())
54 if (qosify_map_load_file(load_file
))
60 ulog_open(ULOG_SYSLOG
, LOG_DAEMON
, "qosify");
63 if (qosify_ubus_init() ||