olsrd.git
4 years agoinfo: rename type outbuffer_t to info_plugin_outbuffer_t
Ferry Huberts [Tue, 1 Dec 2015 17:29:05 +0000 (18:29 +0100)]
info: rename type outbuffer_t to info_plugin_outbuffer_t

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: rename variable printer_functions to functions
Ferry Huberts [Wed, 2 Dec 2015 11:02:43 +0000 (12:02 +0100)]
jsoninfo: rename variable printer_functions to functions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: rename variable printer_functions to functions
Ferry Huberts [Wed, 2 Dec 2015 11:02:40 +0000 (12:02 +0100)]
txtinfo: rename variable printer_functions to functions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename variable printer_functions to functions
Ferry Huberts [Tue, 1 Dec 2015 17:28:04 +0000 (18:28 +0100)]
info: rename variable printer_functions to functions

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename type printer_functions_t to info_plugin_functions_t
Ferry Huberts [Wed, 2 Dec 2015 11:00:30 +0000 (12:00 +0100)]
info: rename type printer_functions_t to info_plugin_functions_t

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: rename some http header function parameters
Ferry Huberts [Tue, 1 Dec 2015 17:23:18 +0000 (18:23 +0100)]
info: rename some http header function parameters

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: code formatting
Ferry Huberts [Tue, 1 Dec 2015 17:33:02 +0000 (18:33 +0100)]
info: code formatting

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move code from olsr_jsoninfo into olsr_plugin
Ferry Huberts [Wed, 2 Dec 2015 10:54:22 +0000 (11:54 +0100)]
jsoninfo: move code from olsr_jsoninfo into olsr_plugin

To make it more compact

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: move code from olsr_txtinfo into olsr_plugin
Ferry Huberts [Wed, 2 Dec 2015 10:54:07 +0000 (11:54 +0100)]
txtinfo: move code from olsr_txtinfo into olsr_plugin

To make it more compact

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoMakefile: add pseudo plugin info
Ferry Huberts [Wed, 2 Dec 2015 18:10:27 +0000 (19:10 +0100)]
Makefile: add pseudo plugin info

