From: Ferry Huberts Date: Mon, 30 Nov 2015 21:44:47 +0000 (+0100) Subject: txtinfo: add (unsupported) commands '/config' and '/plugins' X-Git-Tag: v0.9.5~577 X-Git-Url: http://olsr.org/git/?p=olsrd.git;a=commitdiff_plain;h=9e1b4a1b639646b0e970ae30a8bda599f2dac98c txtinfo: add (unsupported) commands '/config' and '/plugins' Signed-off-by: Ferry Huberts --- diff --git a/lib/txtinfo/src/olsrd_txtinfo.c b/lib/txtinfo/src/olsrd_txtinfo.c index 0ffbf53d..13a4e9c0 100644 --- a/lib/txtinfo/src/olsrd_txtinfo.c +++ b/lib/txtinfo/src/olsrd_txtinfo.c @@ -121,7 +121,9 @@ static void ipc_action(int, void *, unsigned int); /* these only change at olsrd startup */ #define SIW_VERSION 0x0400 -#define SIW_STARTUP_ALL (SIW_VERSION) +#define SIW_CONFIG 0x0800 +#define SIW_PLUGINS 0x1000 +#define SIW_STARTUP_ALL (SIW_VERSION | SIW_CONFIG | SIW_PLUGINS) /* this is everything in normal format */ #define SIW_ALL (SIW_RUNTIME_ALL | SIW_STARTUP_ALL) @@ -399,6 +401,10 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int // specials if (strstr(requ, "/ver")) send_what |= SIW_VERSION; + if (strstr(requ, "/config")) + send_what |= SIW_CONFIG; + if (strstr(requ, "/plugins")) + send_what |= SIW_PLUGINS; /* To print out neighbours only on the Freifunk Status * page the normal output is somewhat lengthy. The @@ -885,12 +891,18 @@ static void send_info(unsigned int send_what, int the_socket) { ipc_print_routes(&abuf); if (send_what & SIW_GATEWAYS) ipc_print_gateways(&abuf); + if (send_what & SIW_CONFIG) { + /* not supported */ + } if (send_what & SIW_INTERFACES) ipc_print_interfaces(&abuf); if (send_what & SIW_2HOP) ipc_print_neighbors(&abuf, true); if (send_what & SIW_VERSION) ipc_print_version(&abuf); + if (send_what & SIW_PLUGINS) { + /* not supported */ + } } else if (send_what & SIW_OLSRD_CONF) { /* this outputs the olsrd.conf text directly, not normal format */ ipc_print_olsrd_conf(&abuf);