]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
all: remove unused literals
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 7 Apr 2023 16:02:02 +0000 (18:02 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 16 May 2023 07:39:31 +0000 (09:39 +0200)
66 files changed:
src/alert-fastlog.h
src/app-layer-dnp3.h
src/app-layer-ftp.h
src/app-layer-htp.h
src/app-layer-parser.h
src/app-layer-quic.h
src/app-layer-rdp.h
src/app-layer-ssl.h
src/app-layer.h
src/defrag-hash.h
src/defrag-timeout.h
src/defrag.h
src/detect-bsize.h
src/detect-content.h
src/detect-dataset.h
src/detect-engine-mpm.h
src/detect-engine-siggroup.h
src/detect-engine-tag.h
src/detect-engine-uint.h
src/detect-engine.h
src/detect-flowint.h
src/detect-fragoffset.h
src/detect-http-cookie.h
src/detect-http-header.h
src/detect-http-stat-code.h
src/detect-http-stat-msg.h
src/detect-icmp-id.h
src/detect-icmp-seq.h
src/detect-isdataat.h
src/detect-parse.h
src/detect-rpc.h
src/detect-tag.h
src/detect-tcp-window.h
src/detect-urilen.h
src/detect-xbits.h
src/detect.h
src/device-storage.h
src/flow-bypass.h
src/flow-private.h
src/flow-queue.h
src/flow-timeout.h
src/flow-util.h
src/flow.h
src/ippair.h
src/log-cf-common.h
src/log-httplog.h
src/output-filestore.h
src/output-json-anomaly.h
src/output-json-drop.h
src/source-nfq.h
src/stream-tcp.h
src/suricata.h
src/tm-threads.h
src/util-clock.h
src/util-config.h
src/util-daemon.h
src/util-debug-filters.h
src/util-dpdk.h
src/util-ebpf.h
src/util-file.h
src/util-hashlist.h
src/util-logopenfile.h
src/util-mpm.h
src/util-radix-tree.h
src/util-thash.h
src/util-time.h

index c2e825096fb044b3c8ed34e66a408b22ab3b85f9..cdac2a49d404b33e73a50262b5bea9e8d92a55eb 100644 (file)
@@ -25,8 +25,6 @@
 #define __ALERT_FASTLOG_H__
 
 void AlertFastLogRegister(void);
-void TmModuleAlertFastLogIPv4Register(void);
-void TmModuleAlertFastLogIPv6Register(void);
 OutputInitResult AlertFastLogInitCtx(ConfNode *);
 
 #endif /* __ALERT_FASTLOG_H__ */
index 04c22015ae6bce9314a315750f4872eb2af0022e..6445631d977f0d857775318720585a8c4d70e4f3 100644 (file)
 #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
index b9eb15eb573827271bcd274ec10fe10bbdcf91e5..39b53b6bf8bb5fbf3d5bd219f45ea8eec0dff4ee 100644 (file)
@@ -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;
index 1928591bf3018a25978c1cb5d45ba0965ec9b3df..5adda7343ecc67a5c0e49e813b398babaf67ce05 100644 (file)
@@ -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;
index f1f38c472602e819b50f06f6827b88879c6c7c20..d27a08c85119130a626093c0779ce06d0f0dd68a 100644 (file)
@@ -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));
 
index a0038bc08645ef861888813566a605550bd52dd6..d8a833d108c91e2fab89ee75f9077a6af70f99ff 100644 (file)
@@ -24,6 +24,5 @@
 #define __APP_LAYER_QUIC_H__
 
 void RegisterQuicParsers(void);
-void QuicParserRegisterTests(void);
 
 #endif /* __APP_LAYER_QUIC_H__ */
index 9af2b143e7f5fe0c507be1b40789e31daf343772..8ede7cfdbb1a22d71d3d3146fe45c4cc62d38460 100644 (file)
@@ -25,6 +25,5 @@
 #define __APP_LAYER_RDP_H__
 
 void RegisterRdpParsers(void);
-void RdpParserRegisterTests(void);
 
 #endif /* __APP_LAYER_RDP_H__ */
