SC_ATOMIC_DECLARE(uint64_t, htp_memuse);
SC_ATOMIC_DECLARE(uint64_t, htp_memcap);
-void HTPParseMemcap()
+void HTPParseMemcap(void)
{
const char *conf_val;
}
#define IPPROTOS_MAX 2
-void AppLayerSetupCounters()
+void AppLayerSetupCounters(void)
{
uint8_t ipprotos[] = { IPPROTO_TCP, IPPROTO_UDP };
uint8_t ipproto;
}
}
-void AppLayerDeSetupCounters()
+void AppLayerDeSetupCounters(void)
{
memset(applayer_counter_names, 0, sizeof(applayer_counter_names));
memset(applayer_counters, 0, sizeof(applayer_counters));
/**
* \brief Releases the resources alloted by the Stats API
*/
-void StatsReleaseResources()
+void StatsReleaseResources(void)
{
StatsLogSummary();
StatsReleaseCtx();
return q;
}
-DefragTrackerQueue *DefragTrackerQueueNew()
+DefragTrackerQueue *DefragTrackerQueueNew(void)
{
DefragTrackerQueue *q = (DefragTrackerQueue *)SCMalloc(sizeof(DefragTrackerQueue));
if (q == NULL) {
* \retval 1 if successful
* \retval 0 if on error
*/
-int PerCentEncodingSetup ()
+int PerCentEncodingSetup(void)
{
#define DETECT_PERCENT_ENCODING_REGEX "%[0-9|a-f|A-F]{2}"
const char *eb = NULL;
/**
* \brief Unpauses all threads present in tv_root
*/
-void TmThreadWakeupDetectLoaderThreads()
+void TmThreadWakeupDetectLoaderThreads(void)
{
ThreadVars *tv = NULL;
int i = 0;
/**
* \brief Unpauses all threads present in tv_root
*/
-void TmThreadContinueDetectLoaderThreads()
+void TmThreadContinueDetectLoaderThreads(void)
{
ThreadVars *tv = NULL;
int i = 0;
/** \brief Reset the tagging engine context
*/
-void TagRestartCtx()
+void TagRestartCtx(void)
{
TagDestroyCtx();
TagInitCtx();
#endif
-void DetectEngineRegisterTests()
+void DetectEngineRegisterTests(void)
{
#ifdef UNITTESTS
UtRegisterTest("DetectEngineTest01", DetectEngineTest01);
#endif
/** \brief spawn the flow bypass manager thread */
-void BypassedFlowManagerThreadSpawn()
+void BypassedFlowManagerThreadSpawn(void)
{
#ifdef CAPTURE_OFFLOAD_MANAGER
}
/** \brief spawn the flow manager thread */
-void FlowManagerThreadSpawn()
+void FlowManagerThreadSpawn(void)
{
intmax_t setting = 1;
(void)ConfGetInt("flow.managers", &setting);
}
/** \brief spawn the flow recycler thread */
-void FlowRecyclerThreadSpawn()
+void FlowRecyclerThreadSpawn(void)
{
intmax_t setting = 1;
(void)ConfGetInt("flow.recyclers", &setting);
#include "util-debug.h"
#include "util-print.h"
-FlowQueue *FlowQueueNew()
+FlowQueue *FlowQueueNew(void)
{
FlowQueue *q = (FlowQueue *)SCMalloc(sizeof(FlowQueue));
if (q == NULL) {
return q;
}
-HostQueue *HostQueueNew()
+HostQueue *HostQueueNew(void)
{
HostQueue *q = (HostQueue *)SCMalloc(sizeof(HostQueue));
if (q == NULL) {
return q;
}
-IPPairQueue *IPPairQueueNew()
+IPPairQueue *IPPairQueueNew(void)
{
IPPairQueue *q = (IPPairQueue *)SCMalloc(sizeof(IPPairQueue));
if (q == NULL) {
* \retval LogCustomFormatNode * ptr if created
* \retval NULL if failed to allocate
*/
-LogCustomFormatNode * LogCustomFormatNodeAlloc()
+LogCustomFormatNode *LogCustomFormatNodeAlloc(void)
{
LogCustomFormatNode * node = SCCalloc(1, sizeof(LogCustomFormatNode));
if (unlikely(node == NULL)) {
* \retval LogCustomFormat * ptr if created
* \retval NULL if failed to allocate
*/
-LogCustomFormat * LogCustomFormatAlloc()
+LogCustomFormat *LogCustomFormatAlloc(void)
{
LogCustomFormat * cf = SCCalloc(1, sizeof(LogCustomFormat));
if (unlikely(cf == NULL)) {
return afp->threads;
}
-int AFPRunModeIsIPS()
+int AFPRunModeIsIPS(void)
{
int nlive = LiveGetDeviceCount();
int ldev;
return aconf->in.threads;
}
-int NetmapRunModeIsIPS()
+int NetmapRunModeIsIPS(void)
{
int nlive = LiveGetDeviceCount();
int ldev;
/**
* \brief Init the global list of ::AFPPeer
*/
-TmEcode AFPPeersListInit()
+TmEcode AFPPeersListInit(void)
{
SCEnter();
TAILQ_INIT(&peerslist.peers);
*
* \retval TM_ECODE_FAILED if some threads are not peered or TM_ECODE_OK else.
*/
-TmEcode AFPPeersListCheck()
+TmEcode AFPPeersListCheck(void)
{
#define AFP_PEERS_MAX_TRY 4
#define AFP_PEERS_WAIT 20000
/**
* \brief Clean the global peers list.
*/
-void AFPPeersListClean()
+void AFPPeersListClean(void)
{
AFPPeer *pitem;
/**
* \brief Clean global contexts. Must be called on exit.
*/
-void NFQContextsClean()
+void NFQContextsClean(void)
{
if (g_nfq_q != NULL) {
SCFree(g_nfq_q);
tmm_modules[TMM_DECODEPCAPFILE].flags = TM_FLAG_DECODE_TM;
}
-void PcapFileGlobalInit()
+void PcapFileGlobalInit(void)
{
memset(&pcap_g, 0x00, sizeof(pcap_g));
SC_ATOMIC_INIT(pcap_g.invalid_checksums);
SCReturnInt(TM_ECODE_OK);
}
-void PcapIncreaseInvalidChecksum()
+void PcapIncreaseInvalidChecksum(void)
{
(void) SC_ATOMIC_ADD(pcap_g.invalid_checksums, 1);
}
/**
* \brief this function registers unit tests for the WinDivert Source
*/
-void SourceWinDivertRegisterTests()
+void SourceWinDivertRegisterTests(void)
{
#ifdef UNITTESTS
UtRegisterTest("SourceWinDivertTestIfaceMatchFilter",
*
* \return memcap memcap value
*/
-uint64_t StreamTcpReassembleGetMemcap()
+uint64_t StreamTcpReassembleGetMemcap(void)
{
uint64_t memcapcopy = SC_ATOMIC_GET(stream_config.reassembly_memcap);
return memcapcopy;
/**
* \brief Unpauses all threads present in tv_root
*/
-void TmThreadContinueThreads()
+void TmThreadContinueThreads(void)
{
SCMutexLock(&tv_root_lock);
for (int i = 0; i < TVT_MAX; i++) {
/**
* \brief Pauses all threads present in tv_root
*/
-void TmThreadPauseThreads()
+void TmThreadPauseThreads(void)
{
TmThreadsListThreads();
SCLogDebug("ts->tv_sec %"PRIuMAX, (uintmax_t)ts->tv_sec);
}
-uint16_t TmThreadsGetWorkerThreadMax()
+uint16_t TmThreadsGetWorkerThreadMax(void)
{
uint16_t ncpus = UtilCpuGetNumProcessorsOnline();
int thread_max = TmThreadGetNbThreads(WORKER_CPU_SET);
*
* \retval 0 on success; -1 on fatal error;
*/
-int ActionInitConfig()
+int ActionInitConfig(void)
{
uint8_t actions_used = 0;
uint8_t action_flag = 0;
* \brief Extract cpu affinity configuration from current config file
*/
-void AffinitySetupLoadFromConfig()
+void AffinitySetupLoadFromConfig(void)
{
#if !defined __CYGWIN__ && !defined OS_WIN32 && !defined __OpenBSD__ && !defined sun
ConfNode *root = ConfGetNode("threading.cpu-affinity");
return ConfSetFinal("default-log-dir", name) ? TM_ECODE_OK : TM_ECODE_FAILED;
}
-const char *ConfigGetLogDirectory()
+const char *ConfigGetLogDirectory(void)
{
const char *log_dir = NULL;
return ConfSetFinal("default-data-dir", tmp) ? TM_ECODE_OK : TM_ECODE_FAILED;
}
-const char *ConfigGetDataDirectory()
+const char *ConfigGetDataDirectory(void)
{
const char *data_dir = NULL;
*
* \retval count The no of FG filters
*/
-int SCLogPrintFGFilters()
+int SCLogPrintFGFilters(void)
{
SCLogFGFilterFile *fgf_file = NULL;
SCLogFGFilterFunc *fgf_func = NULL;
#endif /* UNITTESTS */
-void SCLogRegisterTests()
+void SCLogRegisterTests(void)
{
#ifdef UNITTESTS
*
* This can be useful in the case, this is not a real interface.
*/
-void LiveDeviceHasNoStats()
+void LiveDeviceHasNoStats(void)
{
live_devices_stats = 0;
}
-int LiveDeviceListClean()
+int LiveDeviceListClean(void)
{
SCEnter();
LiveDevice *pd, *tpd;
#ifdef SELF_TEST
/* used for timings */
-void driver1()
+void driver1(void)
{
uint8_t buf[256];
uint32_t i;
#define HASHLEN 1
#define MAXPAIR 60
#define MAXLEN 70
-void driver2()
+void driver2(void)
{
uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1];
uint32_t c[HASHSTATE], d[HASHSTATE], i=0, j=0, k, l, m=0, z;
}
/* Check for reading beyond the end of the buffer and alignment problems */
-void driver3()
+void driver3(void)
{
uint8_t buf[MAXLEN+20], *b;
uint32_t len;
}
/* check for problems with nulls */
- void driver4()
+void driver4(void)
{
uint8_t buf[1];
uint32_t h,i,state[HASHSTATE];
}
}
-void driver5()
+void driver5(void)
{
uint32_t b,c;
b=0, c=0, hashlittle2("", 0, &c, &b);
printf("hash is %.8lx\n", c); /* cd628161 */
}
-
-int main()
+int main(void)
{
driver1(); /* test that the key is hashed: used for timings */
driver2(); /* test that whole key is hashed thoroughly */
/**
* \brief SCLogRedisInit() - Initializes global stuff before threads
*/
-void SCLogRedisInit()
+void SCLogRedisInit(void)
{
#ifdef HAVE_LIBEVENT_PTHREADS
evthread_use_pthreads();
SCFree(fn);
}
-int LockRecordInitHash()
+int LockRecordInitHash(void)
{
pthread_mutex_init(&lock_records_mutex, NULL);
pthread_mutex_lock(&lock_records_mutex);
fclose(fp);
}
-void LockRecordFreeHash()
+void LockRecordFreeHash(void)
{
if (profiling_locks_enabled == 0)
return;
/**
* \brief get the maximum transmissible unit for all devices on the system
*/
-int GetGlobalMTUWin32()
+int GetGlobalMTUWin32(void)
{
uint32_t mtu = 0;
}
#endif /* UNITTESTS */
-void Win32SyscallRegisterTests()
+void Win32SyscallRegisterTests(void)
{
#ifdef UNITTESTS
UtRegisterTest("Win32TestStripPcapPrefix", Win32TestStripPcapPrefix);