suricata
util-misc.c File Reference
#include "suricata-common.h"
#include "config.h"
#include "suricata.h"
#include "util-byte.h"
#include "util-debug.h"
#include "util-unittest.h"
#include "util-misc.h"
Include dependency graph for util-misc.c:

Go to the source code of this file.

Macros

#define PARSE_REGEX   "^\\s*(\\d+(?:.\\d+)?)\\s*([a-zA-Z]{2})?\\s*$"
 
#define MAX_SUBSTRINGS   30
 

Functions

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

Detailed Description

Macro Definition Documentation

◆ MAX_SUBSTRINGS

#define MAX_SUBSTRINGS   30

◆ PARSE_REGEX

#define PARSE_REGEX   "^\\s*(\\d+(?:.\\d+)?)\\s*([a-zA-Z]{2})?\\s*$"

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

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 *  size,
uint16_t *  res 
)

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 *  size,
uint32_t *  res 
)

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 *  size,
uint64_t *  res 
)

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 *  size,
uint8_t *  res 
)

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: