From: Victor Julien Date: Wed, 17 Jun 2015 10:34:58 +0000 (+0200) Subject: file extract: add app_proto to logging X-Git-Tag: suricata-3.0RC1~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1556%2Fhead;p=thirdparty%2Fsuricata.git file extract: add app_proto to logging --- diff --git a/src/log-filestore.c b/src/log-filestore.c index 3caee3b7ff..8686a0a49f 100644 --- a/src/log-filestore.c +++ b/src/log-filestore.c @@ -207,6 +207,9 @@ static void LogFilestoreLogCreateMetaFile(const Packet *p, const File *ff, char fprintf(fp, "DST PORT: %" PRIu16 "\n", dp); } + fprintf(fp, "APP PROTO: %s\n", + AppProtoToString(p->flow->alproto)); + /* Only applicable to HTTP traffic */ if (p->flow->alproto == ALPROTO_HTTP) { fprintf(fp, "HTTP URI: "); diff --git a/src/output-json-file.c b/src/output-json-file.c index 22b9f98cad..5464088f16 100644 --- a/src/output-json-file.c +++ b/src/output-json-file.c @@ -187,6 +187,7 @@ static void FileWriteJsonRecord(JsonFileLogThread *aft, const Packet *p, const F return; } + json_object_set_new(hjs, "app_proto", json_string(AppProtoToString(p->flow->alproto))); switch (p->flow->alproto) { case ALPROTO_HTTP: json_object_set_new(hjs, "url", LogFileMetaGetUri(p, ff));