index 79933e6fcae98a60d6966c3b0fd7d39aa8efd88d..f2e42622308e1bff40214f3d124b929b27774e9e 100644 (file)
@@ -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);
index 6a8889640cb56a518e56f738254886e3147e6717..bb2464f77da3d9debdbb61343c14f12c7c973f28 100644 (file)
@@ -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
index ec4fbe6988581538616a127fd4dd530f7508dd8e..ffbc054cd9bc76e19f78d9a38f6193892f37baef 100644 (file)
@@ -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;
index ec387ce6a82c447edf064550a2f8e435d083c732..baece4516e87826062484b88354b8e712497e76d 100644 (file)
@@ -26,8 +26,5 @@
 
 uint32_t DefragTimeoutHash(SCTime_t ts);
 
-uint32_t DefragGetSpareCount(void);
-uint32_t DefragGetActiveCount(void);
-
 #endif
 
index 22249d7df5808847e75e90f7de76bcf8e77898a8..016aa3ea5cd5eff1502345f1942fef289d20be25 100644 (file)
@@ -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 *);
index d14bbab056bbcca9c49c1930c05631958a198928..ac0b72e5893d13a0217044f87de71cc4f4b4be1d 100644 (file)
@@ -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__ */
index d1f3d6fbc1b633e53ab181242695460b6e2e5e4f..cf56118b05206df130ed96a6aae5fc030fddf8f8 100644 (file)
@@ -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,
index deb18d1c215199ee62cf38d14bd498f4b544e13b..ca83267d15929a7b6473c8eaf41291635086c880 100644 (file)
@@ -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;
index 3e8413e46f73e430b645094b93c65db28aaf2b04..16eb6d987f18bf72a923d71dfaf4d59acd8286db 100644 (file)
@@ -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);
index 1c5c3357cf2f680c1446a5e5a650da64f0c86720..d4c9e93c677104f9a1a9c3235398ca8cb88cd792 100644 (file)
@@ -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);
 
index ed71e5b7bb778bce74805b812ab056842b30af50..73f3fd871a357cf51e1144cc5dcf846a56342e1b 100644 (file)
@@ -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);
index ab78c10f6d49d915a23fe3e489e3fabd8d97b6a8..81e4cab893ba7889df61baae575a3ba705ff9fe0 100644 (file)
@@ -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 */
index 097b2d7de20311822f35b34d6e1cbcaffe83dc79..9c26a60baa976ac2213dc178596ff41d252a0a92 100644 (file)
@@ -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);
index 1f4d22751fa7faa227a531abac683c29dd450c96..6ffa1f09302632734a7193ec27b28cbdd9b0881d 100644 (file)
@@ -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 */
index 5d22e92046db1451b850b1e11f57301b67dd1eb9..408b5377f0438d26dca4845f021f4497f7566263 100644 (file)
@@ -35,4 +35,4 @@ typedef struct DetectFragOffsetData_ {
 /* prototypes */
 void DetectFragOffsetRegister(void);
 
-#endif /* __DETECT_FRAGOFFSET__ */
+#endif /* __DETECT_FRAGOFFSET_H__ */
index 63128e0c9a47708d9a1470f96e1d3348fc20d9f3..0ed3fa5c66c71c818b111962a89d88d3845cbd97 100644 (file)
@@ -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 */
 
index 6a26f55a0ff130dcdc5fc85dc18e8b06cf97bb34..5327b5b81583076ac0231c8ea0f112fbf9f23ea6 100644 (file)
@@ -27,6 +27,4 @@
 void DetectHttpHeaderRegister(void);
 void DetectHttpRawHeaderRegister(void);
 
-void DetectEngineCleanHHDBuffers(DetectEngineThreadCtx *det_ctx);
-
 #endif /* __DETECT_HTTP_HEADER_H__ */
index 811c6951c778cd2b62f450f40edbf937d6ad91c3..e813b6a75fc02d86fb1bf1b7b7ec91953429dc9e 100644 (file)
@@ -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 */
index baa05718d9420dc3020106bc0b4e06d72b043a58..fe82089db4bf67dd316161786730fa23793f877f 100644 (file)
@@ -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 */
index a3b20f3ccaa07beb286022550573eea1f8fa5f91..b952249b6e5ce4f5ca3a8d792f701a529aafb603 100644 (file)
@@ -31,4 +31,4 @@ typedef struct DetectIcmpIdData_ {
 /* prototypes */
 void DetectIcmpIdRegister(void);
 
-#endif /* __DETECT_ICMP_ID__ */
+#endif /* __DETECT_ICMP_ID_H__ */
index 5c41f1d8ce3845d48a2f0788d2c470a4706d1fba..e148177b8dadb8b75c17f349a63877dc6d1325b9 100644 (file)
@@ -31,5 +31,4 @@ typedef struct DetectIcmpSeqData_ {
 /* prototypes */
 void DetectIcmpSeqRegister(void);
 
-#endif /* __DETECT_ICMP_SEQ__ */
-
+#endif /* __DETECT_ICMP_SEQ_H__ */
index 5764d0730a40ab38fe6636822cfcaa3f1edc83e0..60b138822921ba584c6edf1c136bcb17e7b4277b 100644 (file)
@@ -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*/
index 4c12f8972eda74b7c7ad03d67225d01822fb50f8..75d4b7ef85a6edf983650e2aa62f15957e1aeb07 100644 (file)
@@ -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 *);
index 3a8c54018f2ced35965da46a67215efbb87b1f69..4b4e60b1603dbf69d9005b98c121badce5484463 100644 (file)
@@ -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;
index 642e58d2c62fc7f8fad5472708f7fd848fe6155d..0a03584b610ca9866dc7e35c5567728e8971f90f 100644 (file)
@@ -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 */
index 780f9ab386775fa1c7f5ae516890651d0c6dbc75..51f85398dbe51559807bd99fd2b10723708c105a 100644 (file)
@@ -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 */
index 4f16cbdf8f7ef4311e44742c03e27d923a8e4c38..ccd319c755138c9b276df86334a0fbb30cbc4321 100644 (file)
@@ -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 */
index 4f34ef0dfe1e165f7fee6df4d4568200292592d1..516bfdcfd1bc104c880d926e04ab85107a1750b1 100644 (file)
 #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
 
index d66135b6c89f8aa2ced1f15be0c905f5a92e9454..3a6c3b0e3ae980788ab315e98e48276fb22535bb 100644 (file)
@@ -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);
index 49fb59761df4e269ab3dfc835716928d07292abe..441b92b82e7de47b138ec19528595671be90a381 100644 (file)
@@ -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 *));
 
