Add warning about needing a patch for Barnyard 0.2.0 on 64-bit. Rename sc_timeval32 to SCTimeval32.

remotes/origin/master-1.0.x
Victor Julien 16 years ago
parent 0febe449e6
commit 18e00dc6d0

@ -87,8 +87,8 @@ typedef struct AlertUnifiedAlertPacketHeader_ {
struct timeval ref_ts; /* Reference timestamp. */
struct timeval ts; /* Timestamp. */
#else
struct sc_timeval32 ref_ts; /* Reference timestamp. */
struct sc_timeval32 ts; /* Timestamp. */
SCTimeval32 ref_ts; /* Reference timestamp. */
SCTimeval32 ts; /* Timestamp. */
#endif /* UNIFIED_NATIVE_TIMEVAL */
uint32_t src_ip;
uint32_t dst_ip;

@ -56,6 +56,12 @@ void TmModuleAlertUnifiedLogRegister (void) {
tmm_modules[TMM_ALERTUNIFIEDLOG].RegisterTests = AlertUnifiedLogRegisterTests;
OutputRegisterModule(MODULE_NAME, "unified-log", AlertUnifiedLogInitCtx);
#if __WORDSIZE == 64
SCLogInfo("The Unified1 module detected a 64-bit system. For Barnyard "
"0.2.0 to work correctly, it needs to be patched. Patch can be "
"found here: https://redmine.openinfosecfoundation.org/attachments/download/184/barnyard.64bit.diff");
#endif
}
typedef struct AlertUnifiedLogThread_ {
@ -89,7 +95,7 @@ typedef struct AlertUnifiedLogPacketHeader_ {
#ifdef UNIFIED_NATIVE_TIMEVAL
struct timeval ref_tv;
#else
struct sc_timeval32 ref_tv;
SCTimeval32 ref_tv;
#endif /* UNIFIED_NATIVE_TIMEVAL */
/* 32 bit unsigned flags */
@ -99,7 +105,7 @@ typedef struct AlertUnifiedLogPacketHeader_ {
#ifdef UNIFIED_NATIVE_TIMEVAL
struct timeval tv;
#else
struct sc_timeval32 tv;
SCTimeval32 tv;
#endif /* UNIFIED_NATIVE_TIMEVAL */
uint32_t caplen;
uint32_t pktlen;

@ -6,10 +6,10 @@
*
* Used by the unified on disk file format.
*/
struct sc_timeval32 {
typedef struct SCTimeval32_ {
uint32_t tv_sec;
uint32_t tv_usec;
};
} SCTimeval32;
void TimeSet(struct timeval *);
void TimeGet(struct timeval *);

Loading…
Cancel
Save