mirror of
https://github.com/OISF/suricata.git
synced 2026-10-12 02:07:10 +00:00
src: remove some unused functions
This commit is contained in:
committed by
Victor Julien
parent
26b3f901cb
commit
b7056cd2dc
@@ -1392,15 +1392,6 @@ const char *DetectEngineBufferTypeGetDescriptionById(const DetectEngineCtx *de_c
|
||||
return exists->description;
|
||||
}
|
||||
|
||||
const char *DetectBufferTypeGetDescriptionByName(const char *name)
|
||||
{
|
||||
const DetectBufferType *exists = DetectBufferTypeLookupByName(name);
|
||||
if (!exists) {
|
||||
return NULL;
|
||||
}
|
||||
return exists->description;
|
||||
}
|
||||
|
||||
void DetectEngineBufferTypeSupportsFrames(DetectEngineCtx *de_ctx, const char *name)
|
||||
{
|
||||
DetectBufferType *exists = DetectEngineBufferTypeLookupByName(de_ctx, name);
|
||||
|
||||
@@ -41,7 +41,6 @@ void DetectBufferTypeSupportsMultiInstance(const char *name);
|
||||
int DetectBufferTypeMaxId(void);
|
||||
void DetectBufferTypeCloseRegistration(void);
|
||||
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc);
|
||||
const char *DetectBufferTypeGetDescriptionByName(const char *name);
|
||||
void DetectBufferTypeRegisterSetupCallback(const char *name,
|
||||
void (*Callback)(const DetectEngineCtx *, Signature *));
|
||||
void DetectBufferTypeRegisterValidateCallback(
|
||||
|
||||
@@ -7264,13 +7264,6 @@ const char *StreamTcpStateAsString(const enum TcpState state)
|
||||
return tcp_state;
|
||||
}
|
||||
|
||||
const char *StreamTcpSsnStateAsString(const TcpSession *ssn)
|
||||
{
|
||||
if (ssn == NULL)
|
||||
return NULL;
|
||||
return StreamTcpStateAsString(ssn->state);
|
||||
}
|
||||
|
||||
#ifdef UNITTESTS
|
||||
#include "tests/stream-tcp.c"
|
||||
#endif
|
||||
|
||||
@@ -156,7 +156,6 @@ void StreamReassembleRawUpdateProgress(TcpSession *ssn, Packet *p, const uint64_
|
||||
void StreamTcpDetectLogFlush(ThreadVars *tv, StreamTcpThread *stt, Flow *f, Packet *p, PacketQueueNoLock *pq);
|
||||
|
||||
const char *StreamTcpStateAsString(const enum TcpState);
|
||||
const char *StreamTcpSsnStateAsString(const TcpSession *ssn);
|
||||
|
||||
enum ExceptionPolicy StreamTcpSsnMemcapGetExceptionPolicy(void);
|
||||
enum ExceptionPolicy StreamTcpReassemblyMemcapGetExceptionPolicy(void);
|
||||
|
||||
@@ -29,28 +29,3 @@
|
||||
#include "util-error.h"
|
||||
|
||||
thread_local SCError sc_errno = SC_OK;
|
||||
#define CASE_CODE(E) case E: return #E
|
||||
|
||||
/**
|
||||
* \brief Maps the error code, to its string equivalent
|
||||
*
|
||||
* \param The error code
|
||||
*
|
||||
* \retval The string equivalent for the error code
|
||||
*/
|
||||
const char * SCErrorToString(SCError err)
|
||||
{
|
||||
switch (err) {
|
||||
CASE_CODE (SC_OK);
|
||||
|
||||
CASE_CODE(SC_ENOMEM);
|
||||
CASE_CODE(SC_EINVAL);
|
||||
CASE_CODE(SC_ELIMIT);
|
||||
CASE_CODE(SC_EEXIST);
|
||||
CASE_CODE(SC_ENOENT);
|
||||
|
||||
CASE_CODE (SC_ERR_MAX);
|
||||
}
|
||||
|
||||
return "UNKNOWN_ERROR";
|
||||
}
|
||||
|
||||
@@ -35,8 +35,6 @@ typedef enum {
|
||||
SC_ERR_MAX
|
||||
} SCError;
|
||||
|
||||
const char *SCErrorToString(SCError);
|
||||
|
||||
#include "threads.h"
|
||||
|
||||
extern thread_local SCError sc_errno;
|
||||
|
||||
Reference in New Issue
Block a user