index d1a764b50d4e31f1ca6b1519321c4a2e094e5096..58ca76663655e770d7229fd8ad1b0f9d3089f5a2 100644 (file)
@@ -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);
 
index 2357156c481b017f273bbea1d09e897bb78da453..d3899f6dfbc08889587c06ddba2723f9a6978221 100644 (file)
@@ -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
index 8eadf1cab74a31ff5fb30e22691cacf48915fddf..0523546ce8a9c73e99e8b7eb3b2660d14bc5b233 100644 (file)
@@ -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);
index f6c95298799ba70ab2a400923dec35f20c55cef9..7426d59d60c67a86086e3dde5353d87636c27cb5 100644 (file)
@@ -27,6 +27,5 @@
 void FlowForceReassemblyForFlow(Flow *f);
 int FlowForceReassemblyNeedReassembly(Flow *f);
 void FlowForceReassembly(void);
-void FlowForceReassemblySetup(int detect_disabled);
 
 #endif /* __FLOW_TIMEOUT_H__ */
index 16cca91b643b44baca604cf255211cb8eab4915c..4bdb9e2d3e12da11563205fe95d53de446555966 100644 (file)
@@ -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;                                                                      \
             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 *);
index 291edce3e3c8bba6ac6eac2f7036deed04ed0fac..6ec901c0097219802d558a8774473364aecbd15f 100644 (file)
@@ -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 *);
index ee94c23fb659176da2380f4b6be98c66789c2238..82f1c094af9a2b7eaca648c4367db741fa872f2c 100644 (file)
@@ -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);
index 2b7a41d9b1ba70ee88379e52e22bc49658536c97..61d2d55af874cdbb44bcb7f86d0829e6e3ed779e 100644 (file)
@@ -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 "-"
index 4f7d5776968d541845be6f9f18c5afb04c598694..580191fb99c49f525f9aa707bbe81927f6c59322 100644 (file)
@@ -25,8 +25,6 @@
 #define __LOG_HTTPLOG_H__
 
 void LogHttpLogRegister(void);
-void TmModuleLogHttpLogIPv4Register (void);
-void TmModuleLogHttpLogIPv6Register (void);
 OutputInitResult LogHttpLogInitCtx(ConfNode *);
 
 #endif /* __LOG_HTTPLOG_H__ */
index 33cd9713186bd70ecae9df4bb69302cb1b819fba..ed3b3d80d68639ee88471b14c36685e8a8f25d63 100644 (file)
@@ -19,7 +19,6 @@
 #define __OUTPUT_FILESTORE_H__
 
 void OutputFilestoreRegister(void);
