From: David Härdeman Date: Sun, 5 Oct 2025 15:32:52 +0000 (+0200) Subject: odhcpd: print compiled-in features in help message X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=63617a2d2df02054d9d55b2aa2dd56249339fdf1;p=project%2Fodhcpd.git odhcpd: print compiled-in features in help message This is mostly useful for hacking, as a way to quickly determine from the command-line how odhcpd has been built. But I also plan to use it in LuCI [1]. [1] https://github.com/openwrt/luci/blob/master/modules/luci-base/root/usr/share/rpcd/ucode/luci Signed-off-by: David Härdeman Link: https://github.com/openwrt/odhcpd/pull/268 Signed-off-by: Álvaro Fernández Rojas --- diff --git a/src/odhcpd.c b/src/odhcpd.c index 1cab203..9bb9ddc 100644 --- a/src/odhcpd.c +++ b/src/odhcpd.c @@ -55,6 +55,23 @@ static void sighandler(_unused int signal) static void print_usage(const char *app) { printf("== %s Usage ==\n" + "Features: ra ndp dhcpv6" +#ifdef DHCPV4_SUPPORT + " dhcpv4" +#else + " no-dhcpv4" +#endif /* DHCPV4_SUPPORT */ +#ifdef UBUS + " ubus" +#else + " no-ubus" +#endif /* UBUS */ +#ifdef EXT_CER_ID + " cer" +#else + " no-cer" +#endif /* EXT_CER_ID */ + "\n" "\n" " -c Use an alternative configuration file\n" " -l Specify log level 0..7 (default %d)\n"