And make jsoninfo and txtinfo depend on it.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoinfo: merge jsoninfo and txtinfo common code
Ferry Huberts [Tue, 1 Dec 2015 18:16:15 +0000 (19:16 +0100)]
info: merge jsoninfo and txtinfo common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: wrap generic info plugin configuration in a struct
Ferry Huberts [Wed, 2 Dec 2015 10:48:43 +0000 (11:48 +0100)]
jsoninfo: wrap generic info plugin configuration in a struct

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: wrap generic info plugin configuration in a struct
Ferry Huberts [Wed, 2 Dec 2015 10:48:40 +0000 (11:48 +0100)]
txtinfo: wrap generic info plugin configuration in a struct

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: convert ACTIVATE_VTIME_TXTINFO into a plugin parameter
Ferry Huberts [Tue, 1 Dec 2015 16:11:30 +0000 (17:11 +0100)]
txtinfo: convert ACTIVATE_VTIME_TXTINFO into a plugin parameter

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter
Ferry Huberts [Wed, 2 Dec 2015 10:43:02 +0000 (11:43 +0100)]
jsoninfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter
Ferry Huberts [Wed, 2 Dec 2015 10:42:55 +0000 (11:42 +0100)]
txtinfo: convert INFO_ALLOW_LOCALHOST define into a plugin parameter

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: put output start/end in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:40:11 +0000 (11:40 +0100)]
jsoninfo: put output start/end in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: put output start/end in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:40:07 +0000 (11:40 +0100)]
txtinfo: put output start/end in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: put command parsing in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:32:51 +0000 (11:32 +0100)]
jsoninfo: put command parsing in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: put command parsing in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:32:44 +0000 (11:32 +0100)]
txtinfo: put command parsing in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: put the plugin init hook in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:31:09 +0000 (11:31 +0100)]
jsoninfo: put the plugin init hook in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: put the plugin init hook in the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:31:04 +0000 (11:31 +0100)]
txtinfo: put the plugin init hook in the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: determine the mime type via the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:29:40 +0000 (11:29 +0100)]
jsoninfo: determine the mime type via the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: determine the mime type via the functions table
Ferry Huberts [Wed, 2 Dec 2015 10:29:32 +0000 (11:29 +0100)]
txtinfo: determine the mime type via the functions table

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: only need to reset entry number for json output
Ferry Huberts [Tue, 1 Dec 2015 14:09:13 +0000 (15:09 +0100)]
jsoninfo: only need to reset entry number for json output

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: wrap the outbuffer in a struct for easier usage
Ferry Huberts [Wed, 2 Dec 2015 10:25:43 +0000 (11:25 +0100)]
jsoninfo: wrap the outbuffer in a struct for easier usage

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: wrap the outbuffer in a struct for easier usage
Ferry Huberts [Wed, 2 Dec 2015 10:25:39 +0000 (11:25 +0100)]
txtinfo: wrap the outbuffer in a struct for easier usage

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move SIW_x defines into common code
Ferry Huberts [Wed, 2 Dec 2015 10:24:08 +0000 (11:24 +0100)]
jsoninfo: move SIW_x defines into common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: move SIW_x defines into common code
Ferry Huberts [Wed, 2 Dec 2015 10:24:04 +0000 (11:24 +0100)]
txtinfo: move SIW_x defines into common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use a table of function pointers in send_info
Ferry Huberts [Tue, 1 Dec 2015 15:41:42 +0000 (16:41 +0100)]
jsoninfo: use a table of function pointers in send_info

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: use a table of function pointers in send_info
Ferry Huberts [Tue, 1 Dec 2015 08:53:38 +0000 (09:53 +0100)]
txtinfo: use a table of function pointers in send_info

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move ipc_print_* functions into a 'printers' unit
Ferry Huberts [Tue, 1 Dec 2015 07:31:04 +0000 (08:31 +0100)]
jsoninfo: move ipc_print_* functions into a 'printers' unit

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: move ipc_print_* functions into a 'printers' unit
Ferry Huberts [Tue, 1 Dec 2015 07:08:19 +0000 (08:08 +0100)]
txtinfo: move ipc_print_* functions into a 'printers' unit

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: add plugin_init hook
Ferry Huberts [Tue, 1 Dec 2015 06:43:24 +0000 (07:43 +0100)]
jsoninfo: add plugin_init hook

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: add plugin_init hook
Ferry Huberts [Tue, 1 Dec 2015 06:43:14 +0000 (07:43 +0100)]
txtinfo: add plugin_init hook

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move determining the action into a separate function
Ferry Huberts [Tue, 1 Dec 2015 06:41:37 +0000 (07:41 +0100)]
jsoninfo: move determining the action into a separate function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: move determining the action into a separate function
Ferry Huberts [Tue, 1 Dec 2015 06:41:26 +0000 (07:41 +0100)]
txtinfo: move determining the action into a separate function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move http header related functions into common code
Ferry Huberts [Wed, 2 Dec 2015 10:06:23 +0000 (11:06 +0100)]
jsoninfo: move http header related functions into common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: move http header related functions into common code
Ferry Huberts [Wed, 2 Dec 2015 10:06:11 +0000 (11:06 +0100)]
txtinfo: move http header related functions into common code

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: add Freifunk neighbours special case, like txtinfo
Ferry Huberts [Mon, 30 Nov 2015 20:37:23 +0000 (21:37 +0100)]
jsoninfo: add Freifunk neighbours special case, like txtinfo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fix some indents
Ferry Huberts [Mon, 30 Nov 2015 20:33:00 +0000 (21:33 +0100)]
jsoninfo: fix some indents

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: reorder some includes
Ferry Huberts [Wed, 2 Dec 2015 10:03:30 +0000 (11:03 +0100)]
jsoninfo: reorder some includes

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use standard set_plugin_string function for uuidfile parameter
Ferry Huberts [Tue, 1 Dec 2015 08:14:04 +0000 (09:14 +0100)]
jsoninfo: use standard set_plugin_string function for uuidfile parameter

Not the custom store_string function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: initialise uuidfile as well
Ferry Huberts [Tue, 1 Dec 2015 08:11:22 +0000 (09:11 +0100)]
jsoninfo: initialise uuidfile as well

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fix PLUGIN_NAME that is reported on plugin init
Ferry Huberts [Tue, 1 Dec 2015 08:10:42 +0000 (09:10 +0100)]
jsoninfo: fix PLUGIN_NAME that is reported on plugin init

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: INADDR_LOOPBACK is in host format and the socket address is not
Ferry Huberts [Mon, 30 Nov 2015 21:50:54 +0000 (22:50 +0100)]
jsoninfo: INADDR_LOOPBACK is in host format and the socket address is not

e2149e7 did this for txtinfo, but forgot to apply the same
fix for jsoninfo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: add /runtime and /startup commands
Ferry Huberts [Mon, 30 Nov 2015 21:45:18 +0000 (22:45 +0100)]
txtinfo: add /runtime and /startup commands

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: add (unsupported) commands '/config' and '/plugins'
Ferry Huberts [Mon, 30 Nov 2015 21:44:47 +0000 (22:44 +0100)]
txtinfo: add (unsupported) commands '/config' and '/plugins'

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: '/ver' and '/neighbours' are specials when determining the action
Ferry Huberts [Mon, 30 Nov 2015 21:41:23 +0000 (22:41 +0100)]
txtinfo: '/ver' and '/neighbours' are specials when determining the action

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: send the information in the runtime and startup groups for '/all'
Ferry Huberts [Tue, 1 Dec 2015 13:17:04 +0000 (14:17 +0100)]
txtinfo: send the information in the runtime and startup groups for '/all'

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: catch '/all' earlier when determining the action
Ferry Huberts [Tue, 1 Dec 2015 13:15:34 +0000 (14:15 +0100)]
txtinfo: catch '/all' earlier when determining the action

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: treat the olsrd configuration differently
Ferry Huberts [Mon, 30 Nov 2015 20:19:29 +0000 (21:19 +0100)]
txtinfo: treat the olsrd configuration differently

It is not included in the runtime or startup groups and
therefore not a 'normal' output.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: use the same 'c-basic-offset: 2' as jsoninfo
Ferry Huberts [Tue, 1 Dec 2015 22:38:16 +0000 (23:38 +0100)]
txtinfo: use the same 'c-basic-offset: 2' as jsoninfo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agosrc: add some forgotten includes
Ferry Huberts [Tue, 1 Dec 2015 06:58:28 +0000 (07:58 +0100)]
src: add some forgotten includes

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: remove an unused define
Ferry Huberts [Mon, 30 Nov 2015 14:06:57 +0000 (15:06 +0100)]
jsoninfo: remove an unused define

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use the same order as txtinfo
Ferry Huberts [Mon, 30 Nov 2015 13:18:47 +0000 (14:18 +0100)]
jsoninfo: use the same order as txtinfo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: undo output re-ordering of 4563faa
Ferry Huberts [Mon, 30 Nov 2015 13:18:21 +0000 (14:18 +0100)]
txtinfo: undo output re-ordering of 4563faa

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoexit: fix some exit codes
Ferry Huberts [Mon, 30 Nov 2015 12:51:12 +0000 (13:51 +0100)]
exit: fix some exit codes

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoexit: use EXIT_SUCCESS or EXIT_FAILURE exclusively
Ferry Huberts [Mon, 30 Nov 2015 12:45:11 +0000 (13:45 +0100)]
exit: use EXIT_SUCCESS or EXIT_FAILURE exclusively

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoolsr_exit: fix some exit codes
Ferry Huberts [Mon, 30 Nov 2015 11:49:07 +0000 (12:49 +0100)]
olsr_exit: fix some exit codes

EXIT_FAILURE is the correct code to return on failure (duh)

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agoolsr_exit: use EXIT_SUCCESS or EXIT_FAILURE exclusively
Ferry Huberts [Mon, 30 Nov 2015 11:28:28 +0000 (12:28 +0100)]
olsr_exit: use EXIT_SUCCESS or EXIT_FAILURE exclusively

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: bring over proper http header support from jsoninfo
Ferry Huberts [Fri, 27 Nov 2015 12:58:29 +0000 (13:58 +0100)]
txtinfo: bring over proper http header support from jsoninfo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: send http headers by default
Ferry Huberts [Fri, 27 Nov 2015 15:02:38 +0000 (16:02 +0100)]
jsoninfo: send http headers by default

Make it spec compliant

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: avoid a memcpy: just move the abuf.buf pointer and clear abuf
Ferry Huberts [Fri, 27 Nov 2015 12:58:45 +0000 (13:58 +0100)]
jsoninfo: avoid a memcpy: just move the abuf.buf pointer and clear abuf

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: also send the (UTF-8) charset in the content type
Ferry Huberts [Fri, 27 Nov 2015 15:04:21 +0000 (16:04 +0100)]
jsoninfo: also send the (UTF-8) charset in the content type

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: refactor generation of the headers
Ferry Huberts [Fri, 27 Nov 2015 12:37:41 +0000 (13:37 +0100)]
jsoninfo: refactor generation of the headers

Just generate the headers at the start, leaving the Content-Length
value empty with a 12-spaces placeholder. Then at the end fill
in the value.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: avoid a memcpy: just move the abuf.buf pointer and clear abuf
Ferry Huberts [Fri, 27 Nov 2015 15:13:03 +0000 (16:13 +0100)]
txtinfo: avoid a memcpy: just move the abuf.buf pointer and clear abuf

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: also send the (UTF-8) charset in the content type
Ferry Huberts [Fri, 27 Nov 2015 15:12:01 +0000 (16:12 +0100)]
txtinfo: also send the (UTF-8) charset in the content type

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: remove a pointless assert
Ferry Huberts [Fri, 27 Nov 2015 13:00:54 +0000 (14:00 +0100)]
txtinfo: remove a pointless assert

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fixup the Content-Length http header
Ferry Huberts [Fri, 27 Nov 2015 11:58:35 +0000 (12:58 +0100)]
jsoninfo: fixup the Content-Length http header

Make it spec compliant

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fixup the Content-Type http header
Ferry Huberts [Fri, 27 Nov 2015 11:58:17 +0000 (12:58 +0100)]
jsoninfo: fixup the Content-Type http header

Make it spec compliant

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fixup the Connection http header
Ferry Huberts [Fri, 27 Nov 2015 11:58:00 +0000 (12:58 +0100)]
jsoninfo: fixup the Connection http header

Make it spec compliant

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fixup the Server http header
Ferry Huberts [Fri, 27 Nov 2015 11:57:39 +0000 (12:57 +0100)]
jsoninfo: fixup the Server http header

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: ensure date in http header is in GMT, as advertised
Ferry Huberts [Fri, 27 Nov 2015 11:57:27 +0000 (12:57 +0100)]
jsoninfo: ensure date in http header is in GMT, as advertised

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: fixup the Content-Type http header
Ferry Huberts [Fri, 27 Nov 2015 12:28:54 +0000 (13:28 +0100)]
txtinfo: fixup the Content-Type http header

Make it spec compliant

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move json support functions into their own file
Ferry Huberts [Fri, 27 Nov 2015 09:01:35 +0000 (10:01 +0100)]
jsoninfo: move json support functions into their own file

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move some variables around
Ferry Huberts [Thu, 26 Nov 2015 19:21:52 +0000 (20:21 +0100)]
jsoninfo: move some variables around

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: remove personal copyrights, just check the git log
Ferry Huberts [Thu, 26 Nov 2015 19:21:24 +0000 (20:21 +0100)]
jsoninfo: remove personal copyrights, just check the git log

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: fix content type of http headers for /olsr.conf
Ferry Huberts [Thu, 26 Nov 2015 19:14:44 +0000 (20:14 +0100)]
jsoninfo: fix content type of http headers for /olsr.conf

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: more formatting
Ferry Huberts [Thu, 26 Nov 2015 19:05:47 +0000 (20:05 +0100)]
jsoninfo: more formatting

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: rename a function
Ferry Huberts [Thu, 26 Nov 2015 19:05:35 +0000 (20:05 +0100)]
jsoninfo: rename a function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: limit the number of in-flight connection to 3, like txtinfo
Ferry Huberts [Thu, 26 Nov 2015 19:05:10 +0000 (20:05 +0100)]
jsoninfo: limit the number of in-flight connection to 3, like txtinfo

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use a smaller (2 CPU pages) initial buffer
Ferry Huberts [Thu, 26 Nov 2015 19:04:27 +0000 (20:04 +0100)]
jsoninfo: use a smaller (2 CPU pages) initial buffer

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use the plugin name in a malloc call
Ferry Huberts [Thu, 26 Nov 2015 19:04:03 +0000 (20:04 +0100)]
jsoninfo: use the plugin name in a malloc call

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: move some functions around
Ferry Huberts [Thu, 26 Nov 2015 18:59:37 +0000 (19:59 +0100)]
jsoninfo: move some functions around

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: update some comments
Ferry Huberts [Thu, 26 Nov 2015 18:52:12 +0000 (19:52 +0100)]
jsoninfo: update some comments

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: initialise outbuffer_count
Ferry Huberts [Thu, 26 Nov 2015 18:51:15 +0000 (19:51 +0100)]
jsoninfo: initialise outbuffer_count

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use the set_plugin_boolean function
Ferry Huberts [Thu, 26 Nov 2015 18:49:52 +0000 (19:49 +0100)]
jsoninfo: use the set_plugin_boolean function

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use a define to rename TXTINFO_ALLOW_LOCALHOST
Ferry Huberts [Thu, 26 Nov 2015 18:35:46 +0000 (19:35 +0100)]
jsoninfo: use a define to rename TXTINFO_ALLOW_LOCALHOST

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use defines for some variables
Ferry Huberts [Thu, 26 Nov 2015 18:32:15 +0000 (19:32 +0100)]
jsoninfo: use defines for some variables

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agojsoninfo: use a define for the plugin name
Ferry Huberts [Thu, 26 Nov 2015 17:46:55 +0000 (18:46 +0100)]
jsoninfo: use a define for the plugin name

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: remove personal copyrights, just check the git log
Ferry Huberts [Thu, 26 Nov 2015 19:21:36 +0000 (20:21 +0100)]
txtinfo: remove personal copyrights, just check the git log

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: expand SIW_RUNTIME_ALL to include all runtime information
Ferry Huberts [Thu, 26 Nov 2015 18:48:01 +0000 (19:48 +0100)]
txtinfo: expand SIW_RUNTIME_ALL to include all runtime information

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: remove superfluous forward declarations
Ferry Huberts [Thu, 26 Nov 2015 18:43:27 +0000 (19:43 +0100)]
txtinfo: remove superfluous forward declarations

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: some more formatting
Ferry Huberts [Thu, 26 Nov 2015 17:43:15 +0000 (18:43 +0100)]
txtinfo: some more formatting

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: send everything on an unknown option
Ferry Huberts [Thu, 26 Nov 2015 17:41:01 +0000 (18:41 +0100)]
txtinfo: send everything on an unknown option

Instead of all runtime information

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: the configuration is a special case
Ferry Huberts [Thu, 26 Nov 2015 17:38:51 +0000 (18:38 +0100)]
txtinfo: the configuration is a special case

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: renumber SIW_x defines and put them in 'groups'
Ferry Huberts [Thu, 26 Nov 2015 17:28:58 +0000 (18:28 +0100)]
txtinfo: renumber SIW_x defines and put them in 'groups'

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: use a bigger (2 CPU pages) initial buffer
Ferry Huberts [Thu, 26 Nov 2015 14:26:33 +0000 (15:26 +0100)]
txtinfo: use a bigger (2 CPU pages) initial buffer

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
4 years agotxtinfo: use HTTP/1.1
Ferry Huberts [Thu, 26 Nov 2015 14:24:29 +0000 (15:24 +0100)]
txtinfo: use HTTP/1.1

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>