-void OutputFilestoreInitConfig(void);
 void OutputFilestoreRegisterGlobalCounters(void);
 
 #endif /* __OUTPUT_FILESTORE_H__ */
index d4b2249bd0abf4ad38962b682eb1c99fe38abc56..4ca32b21ec59470d049775fe65b3ebd02fa21f84 100644 (file)
@@ -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__ */
 
index d4fc9a16283c38db1f91b2badf503f2c2bb84afe..6415e523f7a4ffc8f169a1ec1c7ac7c92d02f37a 100644 (file)
@@ -27,4 +27,4 @@
 
 void JsonDropLogRegister(void);
 
-#endif /* __OUTPUT_DROPLOG_H__ */
+#endif /* __OUTPUT_JSON_DROP_H__ */
index 4f22999225e2c675115d6f443436f1703adc9044..b60e6d9cc537c0ee40502c4d0d362634f7cad4af 100644 (file)
@@ -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 */
index 6082ffa75a42636016b15ea61d75ab12f6b1e313..76ccb8ec4cfdb83a3b15a9a9531060c779ec8716 100644 (file)
@@ -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 */
index 881466f379a61282223220b7322d1e7f6d2e6c79..f4ce718f7eb32ff8bb33e80cac91d670312b9252 100644 (file)
@@ -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);
 
index e2ca86f774d781356d74358abe40f4024c54fc45..240f7e3be0882fb29c995fed419a14563f3dffde 100644 (file)
@@ -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);
index 0ac7a3207d377a0e05f67ed33ec292d44016315a..cb6c17623f99a3f38bd4e1ea33ce4750b9b000c9 100644 (file)
@@ -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__ */
index e0a5bdb20e3142a77d295950b1a1e405db4d8315..92017d50216249f348e752f294a1811737a39525 100644 (file)
@@ -25,7 +25,6 @@
 #define __UTIL_CONFIG_H__
 
 enum ConfigAction {
-    CONFIG_ACTION_UNSET = 0,
     CONFIG_ACTION_SET = 1,
 };
 
index ef8dc72574bf111a95611f0f8f0f785289b0f64e..424d7093eae80e18fc86c1e1b2aa09c8eb05847f 100644 (file)
@@ -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
index e8e8e3fb1338afe2e70c665c53dd01fa61c49638..26c9ec9c88a4c70d807d231724fa2d0f24c44f65 100644 (file)
@@ -132,4 +132,4 @@ void SCLogAddToFGFLineList(SCLogFGFilterFunc *,
                                          int);
 
 void SCLogReleaseFDFilter(SCLogFDFilter *);
-#endif /* __DEBUG_H__ */
+#endif /* __DEBUG_FILTERS_H__ */
index f92f61b45da9b733d98e26b5e5a2307f4d608778..e711eaf6cecbeaad5c34db77239267314cd5f821 100644 (file)
@@ -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
 
index 39e154dda1cbdb629dac1a7bba4cf66b5e073405..fa77ad2c9e023381926c7e694efe21bcd854a66d 100644 (file)
@@ -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)                          \
index 6310b49c204907de52ad4bd8f9d3fa315176baa3..55d91192fe1225fb33e2774f1000cc2afd9e0115 100644 (file)
@@ -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);
index f75fee3605329c9b0ee0181850cd8f603703aa06..bca74c98719bcf9d01ba25139a143c03a5d995d2 100644 (file)
@@ -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 *);
index 6d51a570d80b58b6628384b1df2cd65d2167eecc..9439c1036ea4fe52cb3f6e558354e3e671399e9c 100644 (file)
@@ -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);
index afcaeaf14d13fa8092fb6ef772bb437a56ea21c6..4ddd4de496598d2e273c2e41dacbe53e0a921f8a 100644 (file)
@@ -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
index bd918986183c6569fc06821b73282538b0225dea..c8fdef689ab184f261319c1603a8b18a0b6bd6ba 100644 (file)
@@ -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 *);
 
index 166801134892fd077831c683701548ff62cc5f71..9618d5c06442f2d24c349cf9aeb8775aa96d43c6 100644 (file)
@@ -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,
index 96f5479789f4a7f47b0e23825b89767fa7e09d71..5be13ebdbca831f21a0a7b44071be65acbd7ce0e 100644 (file)
@@ -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)
 {