|
|
@ -57,6 +57,7 @@
|
|
|
|
#include "util-optimize.h"
|
|
|
|
#include "util-optimize.h"
|
|
|
|
#include "util-buffer.h"
|
|
|
|
#include "util-buffer.h"
|
|
|
|
#include "util-logopenfile.h"
|
|
|
|
#include "util-logopenfile.h"
|
|
|
|
|
|
|
|
#include "util-device.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef HAVE_LIBJANSSON
|
|
|
|
#ifndef HAVE_LIBJANSSON
|
|
|
@ -245,6 +246,11 @@ json_t *CreateJSONHeader(Packet *p, int direction_sensitive, char *event_type)
|
|
|
|
if (sensor_id >= 0)
|
|
|
|
if (sensor_id >= 0)
|
|
|
|
json_object_set_new(js, "sensor_id", json_integer(sensor_id));
|
|
|
|
json_object_set_new(js, "sensor_id", json_integer(sensor_id));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* input interface */
|
|
|
|
|
|
|
|
if (p->livedev) {
|
|
|
|
|
|
|
|
json_object_set_new(js, "in_iface", json_string(p->livedev->dev));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* pcap_cnt */
|
|
|
|
/* pcap_cnt */
|
|
|
|
if (p->pcap_cnt != 0) {
|
|
|
|
if (p->pcap_cnt != 0) {
|
|
|
|
json_object_set_new(js, "pcap_cnt", json_integer(p->pcap_cnt));
|
|
|
|
json_object_set_new(js, "pcap_cnt", json_integer(p->pcap_cnt));
|
|
|
|