Add input interface's name to JSON log

pull/1071/head
Alexander Gozman 11 years ago committed by Victor Julien
parent 2bcd48bc12
commit a6dbf627b2

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

Loading…
Cancel
Save