output: add mustach templating support

Based on José Bollo's mustache C implementation.  This adaptation uses
project specific data structures to avoid overhead with json parsing.

Reference: https://gitlab.com/jobol/mustach.git
Commit: d84608a69033d38c81b8fcff0cb272e225dd5428
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2017-11-09 09:49:26 +00:00
parent fe847bb9b1
commit 7d9a5b5561
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
9 changed files with 741 additions and 6 deletions

View file

@ -225,6 +225,7 @@ struct configuration_t {
int output_format;
struct output_sort *sorts;
char *output_file;
char *mustach_template;
double warning;
double critical;
double warn_count;
@ -342,7 +343,10 @@ extern void mergesort_ranges(struct range_t *restrict orig, int size,
struct range_t *restrict temp)
__attribute__ ((nonnull(1, 3)));
/* output function */
extern void range_output_helper(struct output_helper_t *oh, struct range_t *range_p);
extern void shnet_output_helper(struct output_helper_t *oh, struct shared_network_t *shared_p);
extern int output_analysis(const char);
extern int mustach_dhcpd_pools(void);
/* Memory release, file closing etc */
extern void clean_up(void);
/* Hash functions */