output: add json format support

Reviewed-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Gilles Bouthenot <gilles.bouthenot@univ-fcomte.fr>
This commit is contained in:
Gilles Bouthenot 2012-12-04 17:17:14 +01:00 committed by Sami Kerola
parent 179e2ac147
commit a302bc6829
7 changed files with 156 additions and 5 deletions

View file

@ -119,7 +119,7 @@ int parse_leases(void)
line = xmalloc(sizeof(char) * MAXLEN);
ipstring = xmalloc(sizeof(char) * MAXLEN);
if (config.output_format[0] == 'X') {
if (config.output_format[0] == 'X' || config.output_format[0] == 'J') {
macstring = xmalloc(sizeof(char) * 18);
macaddr = xmalloc(sizeof(struct macaddr_t));
macaddr_p = macaddr;