compiling json module
This commit is contained in:
parent
65d19a8199
commit
5aee06935c
@ -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 "fieldset.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
static FILE *file = NULL;
|
static FILE *file = NULL;
|
||||||
#define UNUSED __attribute__((unused))
|
#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;
|
int i;
|
||||||
char mac_buf[ (IFHWADDRLEN * 2) + (IFHWADDRLEN - 1) + 1 ];
|
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, "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, "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, "senders", json_object_new_int(conf->senders));
|
||||||
json_object_object_add(obj, "use_seed", json_object_new_int(conf->use_seed));
|
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 = NULL,
|
||||||
.update_interval = 0,
|
.update_interval = 0,
|
||||||
.close = &json_output_file_close,
|
.close = &json_output_file_close,
|
||||||
.success_ip = &json_output_file_ip,
|
.process_ip = &json_output_file_ip,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,12 +23,12 @@ extern output_module_t module_json_file;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
output_module_t* output_modules[] = {
|
output_module_t* output_modules[] = {
|
||||||
&module_csv_file
|
&module_csv_file,
|
||||||
#ifdef REDIS
|
#ifdef REDIS
|
||||||
//&module_redis,
|
//&module_redis,
|
||||||
#endif
|
#endif
|
||||||
#ifdef JSON
|
#ifdef JSON
|
||||||
&module_json_file,
|
&module_json_file
|
||||||
#endif
|
#endif
|
||||||
// ADD YOUR MODULE HERE
|
// ADD YOUR MODULE HERE
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user