diff options
| author | David Härdeman | 2025-10-05 15:32:52 +0000 |
|---|---|---|
| committer | Álvaro Fernández Rojas | 2025-10-07 08:45:27 +0000 |
| commit | 63617a2d2df02054d9d55b2aa2dd56249339fdf1 (patch) | |
| tree | 436722d5eae946eaaafa14c174ec68f57e90f295 | |
| parent | 0b0ddaa9a1a4bf51fd95db93900d9b56101a34d1 (diff) | |
| download | odhcpd-63617a2d2df02054d9d55b2aa2dd56249339fdf1.tar.gz | |
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 <david@hardeman.nu>
Link: https://github.com/openwrt/odhcpd/pull/268
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
| -rw-r--r-- | src/odhcpd.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 <path> Use an alternative configuration file\n" " -l <int> Specify log level 0..7 (default %d)\n" |