suricata
util-misc.h File Reference
#include "util-error.h"
Include dependency graph for util-misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WarnInvalidConfEntry(param_name, format, value)
 Generic API that can be used by all to log an invalid conf entry. More...
 

Functions

int ParseSizeStringU8 (const char *, uint8_t *)
 
int ParseSizeStringU16 (const char *, uint16_t *)
 
int ParseSizeStringU32 (const char *, uint32_t *)
 
int ParseSizeStringU64 (const char *, uint64_t *)
 
void UtilMiscRegisterTests (void)
 
void ParseSizeInit (void)
 
void ParseSizeDeinit (void)
 
void ShortenString (const char *input, char *output, size_t output_size, char c)
 

Detailed Description

Macro Definition Documentation

◆ WarnInvalidConfEntry

#define WarnInvalidConfEntry (   param_name,
  format,
  value 
)
Value:
do { \
"Invalid conf entry found for " \
"\"%s\". Using default value of \"" format "\".", \
param_name, value); \
} while (0)

Generic API that can be used by all to log an invalid conf entry.

Parameters
param_nameA string specifying the param name.
formatFormat for the below value. For example "%s", "%"PRIu32, etc.
valueDefault value to be printed.

Definition at line 38 of file util-misc.h.

Function Documentation

◆ ParseSizeDeinit()

void ParseSizeDeinit ( void  )

Definition at line 55 of file util-misc.c.

◆ ParseSizeInit()

void ParseSizeInit ( void  )

Definition at line 36 of file util-misc.c.

Referenced by InitGlobal().

Here is the caller graph for this function:

◆ ParseSizeStringU16()

int ParseSizeStringU16 ( const char *  ,
uint16_t *   
)

Definition at line 169 of file util-misc.c.

References res.

Referenced by StreamTcpInitConfig().

Here is the caller graph for this function:

◆ ParseSizeStringU32()

int ParseSizeStringU32 ( const char *  ,
uint32_t *   
)

Definition at line 186 of file util-misc.c.

References res.

Referenced by StreamTcpInitConfig().

Here is the caller graph for this function:

◆ ParseSizeStringU64()

int ParseSizeStringU64 ( const char *  ,
uint64_t *   
)

Definition at line 203 of file util-misc.c.

References res.

Referenced by FlowInitConfig(), HTPParseMemcap(), and StreamTcpInitConfig().

Here is the caller graph for this function:

◆ ParseSizeStringU8()

int ParseSizeStringU8 ( const char *  ,
uint8_t *   
)

Definition at line 152 of file util-misc.c.

References res.

◆ ShortenString()

void ShortenString ( const char *  input,
char *  output,
size_t  output_size,
char  c 
)

Definition at line 220 of file util-misc.c.

References length, and strlcat().

Referenced by DetectAppLayerMpmRegisterByParentId().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UtilMiscRegisterTests()

void UtilMiscRegisterTests ( void  )

Definition at line 1174 of file util-misc.c.

References UtRegisterTest().

Here is the call graph for this function:
SC_ERR_INVALID_YAML_CONF_ENTRY
@ SC_ERR_INVALID_YAML_CONF_ENTRY
Definition: util-error.h:169