suricata
util-misc.c File Reference
#include "suricata-common.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,3})?\\s*$"
 

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

◆ PARSE_REGEX

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

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

Function Documentation

◆ ParseSizeDeinit()

void ParseSizeDeinit ( void  )

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

Referenced by GlobalsDestroy().

Here is the caller graph for this function:

◆ ParseSizeInit()

void ParseSizeInit ( void  )

Definition at line 35 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 156 of file util-misc.c.

Referenced by StreamTcpInitConfig().

Here is the caller graph for this function:

◆ ParseSizeStringU32()

int ParseSizeStringU32 ( const char *  size,
uint32_t *  res 
)

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

Referenced by PcapFileGlobalInit(), and StreamTcpInitConfig().

Here is the caller graph for this function:

◆ ParseSizeStringU64()

int ParseSizeStringU64 ( const char *  size,
uint64_t *  res 
)

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

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

Here is the caller graph for this function:

◆ ParseSizeStringU8()

int ParseSizeStringU8 ( const char *  size,
uint8_t *  res 
)

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

◆ ShortenString()

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

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

References 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 809 of file util-misc.c.

References UtRegisterTest().

Here is the call graph for this function: