rename alert-json.[ch] output-json.[ch]

pull/802/head
Tom DeCanio 12 years ago committed by Victor Julien
parent 3bc95c9258
commit 3241732e27

@ -9,7 +9,6 @@ bin_PROGRAMS = suricata
suricata_SOURCES = \
alert-debuglog.c alert-debuglog.h \
alert-fastlog.c alert-fastlog.h \
alert-json.c alert-json.h \
alert-pcapinfo.c alert-pcapinfo.h \
alert-prelude.c alert-prelude.h \
alert-syslog.c alert-syslog.h \
@ -221,6 +220,7 @@ output-packet.c output-packet.h \
output-tx.c output-tx.h \
output-dnslog.c output-dnslog.h \
output-httplog.c output-httplog.h \
output-json.c output-json.h \
output-tlslog.c output-tlslog.h \
packet-queue.c packet-queue.h \
pkt-var.c pkt-var.h \

@ -48,7 +48,7 @@
#include "util-logopenfile.h"
#include "util-time.h"
#include "alert-json.h"
#include "output-json.h"
#ifdef HAVE_LIBJANSSON
#include <jansson.h>
@ -209,12 +209,6 @@ static TmEcode DnsJsonIPWrapper(ThreadVars *tv, Packet *p, void *data, PacketQue
AlertJsonThread *aft = (AlertJsonThread *)data;
/* no flow, no htp state */
if (p->flow == NULL) {
SCLogDebug("no flow");
SCReturnInt(TM_ECODE_OK);
}
/* check if we have DNS state or not */
FLOWLOCK_WRLOCK(p->flow); /* WRITE lock before we updated flow logged id */
uint16_t proto = AppLayerGetProtoFromPacket(p);
@ -275,6 +269,7 @@ end:
SCReturnInt(TM_ECODE_OK);
}
#if 0
int OutputDnsNeedsLog(Packet *p)
{
SCEnter();
@ -306,11 +301,21 @@ end:
SCReturnInt(1);
}
#endif
TmEcode OutputDnsLog(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, PacketQueue *postpq)
{
SCEnter();
/* no flow, no htp state */
if (p->flow == NULL) {
SCReturnInt(TM_ECODE_OK);
}
if (!(PKT_IS_UDP(p)) && !(PKT_IS_TCP(p))) {
SCReturnInt(TM_ECODE_OK);
}
DnsJsonIPWrapper(tv, p, data, pq, postpq, AF_INET);
SCReturnInt(TM_ECODE_OK);

@ -47,7 +47,7 @@
#include "util-proto-name.h"
#include "util-logopenfile.h"
#include "util-time.h"
#include "alert-json.h"
#include "output-json.h"
#ifdef HAVE_LIBJANSSON
#include <jansson.h>

@ -60,7 +60,7 @@
#include "util-buffer.h"
#include "util-logopenfile.h"
#include "alert-json.h"
#include "output-json.h"
#ifndef HAVE_LIBJANSSON
@ -524,9 +524,7 @@ TmEcode AlertJson (ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, Packe
}
if (outputFlags & OUTPUT_DNS) {
if (OutputDnsNeedsLog(p)) {
OutputDnsLog(tv, p, data, pq, postpq);
}
OutputDnsLog(tv, p, data, pq, postpq);
}
if (outputFlags & OUTPUT_HTTP) {

@ -63,4 +63,3 @@ typedef struct AlertJsonThread_ {
#endif /* HAVE_LIBJANSSON */
#endif /* __ALERT_JSON_H__ */

@ -48,7 +48,7 @@
#include "util-logopenfile.h"
#include "util-crypt.h"
#include "alert-json.h"
#include "output-json.h"
#ifdef HAVE_LIBJANSSON
#include <jansson.h>

@ -78,7 +78,6 @@
#include "alert-prelude.h"
#include "alert-syslog.h"
#include "alert-pcapinfo.h"
#include "alert-json.h"
#include "log-droplog.h"
#include "log-httplog.h"
@ -88,6 +87,7 @@
#include "log-file.h"
#include "log-filestore.h"
#include "output-json.h"
#include "output-dnslog.h"
#include "output-httplog.h"

Loading…
Cancel
Save