From: Philippe Antoine Date: Fri, 7 Apr 2023 16:02:02 +0000 (+0200) Subject: all: remove unused literals X-Git-Tag: suricata-7.0.0-rc2~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d47dba27bf802dd78cdae41d9088159586c50c86;p=thirdparty%2Fsuricata.git all: remove unused literals --- diff --git a/src/alert-fastlog.h b/src/alert-fastlog.h index c2e825096f..cdac2a49d4 100644 --- a/src/alert-fastlog.h +++ b/src/alert-fastlog.h @@ -25,8 +25,6 @@ #define __ALERT_FASTLOG_H__ void AlertFastLogRegister(void); -void TmModuleAlertFastLogIPv4Register(void); -void TmModuleAlertFastLogIPv6Register(void); OutputInitResult AlertFastLogInitCtx(ConfNode *); #endif /* __ALERT_FASTLOG_H__ */ diff --git a/src/app-layer-dnp3.h b/src/app-layer-dnp3.h index 04c22015ae..6445631d97 100644 --- a/src/app-layer-dnp3.h +++ b/src/app-layer-dnp3.h @@ -23,11 +23,6 @@ #include "util-byte.h" #endif -/** - * The maximum size of a DNP3 link PDU. - */ -#define DNP3_MAX_LINK_PDU_LEN 292 - /* DNP3 application request function codes. */ #define DNP3_APP_FC_CONFIRM 0x00 #define DNP3_APP_FC_READ 0x01 diff --git a/src/app-layer-ftp.h b/src/app-layer-ftp.h index b9eb15eb57..39b53b6bf8 100644 --- a/src/app-layer-ftp.h +++ b/src/app-layer-ftp.h @@ -98,22 +98,6 @@ extern const FtpCommand FtpCommands[FTP_COMMAND_MAX + 1]; typedef uint32_t FtpRequestCommandArgOfs; -typedef uint16_t FtpResponseCode; - -enum { - FTP_FIELD_NONE = 0, - - FTP_FIELD_REQUEST_LINE, - FTP_FIELD_REQUEST_COMMAND, - FTP_FIELD_REQUEST_ARGS, - - FTP_FIELD_RESPONSE_LINE, - FTP_FIELD_RESPONSE_CODE, - - /* must be last */ - FTP_FIELD_MAX, -}; - /** used to hold the line state when we have fragmentation. */ typedef struct FtpLineState_ { /** used to indicate if the current_line buffer is a malloced buffer. We @@ -173,8 +157,6 @@ typedef struct FtpState_ { uint8_t *port_line; uint16_t dyn_port; - /* specifies which loggers are done logging */ - uint32_t logged; AppLayerStateData state_data; } FtpState; diff --git a/src/app-layer-htp.h b/src/app-layer-htp.h index 1928591bf3..5adda7343e 100644 --- a/src/app-layer-htp.h +++ b/src/app-layer-htp.h @@ -195,9 +195,7 @@ typedef struct HtpBody_ { uint64_t body_inspected; } HtpBody; -#define HTP_CONTENTTYPE_SET BIT_U8(0) /**< We have the content type */ #define HTP_BOUNDARY_SET BIT_U8(1) /**< We have a boundary string */ -#define HTP_BOUNDARY_OPEN BIT_U8(2) /**< We have a boundary string */ #define HTP_FILENAME_SET BIT_U8(3) /**< filename is registered in the flow */ #define HTP_DONTSTORE BIT_U8(4) /**< not storing this file */ #define HTP_STREAM_DEPTH_SET BIT_U8(5) /**< stream-depth is set */ @@ -248,7 +246,6 @@ typedef struct HtpState_ { htp_conn_t *conn; Flow *f; /**< Needed to retrieve the original flow when using HTPLib callbacks */ uint64_t transaction_cnt; - uint64_t store_tx_id; const struct HTPCfgRec_ *cfg; uint16_t flags; uint16_t events; diff --git a/src/app-layer-parser.h b/src/app-layer-parser.h index f1f38c4726..d27a08c851 100644 --- a/src/app-layer-parser.h +++ b/src/app-layer-parser.h @@ -181,9 +181,6 @@ void AppLayerParserRegisterLocalStorageFunc(uint8_t ipproto, AppProto proto, // AppLayerDecoderEvents *(*StateGetEvents)(void *) __attribute__((nonnull))); void AppLayerParserRegisterGetTxFilesFunc(uint8_t ipproto, AppProto alproto, AppLayerGetFileState (*GetTxFiles)(void *, void *, uint8_t)); -void AppLayerParserRegisterLoggerFuncs(uint8_t ipproto, AppProto alproto, - LoggerId (*StateGetTxLogged)(void *, void *), - void (*StateSetTxLogged)(void *, void *, LoggerId)); void AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto); void AppLayerParserRegisterLoggerBits(uint8_t ipproto, AppProto alproto, LoggerId bits); void AppLayerParserRegisterTruncateFunc(uint8_t ipproto, AppProto alproto, @@ -209,9 +206,6 @@ void AppLayerParserRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto, void AppLayerParserRegisterGetFrameFuncs(uint8_t ipproto, AppProto alproto, AppLayerParserGetFrameIdByNameFn GetFrameIdByName, AppLayerParserGetFrameNameByIdFn GetFrameNameById); -void AppLayerParserRegisterGetStreamDepth(uint8_t ipproto, - AppProto alproto, - uint32_t (*GetStreamDepth)(void)); void AppLayerParserRegisterSetStreamDepthFlag(uint8_t ipproto, AppProto alproto, void (*SetStreamDepthFlag)(void *tx, uint8_t flags)); diff --git a/src/app-layer-quic.h b/src/app-layer-quic.h index a0038bc086..d8a833d108 100644 --- a/src/app-layer-quic.h +++ b/src/app-layer-quic.h @@ -24,6 +24,5 @@ #define __APP_LAYER_QUIC_H__ void RegisterQuicParsers(void); -void QuicParserRegisterTests(void); #endif /* __APP_LAYER_QUIC_H__ */ diff --git a/src/app-layer-rdp.h b/src/app-layer-rdp.h index 9af2b143e7..8ede7cfdbb 100644 --- a/src/app-layer-rdp.h +++ b/src/app-layer-rdp.h @@ -25,6 +25,5 @@ #define __APP_LAYER_RDP_H__ void RegisterRdpParsers(void); -void RdpParserRegisterTests(void); #endif /* __APP_LAYER_RDP_H__ */ diff --git a/src/app-layer-ssl.h b/src/app-layer-ssl.h index 79933e6fca..f2e4262230 100644 --- a/src/app-layer-ssl.h +++ b/src/app-layer-ssl.h @@ -112,9 +112,6 @@ enum { /* flag to indicate that handshake is done */ #define SSL_AL_FLAG_HANDSHAKE_DONE BIT_U32(18) -/* A session ID in the Client Hello message, indicating the client - wants to resume a session */ -#define SSL_AL_FLAG_SSL_CLIENT_SESSION_ID BIT_U32(19) /* Session resumed without a full handshake */ #define SSL_AL_FLAG_SESSION_RESUMED BIT_U32(20) @@ -241,7 +238,6 @@ typedef struct SSLStateConnp_ { uint8_t content_type; uint8_t handshake_type; - uint32_t handshake_length; /* the no of bytes processed in the currently parsed record */ uint32_t bytes_processed; @@ -308,7 +304,6 @@ typedef struct SSLState_ { } SSLState; void RegisterSSLParsers(void); -void SSLParserRegisterTests(void); void SSLVersionToString(uint16_t, char *); void SSLEnableJA3(void); bool SSLJA3IsEnabled(void); diff --git a/src/app-layer.h b/src/app-layer.h index 6a8889640c..bb2464f77d 100644 --- a/src/app-layer.h +++ b/src/app-layer.h @@ -103,7 +103,7 @@ int AppLayerDeSetup(void); AppLayerThreadCtx *AppLayerGetCtxThread(ThreadVars *tv); /** - * \brief Destroys the context created by AppLayeGetCtxThread(). + * \brief Destroys the context created by AppLayerGetCtxThread(). * * \param tctx Pointer to the thread context to destroy. */ @@ -149,11 +149,6 @@ void AppLayerIncAllocErrorCounter(ThreadVars *tv, Flow *f); void AppLayerIncParserErrorCounter(ThreadVars *tv, Flow *f); void AppLayerIncInternalErrorCounter(ThreadVars *tv, Flow *f); -static inline uint8_t StreamSliceGetFlags(const StreamSlice *stream_slice) -{ - return stream_slice->flags; -} - static inline const uint8_t *StreamSliceGetData(const StreamSlice *stream_slice) { return stream_slice->input; @@ -164,13 +159,4 @@ static inline uint32_t StreamSliceGetDataLen(const StreamSlice *stream_slice) return stream_slice->input_len; } -static inline bool StreamSliceIsGap(const StreamSlice *stream_slice) -{ - return stream_slice->input == NULL && stream_slice->input_len > 0; -} - -static inline uint32_t StreamSliceGetGapSize(const StreamSlice *stream_slice) -{ - return StreamSliceGetDataLen(stream_slice); -} #endif diff --git a/src/defrag-hash.h b/src/defrag-hash.h index ec4fbe6988..ffbc054cd9 100644 --- a/src/defrag-hash.h +++ b/src/defrag-hash.h @@ -65,9 +65,6 @@ typedef struct DefragTrackerHashRow_ { /** defrag tracker hash table */ extern DefragTrackerHashRow *defragtracker_hash; -#define DEFRAG_VERBOSE 0 -#define DEFRAG_QUIET 1 - typedef struct DefragConfig_ { SC_ATOMIC_DECLARE(uint64_t, memcap); uint32_t hash_rand; diff --git a/src/defrag-timeout.h b/src/defrag-timeout.h index ec387ce6a8..baece4516e 100644 --- a/src/defrag-timeout.h +++ b/src/defrag-timeout.h @@ -26,8 +26,5 @@ uint32_t DefragTimeoutHash(SCTime_t ts); -uint32_t DefragGetSpareCount(void); -uint32_t DefragGetActiveCount(void); - #endif diff --git a/src/defrag.h b/src/defrag.h index 22249d7df5..016aa3ea5c 100644 --- a/src/defrag.h +++ b/src/defrag.h @@ -125,7 +125,6 @@ typedef struct DefragTracker_ { void DefragInit(void); void DefragDestroy(void); -void DefragReload(void); /**< use only in unittests */ uint8_t DefragGetOsPolicy(Packet *); void DefragTrackerFreeFrags(DefragTracker *); diff --git a/src/detect-bsize.h b/src/detect-bsize.h index d14bbab056..ac0b72e589 100644 --- a/src/detect-bsize.h +++ b/src/detect-bsize.h @@ -28,4 +28,4 @@ void DetectBsizeRegister(void); int DetectBsizeMatch(const SigMatchCtx *ctx, const uint64_t buffer_size, bool eof); bool DetectBsizeValidateContentCallback(Signature *s, const SignatureInitDataBuffer *); -#endif /* __DETECT_URILEN_H__ */ +#endif /* __DETECT_BSIZE_H__ */ diff --git a/src/detect-content.h b/src/detect-content.h index d1f3d6fbc1..cf56118b05 100644 --- a/src/detect-content.h +++ b/src/detect-content.h @@ -114,8 +114,7 @@ typedef struct DetectContentData_ { } DetectContentData; /* prototypes */ -void DetectContentRegister (void); -uint32_t DetectContentMaxId(DetectEngineCtx *); +void DetectContentRegister(void); DetectContentData *DetectContentParse(SpmGlobalThreadCtx *spm_global_thread_ctx, const char *contentstr); int DetectContentDataParse(const char *keyword, const char *contentstr, diff --git a/src/detect-dataset.h b/src/detect-dataset.h index deb18d1c21..ca83267d15 100644 --- a/src/detect-dataset.h +++ b/src/detect-dataset.h @@ -31,8 +31,6 @@ #define DETECT_DATASET_CMD_ISNOTSET 2 #define DETECT_DATASET_CMD_ISSET 3 -#define DETECT_DATASET_CMD_MAX 4 - typedef struct DetectDatasetData_ { Dataset *set; uint8_t cmd; diff --git a/src/detect-engine-mpm.h b/src/detect-engine-mpm.h index 3e8413e46f..16eb6d987f 100644 --- a/src/detect-engine-mpm.h +++ b/src/detect-engine-mpm.h @@ -40,7 +40,6 @@ int DetectMpmPrepareBuiltinMpms(DetectEngineCtx *de_ctx); uint32_t PatternStrength(uint8_t *, uint16_t); uint8_t PatternMatchDefaultMatcher(void); -uint32_t DnsQueryPatternSearch(DetectEngineThreadCtx *det_ctx, uint8_t *buffer, uint32_t buffer_len, uint8_t flags); void PatternMatchPrepare(MpmCtx *, uint16_t); void PatternMatchThreadPrepare(MpmThreadCtx *, uint16_t type); diff --git a/src/detect-engine-siggroup.h b/src/detect-engine-siggroup.h index 1c5c3357cf..d4c9e93c67 100644 --- a/src/detect-engine-siggroup.h +++ b/src/detect-engine-siggroup.h @@ -30,23 +30,13 @@ int SigGroupHeadCopySigs(DetectEngineCtx *, SigGroupHead *, SigGroupHead **); void SigGroupHeadFree(const DetectEngineCtx *de_ctx, SigGroupHead *); -void SigGroupHeadFreeMpmArrays(DetectEngineCtx *); - SigGroupHead *SigGroupHeadHashLookup(DetectEngineCtx *, SigGroupHead *); -SigGroupHead *SigGroupHeadMpmHashLookup(DetectEngineCtx *, SigGroupHead *); -SigGroupHead *SigGroupHeadDPortHashLookup(DetectEngineCtx *, SigGroupHead *); -int SigGroupHeadMpmHashAdd(DetectEngineCtx *, SigGroupHead *); int SigGroupHeadHashAdd(DetectEngineCtx *, SigGroupHead *); -int SigGroupHeadDPortHashAdd(DetectEngineCtx *, SigGroupHead *); void SigGroupHeadHashFree(DetectEngineCtx *); -void SigGroupHeadMpmHashFree(DetectEngineCtx *); -void SigGroupHeadDPortHashFree(DetectEngineCtx *); int SigGroupHeadHashInit(DetectEngineCtx *); -int SigGroupHeadMpmHashInit(DetectEngineCtx *); -int SigGroupHeadDPortHashInit(DetectEngineCtx *); int SigGroupHeadHashRemove(DetectEngineCtx *, SigGroupHead *); @@ -54,9 +44,7 @@ void SigGroupHeadInitDataFree(SigGroupHeadInitData *sghid); void SigGroupHeadSetSigCnt(SigGroupHead *sgh, uint32_t max_idx); void SigGroupHeadSetProtoAndDirection(SigGroupHead *sgh, uint8_t ipproto, int dir); -int SigGroupHeadBuildMatchArray (DetectEngineCtx *de_ctx, SigGroupHead *sgh, - uint32_t max_idx); -void SigGroupHeadFreeSigArrays(DetectEngineCtx *de_ctx); +int SigGroupHeadBuildMatchArray(DetectEngineCtx *de_ctx, SigGroupHead *sgh, uint32_t max_idx); int SigGroupHeadContainsSigId (DetectEngineCtx *de_ctx, SigGroupHead *sgh, uint32_t sid); @@ -69,8 +57,6 @@ void SigGroupHeadSetFilemagicFlag(DetectEngineCtx *, SigGroupHead *); void SigGroupHeadSetFilestoreCount(DetectEngineCtx *, SigGroupHead *); void SigGroupHeadSetFileHashFlag(DetectEngineCtx *, SigGroupHead *); void SigGroupHeadSetFilesizeFlag(DetectEngineCtx *, SigGroupHead *); -uint16_t SigGroupHeadGetMinMpmSize(DetectEngineCtx *de_ctx, - SigGroupHead *sgh, int list); int SigGroupHeadBuildNonPrefilterArray(DetectEngineCtx *de_ctx, SigGroupHead *sgh); diff --git a/src/detect-engine-tag.h b/src/detect-engine-tag.h index ed71e5b7bb..73f3fd871a 100644 --- a/src/detect-engine-tag.h +++ b/src/detect-engine-tag.h @@ -36,8 +36,6 @@ * create a limit for bytes and a limit for number of packets */ #define TAG_MAX_LAST_TIME_SEEN 600 -#define TAG_TIMEOUT_CHECK_INTERVAL 60 - /* Used for tagged data (sid and gid of the packets that * follow the one that triggered the rule with tag option) */ #define TAG_SIG_GEN 2 @@ -46,7 +44,6 @@ int TagHashAddTag(DetectTagDataEntry *, Packet *); int TagFlowAdd(Packet *, DetectTagDataEntry *); -void TagContextDestroy(void); void TagHandlePacket(DetectEngineCtx *, DetectEngineThreadCtx *, Packet *); void TagInitCtx(void); diff --git a/src/detect-engine-uint.h b/src/detect-engine-uint.h index ab78c10f6d..81e4cab893 100644 --- a/src/detect-engine-uint.h +++ b/src/detect-engine-uint.h @@ -60,4 +60,4 @@ DetectUintData_u16 *DetectU16Parse(const char *u16str); void PrefilterPacketU16Set(PrefilterPacketHeaderValue *v, void *smctx); bool PrefilterPacketU16Compare(PrefilterPacketHeaderValue v, void *smctx); -#endif /* __DETECT_UTIL_UINT_H */ +#endif /* __DETECT_ENGINE_UINT_H */ diff --git a/src/detect-engine.h b/src/detect-engine.h index 097b2d7de2..9c26a60baa 100644 --- a/src/detect-engine.h +++ b/src/detect-engine.h @@ -175,8 +175,6 @@ void DetectEngineFrameInspectEngineRegister(DetectEngineCtx *de_ctx, const char int DetectEngineAppInspectionEngine2Signature(DetectEngineCtx *de_ctx, Signature *s); void DetectEngineAppInspectionEngineSignatureFree(DetectEngineCtx *, Signature *s); -bool DetectEngineFrameInspectionRun(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, - const Signature *s, Flow *f, Packet *p, uint8_t *alert_flags); bool DetectEnginePktInspectionRun(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, const Signature *s, Flow *f, Packet *p, @@ -203,9 +201,6 @@ void DetectRunStoreStateTx(const SigGroupHead *sgh, Flow *f, void *tx, uint64_t const Signature *s, uint32_t inspect_flags, uint8_t flow_flags, const uint16_t file_no_match); -void DetectRunStoreStateTxFileOnly(const SigGroupHead *sgh, Flow *f, void *tx, uint64_t tx_id, - const uint8_t flow_flags, const uint16_t file_no_match); - void DetectEngineStateResetTxs(Flow *f); void DeStateRegisterTests(void); diff --git a/src/detect-flowint.h b/src/detect-flowint.h index 1f4d22751f..6ffa1f0930 100644 --- a/src/detect-flowint.h +++ b/src/detect-flowint.h @@ -50,7 +50,6 @@ enum { FLOWINT_TARGET_VAL, FLOWINT_TARGET_VAR, FLOWINT_TARGET_SELF, - FLOWINT_TARGET_UNKNOWN }; /** If the target is another var, get the name and the idx */ diff --git a/src/detect-fragoffset.h b/src/detect-fragoffset.h index 5d22e92046..408b5377f0 100644 --- a/src/detect-fragoffset.h +++ b/src/detect-fragoffset.h @@ -35,4 +35,4 @@ typedef struct DetectFragOffsetData_ { /* prototypes */ void DetectFragOffsetRegister(void); -#endif /* __DETECT_FRAGOFFSET__ */ +#endif /* __DETECT_FRAGOFFSET_H__ */ diff --git a/src/detect-http-cookie.h b/src/detect-http-cookie.h index 63128e0c9a..0ed3fa5c66 100644 --- a/src/detect-http-cookie.h +++ b/src/detect-http-cookie.h @@ -25,9 +25,7 @@ #define _DETECT_HTTP_COOKIE_H /* prototypes */ -void DetectHttpCookieRegister (void); -int DetectHttpCookieDoMatch(DetectEngineThreadCtx *, Signature *, SigMatch *, - Flow *, uint8_t, void *); +void DetectHttpCookieRegister(void); #endif /* _DETECT_HTTP_COOKIE_H */ diff --git a/src/detect-http-header.h b/src/detect-http-header.h index 6a26f55a0f..5327b5b815 100644 --- a/src/detect-http-header.h +++ b/src/detect-http-header.h @@ -27,6 +27,4 @@ void DetectHttpHeaderRegister(void); void DetectHttpRawHeaderRegister(void); -void DetectEngineCleanHHDBuffers(DetectEngineThreadCtx *det_ctx); - #endif /* __DETECT_HTTP_HEADER_H__ */ diff --git a/src/detect-http-stat-code.h b/src/detect-http-stat-code.h index 811c6951c7..e813b6a75f 100644 --- a/src/detect-http-stat-code.h +++ b/src/detect-http-stat-code.h @@ -25,9 +25,6 @@ #define _DETECT_HTTP_STAT_CODE_H /* prototypes */ -int DetectHttpStatCodeMatch (ThreadVars *, DetectEngineThreadCtx *, - Flow *, uint8_t , void *, Signature *, - SigMatch *); void DetectHttpStatCodeRegister(void); #endif /* _DETECT_HTTP_STAT_CODE_H */ diff --git a/src/detect-http-stat-msg.h b/src/detect-http-stat-msg.h index baa05718d9..fe82089db4 100644 --- a/src/detect-http-stat-msg.h +++ b/src/detect-http-stat-msg.h @@ -25,8 +25,6 @@ #define _DETECT_HTTP_STAT_MSG_H /* prototypes */ -int DetectHttpStatMsgMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *, - uint8_t , void *, Signature *, SigMatch *); void DetectHttpStatMsgRegister(void); #endif /* _DETECT_HTTP_STAT_MSG_H */ diff --git a/src/detect-icmp-id.h b/src/detect-icmp-id.h index a3b20f3cca..b952249b6e 100644 --- a/src/detect-icmp-id.h +++ b/src/detect-icmp-id.h @@ -31,4 +31,4 @@ typedef struct DetectIcmpIdData_ { /* prototypes */ void DetectIcmpIdRegister(void); -#endif /* __DETECT_ICMP_ID__ */ +#endif /* __DETECT_ICMP_ID_H__ */ diff --git a/src/detect-icmp-seq.h b/src/detect-icmp-seq.h index 5c41f1d8ce..e148177b8d 100644 --- a/src/detect-icmp-seq.h +++ b/src/detect-icmp-seq.h @@ -31,5 +31,4 @@ typedef struct DetectIcmpSeqData_ { /* prototypes */ void DetectIcmpSeqRegister(void); -#endif /* __DETECT_ICMP_SEQ__ */ - +#endif /* __DETECT_ICMP_SEQ_H__ */ diff --git a/src/detect-isdataat.h b/src/detect-isdataat.h index 5764d0730a..60b1388229 100644 --- a/src/detect-isdataat.h +++ b/src/detect-isdataat.h @@ -29,9 +29,6 @@ #define ISDATAAT_NEGATED 0x04 #define ISDATAAT_OFFSET_VAR 0x08 -#define ISDATAAT_MIN 0 -#define ISDATAAT_MAX 65535 - typedef struct DetectIsdataatData_ { uint16_t dataat; /* data offset to match */ uint8_t flags; /* isdataat options*/ diff --git a/src/detect-parse.h b/src/detect-parse.h index 4c12f8972e..75d4b7ef85 100644 --- a/src/detect-parse.h +++ b/src/detect-parse.h @@ -53,7 +53,6 @@ int SignatureInitDataBufferCheckExpand(Signature *s); Signature *SigAlloc(void); void SigFree(DetectEngineCtx *de_ctx, Signature *s); Signature *SigInit(DetectEngineCtx *, const char *sigstr); -Signature *SigInitReal(DetectEngineCtx *, const char *); SigMatchData* SigMatchList2DataArray(SigMatch *head); void SigParseRegisterTests(void); Signature *DetectEngineAppendSig(DetectEngineCtx *, const char *); diff --git a/src/detect-rpc.h b/src/detect-rpc.h index 3a8c54018f..4b4e60b160 100644 --- a/src/detect-rpc.h +++ b/src/detect-rpc.h @@ -41,9 +41,6 @@ typedef struct RpcMsg_ { uint32_t proc; } RpcMsg; -/* Extract uint32_t */ -#define EXT_GET_UINT32T(buf) ((long)SCNtohl((long)*(buf)++)) - typedef struct DetectRpcData_ { uint32_t program; uint32_t program_version; diff --git a/src/detect-tag.h b/src/detect-tag.h index 642e58d2c6..0a03584b61 100644 --- a/src/detect-tag.h +++ b/src/detect-tag.h @@ -49,14 +49,12 @@ enum { enum { DETECT_TAG_DIR_SRC, DETECT_TAG_DIR_DST, - DETECT_TAG_DIR_MAX }; enum { DETECT_TAG_METRIC_PACKET, DETECT_TAG_METRIC_SECONDS, DETECT_TAG_METRIC_BYTES, - DETECT_TAG_METRIC_MAX }; /** This will be the rule options/parameters */ diff --git a/src/detect-tcp-window.h b/src/detect-tcp-window.h index 780f9ab386..51f85398db 100644 --- a/src/detect-tcp-window.h +++ b/src/detect-tcp-window.h @@ -18,9 +18,6 @@ #ifndef __DETECT_WINDOW_H__ #define __DETECT_WINDOW_H__ -#define MIN_WINDOW_VALUE 0 -#define MAX_WINDOW_VALUE 65535 - typedef struct DetectWindowData_ { uint8_t negated; /** negated? 1=True : 0=False */ uint16_t size; /** window size to match */ diff --git a/src/detect-urilen.h b/src/detect-urilen.h index 4f16cbdf8f..ccd319c755 100644 --- a/src/detect-urilen.h +++ b/src/detect-urilen.h @@ -26,8 +26,6 @@ bool DetectUrilenValidateContent(const Signature *s, int list, const char **); void DetectUrilenApplyToContent(Signature *s, int list); -int DetectUrilenMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *, - uint8_t, void *, Signature *, SigMatch *); void DetectUrilenRegister(void); #endif /* _DETECT_URILEN_H */ diff --git a/src/detect-xbits.h b/src/detect-xbits.h index 4f34ef0dfe..516bfdcfd1 100644 --- a/src/detect-xbits.h +++ b/src/detect-xbits.h @@ -30,12 +30,10 @@ #define DETECT_XBITS_CMD_ISNOTSET 3 #define DETECT_XBITS_CMD_ISSET 4 #define DETECT_XBITS_CMD_NOALERT 5 -#define DETECT_XBITS_CMD_MAX 6 #define DETECT_XBITS_TRACK_IPSRC 0 #define DETECT_XBITS_TRACK_IPDST 1 #define DETECT_XBITS_TRACK_IPPAIR 2 -#define DETECT_XBITS_TRACK_FLOW 3 #define DETECT_XBITS_EXPIRE_DEFAULT 30 diff --git a/src/detect.h b/src/detect.h index d66135b6c8..3a6c3b0e3a 100644 --- a/src/detect.h +++ b/src/detect.h @@ -251,8 +251,8 @@ typedef struct DetectPort_ { #define SIG_FLAG_INIT_PACKET BIT_U32(1) /**< signature has matches against a packet (as opposed to app layer) */ #define SIG_FLAG_INIT_FLOW BIT_U32(2) /**< signature has a flow setting */ #define SIG_FLAG_INIT_BIDIREC BIT_U32(3) /**< signature has bidirectional operator */ -#define SIG_FLAG_INIT_FIRST_IPPROTO_SEEN BIT_U32(4) /** < signature has seen the first ip_proto keyword */ -#define SIG_FLAG_INIT_HAS_TRANSFORM BIT_U32(5) +#define SIG_FLAG_INIT_FIRST_IPPROTO_SEEN \ + BIT_U32(4) /** < signature has seen the first ip_proto keyword */ #define SIG_FLAG_INIT_STATE_MATCH BIT_U32(6) /**< signature has matches that require stateful inspection */ #define SIG_FLAG_INIT_NEED_FLUSH BIT_U32(7) #define SIG_FLAG_INIT_PRIO_EXPLICIT \ @@ -993,7 +993,6 @@ enum { ENGINE_PROFILE_MEDIUM, ENGINE_PROFILE_HIGH, ENGINE_PROFILE_CUSTOM, - ENGINE_PROFILE_MAX }; /* Siggroup mpm context profile */ @@ -1513,15 +1512,9 @@ TmEcode Detect(ThreadVars *tv, Packet *p, void *data); SigMatch *SigMatchAlloc(void); Signature *SigFindSignatureBySidGid(DetectEngineCtx *, uint32_t, uint32_t); -void SigMatchSignaturesBuildMatchArray(DetectEngineThreadCtx *, - Packet *, SignatureMask, - uint16_t); void SigMatchFree(DetectEngineCtx *, SigMatch *sm); void SigRegisterTests(void); -void TmModuleDetectRegister (void); - -void SigAddressPrepareBidirectionals (DetectEngineCtx *); void DisableDetectFlowFileFlags(Flow *f); char *DetectLoadCompleteSigPath(const DetectEngineCtx *, const char *sig_file); @@ -1532,8 +1525,6 @@ void SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, int SignatureIsIPOnly(DetectEngineCtx *de_ctx, const Signature *s); const SigGroupHead *SigMatchSignaturesGetSgh(const DetectEngineCtx *de_ctx, const Packet *p); -Signature *DetectGetTagSignature(void); - int DetectUnregisterThreadCtxFuncs(DetectEngineCtx *, void *data, const char *name); int DetectRegisterThreadCtxFuncs(DetectEngineCtx *, const char *name, void *(*InitFunc)(void *), void *data, void (*FreeFunc)(void *), int); void *DetectThreadCtxGetKeywordThreadCtx(DetectEngineThreadCtx *, int); diff --git a/src/device-storage.h b/src/device-storage.h index 49fb59761d..441b92b82e 100644 --- a/src/device-storage.h +++ b/src/device-storage.h @@ -41,8 +41,6 @@ void *LiveDevAllocStorageById(LiveDevice *d, LiveDevStorageId id); void LiveDevFreeStorageById(LiveDevice *d, LiveDevStorageId id); void LiveDevFreeStorage(LiveDevice *d); -void RegisterLiveDevStorageTests(void); - LiveDevStorageId LiveDevStorageRegister(const char *name, const unsigned int size, void *(*Alloc)(unsigned int), void (*Free)(void *)); diff --git a/src/flow-bypass.h b/src/flow-bypass.h index d1a764b50d..58ca766636 100644 --- a/src/flow-bypass.h +++ b/src/flow-bypass.h @@ -39,8 +39,6 @@ typedef int (*BypassedCheckFuncInit)(ThreadVars *th_v, struct timespec *curtime, void *data); typedef int (*BypassedUpdateFunc)(Flow *f, Packet *p, void *data); -void FlowAddToBypassed(Flow *f); - void BypassedFlowManagerThreadSpawn(void); void TmModuleBypassedFlowManagerRegister(void); diff --git a/src/flow-private.h b/src/flow-private.h index 2357156c48..d3899f6dfb 100644 --- a/src/flow-private.h +++ b/src/flow-private.h @@ -38,8 +38,7 @@ /* Flow Time out values */ #define FLOW_DEFAULT_NEW_TIMEOUT 30 -#define FLOW_DEFAULT_EST_TIMEOUT 300 -#define FLOW_DEFAULT_CLOSED_TIMEOUT 0 +#define FLOW_DEFAULT_EST_TIMEOUT 300 #define FLOW_DEFAULT_BYPASSED_TIMEOUT 100 #define FLOW_IPPROTO_TCP_NEW_TIMEOUT 30 #define FLOW_IPPROTO_TCP_EST_TIMEOUT 300 @@ -53,8 +52,7 @@ #define FLOW_IPPROTO_ICMP_BYPASSED_TIMEOUT 100 #define FLOW_DEFAULT_EMERG_NEW_TIMEOUT 10 -#define FLOW_DEFAULT_EMERG_EST_TIMEOUT 100 -#define FLOW_DEFAULT_EMERG_CLOSED_TIMEOUT 0 +#define FLOW_DEFAULT_EMERG_EST_TIMEOUT 100 #define FLOW_DEFAULT_EMERG_BYPASSED_TIMEOUT 50 #define FLOW_IPPROTO_TCP_EMERG_NEW_TIMEOUT 10 #define FLOW_IPPROTO_TCP_EMERG_EST_TIMEOUT 100 diff --git a/src/flow-queue.h b/src/flow-queue.h index 8eadf1cab7..0523546ce8 100644 --- a/src/flow-queue.h +++ b/src/flow-queue.h @@ -85,7 +85,6 @@ void FlowQueueDestroy (FlowQueue *); void FlowEnqueue (FlowQueue *, Flow *); Flow *FlowDequeue (FlowQueue *); void FlowQueueRemove(FlowQueue *fq, Flow *f); -void FlowQueueRemoveLock(FlowQueue *fq, Flow *f); void FlowQueuePrivateAppendFlow(FlowQueuePrivate *fqc, Flow *f); void FlowQueuePrivatePrependFlow(FlowQueuePrivate *fqc, Flow *f); diff --git a/src/flow-timeout.h b/src/flow-timeout.h index f6c9529879..7426d59d60 100644 --- a/src/flow-timeout.h +++ b/src/flow-timeout.h @@ -27,6 +27,5 @@ void FlowForceReassemblyForFlow(Flow *f); int FlowForceReassemblyNeedReassembly(Flow *f); void FlowForceReassembly(void); -void FlowForceReassemblySetup(int detect_disabled); #endif /* __FLOW_TIMEOUT_H__ */ diff --git a/src/flow-util.h b/src/flow-util.h index 16cca91b64..4bdb9e2d3e 100644 --- a/src/flow-util.h +++ b/src/flow-util.h @@ -27,8 +27,6 @@ #include "flow.h" #include "stream-tcp-private.h" -#define COPY_TIMESTAMP(src, dst) ((dst)->tv_sec = (src)->tv_sec, (dst)->tv_usec = (src)->tv_usec) - #define RESET_COUNTERS(f) \ do { \ (f)->todstpktcnt = 0; \ @@ -146,7 +144,6 @@ SC_ATOMIC_GET(flow_config.memcap))) Flow *FlowAlloc(void); -Flow *FlowAllocDirect(void); void FlowFree(Flow *); uint8_t FlowGetProtoMapping(uint8_t); void FlowInit(Flow *, const Packet *); diff --git a/src/flow.h b/src/flow.h index 291edce3e3..6ec901c009 100644 --- a/src/flow.h +++ b/src/flow.h @@ -38,8 +38,7 @@ typedef struct FlowStorageId FlowStorageId; * The actual declaration is in app-layer-parser.c */ typedef struct AppLayerParserState_ AppLayerParserState; -#define FLOW_QUIET true -#define FLOW_VERBOSE false +#define FLOW_QUIET true #define TOSERVER 0 #define TOCLIENT 1 @@ -199,14 +198,6 @@ typedef struct AppLayerParserState_ AppLayerParserState; (a)->addr_data32[3] = 0; \ } while (0) -/* clear the address structure by setting all fields to 0 */ -#define FLOW_CLEAR_ADDR(a) do { \ - (a)->addr_data32[0] = 0; \ - (a)->addr_data32[1] = 0; \ - (a)->addr_data32[2] = 0; \ - (a)->addr_data32[3] = 0; \ - } while (0) - /* Set the IPv6 addressesinto the Addrs of the Packet. * Make sure p->ip6h is initialized and validated. */ #define FLOW_SET_IPV6_SRC_ADDR_FROM_PACKET(p, a) do { \ @@ -291,14 +282,11 @@ typedef struct FlowCnf_ { uint32_t hash_rand; uint32_t hash_size; - uint32_t max_flows; uint32_t prealloc; uint32_t timeout_new; uint32_t timeout_est; - uint32_t emerg_timeout_new; - uint32_t emerg_timeout_est; uint32_t emergency_recovery; enum ExceptionPolicy memcap_policy; @@ -328,8 +316,6 @@ typedef struct FlowAddress_ { #define addr_data16 address.address_un_data16 #define addr_data8 address.address_un_data8 -typedef unsigned short FlowRefCount; - typedef unsigned short FlowStateType; /** Local Thread ID */ @@ -555,7 +541,6 @@ typedef struct FlowLookupStruct_ // TODO name void FlowSetupPacket(Packet *p); void FlowHandlePacket (ThreadVars *, FlowLookupStruct *, Packet *); void FlowInitConfig(bool); -void FlowPrintQueueInfo (void); void FlowReset(void); void FlowShutdown(void); void FlowSetIPOnlyFlag(Flow *, int); @@ -567,13 +552,8 @@ void FlowUnsetChangeProtoFlag(Flow *); int FlowChangeProto(Flow *); void FlowSwap(Flow *); -void FlowRegisterTests (void); -int FlowSetProtoTimeout(uint8_t ,uint32_t ,uint32_t ,uint32_t); -int FlowSetProtoEmergencyTimeout(uint8_t ,uint32_t ,uint32_t ,uint32_t); -int FlowSetProtoFreeFunc (uint8_t , void (*Free)(void *)); -void FlowUpdateQueue(Flow *); - -int FlowUpdateSpareFlows(void); +void FlowRegisterTests(void); +int FlowSetProtoFreeFunc(uint8_t, void (*Free)(void *)); static inline void FlowSetNoPacketInspectionFlag(Flow *); static inline void FlowSetNoPayloadInspectionFlag(Flow *); diff --git a/src/ippair.h b/src/ippair.h index ee94c23fb6..82f1c094af 100644 --- a/src/ippair.h +++ b/src/ippair.h @@ -86,7 +86,6 @@ typedef struct IPPairHashRow_ { /** ippair hash table */ extern IPPairHashRow *ippair_hash; -#define IPPAIR_VERBOSE 0 #define IPPAIR_QUIET 1 typedef struct IPPairConfig_ { @@ -111,20 +110,6 @@ typedef struct IPPairConfig_ { #define IPPairDecrUsecnt(h) \ (void)SC_ATOMIC_SUB((h)->use_cnt, 1) -#define IPPairReference(dst_h_ptr, h) do { \ - if ((h) != NULL) { \ - IPPairIncrUsecnt((h)); \ - *(dst_h_ptr) = h; \ - } \ - } while (0) - -#define IPPairDeReference(src_h_ptr) do { \ - if (*(src_h_ptr) != NULL) { \ - IPPairDecrUsecnt(*(src_h_ptr)); \ - *(src_h_ptr) = NULL; \ - } \ - } while (0) - extern IPPairConfig ippair_config; SC_ATOMIC_EXTERN(uint64_t,ippair_memuse); SC_ATOMIC_EXTERN(uint32_t,ippair_counter); diff --git a/src/log-cf-common.h b/src/log-cf-common.h index 2b7a41d9b1..61d2d55af8 100644 --- a/src/log-cf-common.h +++ b/src/log-cf-common.h @@ -33,7 +33,6 @@ #define LOG_NODE_MAXOUTPUTLEN 8192 #define TIMESTAMP_DEFAULT_FORMAT "%D-%H:%M:%S" -#define TIMESTAMP_DEFAULT_FORMAT_LEN 62 /* Common format nodes */ #define LOG_CF_NONE "-" diff --git a/src/log-httplog.h b/src/log-httplog.h index 4f7d577696..580191fb99 100644 --- a/src/log-httplog.h +++ b/src/log-httplog.h @@ -25,8 +25,6 @@ #define __LOG_HTTPLOG_H__ void LogHttpLogRegister(void); -void TmModuleLogHttpLogIPv4Register (void); -void TmModuleLogHttpLogIPv6Register (void); OutputInitResult LogHttpLogInitCtx(ConfNode *); #endif /* __LOG_HTTPLOG_H__ */ diff --git a/src/output-filestore.h b/src/output-filestore.h index 33cd971318..ed3b3d80d6 100644 --- a/src/output-filestore.h +++ b/src/output-filestore.h @@ -19,7 +19,6 @@ #define __OUTPUT_FILESTORE_H__ void OutputFilestoreRegister(void); -void OutputFilestoreInitConfig(void); void OutputFilestoreRegisterGlobalCounters(void); #endif /* __OUTPUT_FILESTORE_H__ */ diff --git a/src/output-json-anomaly.h b/src/output-json-anomaly.h index d4b2249bd0..4ca32b21ec 100644 --- a/src/output-json-anomaly.h +++ b/src/output-json-anomaly.h @@ -28,8 +28,6 @@ #define __OUTPUT_JSON_ANOMALY_H__ void JsonAnomalyLogRegister(void); -void AnomalyJsonHeader(void *ctx, const Packet *p, const PacketAlert *pa, json_t *js, - uint16_t flags); #endif /* __OUTPUT_JSON_ALERT_H__ */ diff --git a/src/output-json-drop.h b/src/output-json-drop.h index d4fc9a1628..6415e523f7 100644 --- a/src/output-json-drop.h +++ b/src/output-json-drop.h @@ -27,4 +27,4 @@ void JsonDropLogRegister(void); -#endif /* __OUTPUT_DROPLOG_H__ */ +#endif /* __OUTPUT_JSON_DROP_H__ */ diff --git a/src/source-nfq.h b/src/source-nfq.h index 4f22999225..b60e6d9cc5 100644 --- a/src/source-nfq.h +++ b/src/source-nfq.h @@ -92,9 +92,7 @@ typedef struct NFQGlobalVars_ void NFQInitConfig(bool quiet); int NFQRegisterQueue(const uint16_t number); int NFQParseAndRegisterQueues(const char *queues); -int NFQGetQueueCount(void); void *NFQGetQueue(int number); -int NFQGetQueueNum(int number); void *NFQGetThread(int number); void NFQContextsClean(void); #endif /* NFQ */ diff --git a/src/stream-tcp.h b/src/stream-tcp.h index 6082ffa75a..76ccb8ec4c 100644 --- a/src/stream-tcp.h +++ b/src/stream-tcp.h @@ -91,8 +91,6 @@ typedef struct StreamTcpThread_ { uint16_t counter_tcp_pseudo_failed; /** packets rejected because their csum is invalid */ uint16_t counter_tcp_invalid_checksum; - /** sessions reused */ - uint16_t counter_tcp_reused_ssn; /** midstream pickups */ uint16_t counter_tcp_midstream_pickups; /** wrong thread */ diff --git a/src/suricata.h b/src/suricata.h index 881466f379..f4ce718f7e 100644 --- a/src/suricata.h +++ b/src/suricata.h @@ -116,8 +116,7 @@ enum { SURI_HOST_IS_ROUTER, }; -#define IS_SURI_HOST_MODE_SNIFFER_ONLY(host_mode) ((host_mode) == SURI_HOST_IS_SNIFFER_ONLY) -#define IS_SURI_HOST_MODE_ROUTER(host_mode) ((host_mode) == SURI_HOST_IS_ROUTER) +#define IS_SURI_HOST_MODE_SNIFFER_ONLY(host_mode) ((host_mode) == SURI_HOST_IS_SNIFFER_ONLY) #include "runmodes.h" @@ -186,7 +185,6 @@ int RunmodeIsUnittests(void); #define RunmodeIsUnittests() 0 #endif int RunmodeGetCurrent(void); -int IsRuleReloadSet(int quiet); int SuriHasSigFile(void); diff --git a/src/tm-threads.h b/src/tm-threads.h index e2ca86f774..240f7e3be0 100644 --- a/src/tm-threads.h +++ b/src/tm-threads.h @@ -90,7 +90,6 @@ ThreadVars *TmThreadCreateMgmtThreadByName(const char *name, const char *module, ThreadVars *TmThreadCreateCmdThreadByName(const char *name, const char *module, int mucond); TmEcode TmThreadSpawn(ThreadVars *); -void TmThreadSetFlags(ThreadVars *, uint8_t); void TmThreadKillThreadsFamily(int family); void TmThreadKillThreads(void); void TmThreadClearThreadsFamily(int family); diff --git a/src/util-clock.h b/src/util-clock.h index 0ac7a3207d..cb6c17623f 100644 --- a/src/util-clock.h +++ b/src/util-clock.h @@ -36,6 +36,4 @@ #define CLOCK_PRINT_SEC \ printf("Seconds spent: %.4fs\n", ((double)(clo2 - clo1) / (double)CLOCKS_PER_SEC)) -#define GET_CLOCK_END_SECS ((clo1 - clo2)/(double)CLOCKS_PER_SEC) - #endif /*__UTIL_CLOCK_H__ */ diff --git a/src/util-config.h b/src/util-config.h index e0a5bdb20e..92017d5021 100644 --- a/src/util-config.h +++ b/src/util-config.h @@ -25,7 +25,6 @@ #define __UTIL_CONFIG_H__ enum ConfigAction { - CONFIG_ACTION_UNSET = 0, CONFIG_ACTION_SET = 1, }; diff --git a/src/util-daemon.h b/src/util-daemon.h index ef8dc72574..424d7093ea 100644 --- a/src/util-daemon.h +++ b/src/util-daemon.h @@ -24,9 +24,6 @@ #ifndef __UTIL_DAEMON_H__ #define __UTIL_DAEMON_H__ -/** \todo Adjust path */ -#define DAEMON_WORKING_DIRECTORY "/" - #ifdef OS_WIN32 #define Daemonize() #else diff --git a/src/util-debug-filters.h b/src/util-debug-filters.h index e8e8e3fb13..26c9ec9c88 100644 --- a/src/util-debug-filters.h +++ b/src/util-debug-filters.h @@ -132,4 +132,4 @@ void SCLogAddToFGFLineList(SCLogFGFilterFunc *, int); void SCLogReleaseFDFilter(SCLogFDFilter *); -#endif /* __DEBUG_H__ */ +#endif /* __DEBUG_FILTERS_H__ */ diff --git a/src/util-dpdk.h b/src/util-dpdk.h index f92f61b45d..e711eaf6ce 100644 --- a/src/util-dpdk.h +++ b/src/util-dpdk.h @@ -79,7 +79,6 @@ #define RTE_ETH_RSS_IPV6_UDP_EX ETH_RSS_IPV6_UDP_EX #define RTE_ETH_RSS_PORT ETH_RSS_PORT #define RTE_ETH_RSS_VXLAN ETH_RSS_VXLAN -#define RTE_ETH_RSS_GENEVE ETH_RSS_GENEVE #define RTE_ETH_RSS_NVGRE ETH_RSS_NVGRE #define RTE_ETH_RSS_GTPU ETH_RSS_GTPU diff --git a/src/util-ebpf.h b/src/util-ebpf.h index 39e154dda1..fa77ad2c9e 100644 --- a/src/util-ebpf.h +++ b/src/util-ebpf.h @@ -79,9 +79,6 @@ int EBPFLoadFile(const char *iface, const char *path, const char * section, int *val, struct ebpf_timeout_config *config); int EBPFSetupXDP(const char *iface, int fd, uint8_t flags); -int EBPFCheckBypassedFlowTimeout(ThreadVars *th_v, struct flows_stats *bypassstats, - struct timespec *curtime, - void *data); int EBPFCheckBypassedFlowCreate(ThreadVars *th_v, struct timespec *curtime, void *data); void EBPFRegisterExtension(void); @@ -96,10 +93,6 @@ void EBPFBypassFree(void *data); void EBPFDeleteKey(int fd, void *key); -#ifdef BUILD_UNIX_SOCKET -TmEcode EBPFGetBypassedStats(json_t *cmd, json_t *answer, void *data); -#endif - #define __bpf_percpu_val_align __attribute__((__aligned__(8))) #define BPF_DECLARE_PERCPU(type, name, nr_cpus) \ diff --git a/src/util-file.h b/src/util-file.h index 6310b49c20..55d91192fe 100644 --- a/src/util-file.h +++ b/src/util-file.h @@ -213,8 +213,6 @@ int FileStore(File *); */ void FileDisableStoringForTransaction(Flow *f, const uint8_t direction, void *tx, uint64_t tx_id); -void FlowFileDisableStoringForTransaction(struct Flow_ *f, uint64_t tx_id); - void FileForceFilestoreEnable(void); int FileForceFilestore(void); void FileReassemblyDepthEnable(uint32_t size); diff --git a/src/util-hashlist.h b/src/util-hashlist.h index f75fee3605..bca74c9871 100644 --- a/src/util-hashlist.h +++ b/src/util-hashlist.h @@ -44,8 +44,6 @@ typedef struct HashListTable_ { void (*Free)(void *); } HashListTable; -#define HASHLIST_NO_SIZE 0 - /* prototypes */ HashListTable* HashListTableInit(uint32_t, uint32_t (*Hash)(struct HashListTable_ *, void *, uint16_t), char (*Compare)(void *, uint16_t, void *, uint16_t), void (*Free)(void *)); void HashListTableFree(HashListTable *); diff --git a/src/util-logopenfile.h b/src/util-logopenfile.h index 6d51a570d8..9439c1036e 100644 --- a/src/util-logopenfile.h +++ b/src/util-logopenfile.h @@ -149,9 +149,6 @@ typedef struct LogFileCtx_ { /* Flag set when file rotation notification is received. */ int rotation_flag; - /* Set to true if the filename should not be timestamped. */ - bool nostamp; - /* if set to true EVE will add a pcap file record */ bool is_pcap_offline; @@ -166,8 +163,6 @@ typedef struct LogFileCtx_ { #define LOGFILE_RECONN_MIN_TIME 500 /* flags for LogFileCtx */ -#define LOGFILE_HEADER_WRITTEN 0x01 -#define LOGFILE_ALERTS_PRINTED 0x02 #define LOGFILE_ROTATE_INTERVAL 0x04 LogFileCtx *LogFileNewCtx(void); diff --git a/src/util-mpm.h b/src/util-mpm.h index afcaeaf14d..4ddd4de496 100644 --- a/src/util-mpm.h +++ b/src/util-mpm.h @@ -130,15 +130,11 @@ typedef struct MpmCtxFactoryContainer_ { } MpmCtxFactoryContainer; /** pattern is case insensitive */ -#define MPM_PATTERN_FLAG_NOCASE 0x01 -/** pattern is negated */ -#define MPM_PATTERN_FLAG_NEGATED 0x02 +#define MPM_PATTERN_FLAG_NOCASE 0x01 /** pattern has a depth setting */ #define MPM_PATTERN_FLAG_DEPTH 0x04 /** pattern has an offset setting */ -#define MPM_PATTERN_FLAG_OFFSET 0x08 -/** one byte pattern (used in b2g) */ -#define MPM_PATTERN_ONE_BYTE 0x10 +#define MPM_PATTERN_FLAG_OFFSET 0x08 /** the ctx uses it's own internal id instead of * what is passed through the API */ #define MPM_PATTERN_CTX_OWNS_ID 0x20 diff --git a/src/util-radix-tree.h b/src/util-radix-tree.h index bd91898618..c8fdef689a 100644 --- a/src/util-radix-tree.h +++ b/src/util-radix-tree.h @@ -93,11 +93,6 @@ typedef struct SCRadixTree_ { void (*Free)(void *); } SCRadixTree; - -struct in_addr *SCRadixValidateIPV4Address(const char *); -struct in6_addr *SCRadixValidateIPV6Address(const char *); -void SCRadixChopIPAddressAgainstNetmask(uint8_t *, uint8_t, uint16_t); - SCRadixTree *SCRadixCreateRadixTree(void (*Free)(void*), void (*PrintData)(void*)); void SCRadixReleaseRadixTree(SCRadixTree *); diff --git a/src/util-thash.h b/src/util-thash.h index 1668011348..9618d5c064 100644 --- a/src/util-thash.h +++ b/src/util-thash.h @@ -118,9 +118,6 @@ typedef struct THashDataQueue_ #endif } THashDataQueue; -#define THASH_VERBOSE 0 -#define THASH_QUIET 1 - typedef int (*THashOutputFunc)(void *output_ctx, const uint8_t *data, const uint32_t data_len); typedef int (*THashFormatFunc)(const void *in_data, char *output, size_t output_size); @@ -170,20 +167,6 @@ typedef struct THashTableContext_ { #define THashDecrUsecnt(h) \ (void)SC_ATOMIC_SUB((h)->use_cnt, 1) -#define THashReference(dst_h_ptr, h) do { \ - if ((h) != NULL) { \ - THashIncrUsecnt((h)); \ - *(dst_h_ptr) = h; \ - } \ - } while (0) - -#define THashDeReference(src_h_ptr) do { \ - if (*(src_h_ptr) != NULL) { \ - THashDecrUsecnt(*(src_h_ptr)); \ - *(src_h_ptr) = NULL; \ - } \ - } while (0) - THashTableContext *THashInit(const char *cnf_prefix, size_t data_size, int (*DataSet)(void *dst, void *src), void (*DataFree)(void *), uint32_t (*DataHash)(void *), bool (*DataCompare)(void *, void *), bool reset_memcap, diff --git a/src/util-time.h b/src/util-time.h index 96f5479789..5be13ebdbc 100644 --- a/src/util-time.h +++ b/src/util-time.h @@ -100,20 +100,6 @@ SCTime_t TimeGet(void); /** \brief initialize a 'struct timespec' from a 'struct timeval'. */ #define FROM_TIMEVAL(timev) { .tv_sec = (timev).tv_sec, .tv_nsec = (timev).tv_usec * 1000 } -static inline struct timeval TimevalWithSeconds(const struct timeval *ts, const time_t sec_add) -{ -#ifdef timeradd - struct timeval add = { .tv_sec = sec_add, .tv_usec = 0 }; - struct timeval result; - timeradd(ts, &add, &result); - return result; -#else - const time_t sec = ts->tv_sec + sec_add; - struct timeval result = { .tv_sec = sec, .tv_usec = ts->tv_usec }; - return result; -#endif -} - /** \brief compare two 'struct timeval' and return if the first is earlier than the second */ static inline bool TimevalEarlier(struct timeval *first, struct timeval *second) {