compiling json module

This commit is contained in:
Zakir Durumeric 2013-08-30 00:52:26 -04:00
parent 65d19a8199
commit 5aee06935c
3 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,11 @@
/*
* ZMap Copyright 2013 Regents of the University of Michigan
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
#include "fieldset.h"
#include <string.h>

View File

@ -30,7 +30,7 @@
static FILE *file = NULL;
#define UNUSED __attribute__((unused))
int json_output_file_init(struct state_conf *conf)
int json_output_file_init(struct state_conf *conf, UNUSED char **fields, UNUSED int fieldlens)
{
int i;
char mac_buf[ (IFHWADDRLEN * 2) + (IFHWADDRLEN - 1) + 1 ];
@ -65,7 +65,7 @@ int json_output_file_init(struct state_conf *conf)
}
json_object_object_add(obj, "rate", json_object_new_int(conf->rate));
json_object_object_add(obj, "bandwidth", json_object_new_int64(conf->bandwidth));
json_object_object_add(obj, "bandwidth", json_object_new_int(conf->bandwidth));
json_object_object_add(obj, "cooldown_secs", json_object_new_int(conf->cooldown_secs));
json_object_object_add(obj, "senders", json_object_new_int(conf->senders));
json_object_object_add(obj, "use_seed", json_object_new_int(conf->use_seed));
@ -185,6 +185,6 @@ output_module_t module_json_file = {
.update = NULL,
.update_interval = 0,
.close = &json_output_file_close,
.success_ip = &json_output_file_ip,
.process_ip = &json_output_file_ip,
};

View File

@ -23,12 +23,12 @@ extern output_module_t module_json_file;
#endif
output_module_t* output_modules[] = {
&module_csv_file
&module_csv_file,
#ifdef REDIS
//&module_redis,
#endif
#ifdef JSON
&module_json_file,
&module_json_file
#endif
// ADD YOUR MODULE HERE
};