@ -1,4 +1,4 @@
/* Copyright (C) 2007-201 0 Open Information Security Foundation
/* Copyright (C) 2007-201 3 Open Information Security Foundation
*
* You can copy , redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
@ -56,6 +56,7 @@
# include "util-proto-name.h"
# include "util-optimize.h"
# include "util-logopenfile.h"
# include "util-time.h"
# define DEFAULT_LOG_FILENAME "fast.log"
@ -105,16 +106,6 @@ typedef struct AlertFastLogThread_ {
LogFileCtx * file_ctx ;
} AlertFastLogThread ;
static void CreateTimeString ( const struct timeval * ts , char * str , size_t size ) {
time_t time = ts - > tv_sec ;
struct tm local_tm ;
struct tm * t = ( struct tm * ) SCLocalTime ( time , & local_tm ) ;
snprintf ( str , size , " %02d/%02d/%02d-%02d:%02d:%02d.%06u " ,
t - > tm_mon + 1 , t - > tm_mday , t - > tm_year + 1900 , t - > tm_hour ,
t - > tm_min , t - > tm_sec , ( uint32_t ) ts - > tv_usec ) ;
}
TmEcode AlertFastLogIPv4 ( ThreadVars * tv , Packet * p , void * data , PacketQueue * pq , PacketQueue * postpq )
{
AlertFastLogThread * aft = ( AlertFastLogThread * ) data ;