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

#define WarnInvalidConfEntry (   param_name,
  format,
  value 
)
Value:
do { \
"Invalid conf entry found for " \
"\"%s\". Using default value of \"" format "\".", \
param_name, value); \
} while (0)
#define SCLogWarning(err_code,...)
Macro used to log WARNING messages.
Definition: util-debug.h:281

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 37 of file util-misc.h.

Referenced by DefragInitConfig(), HostInitConfig(), HTPFreeConfig(), IPPairInitConfig(), PostRunDeinit(), RunModeInitialize(), and StreamTcpInitConfig().

Function Documentation

void ParseSizeDeinit ( void  )
void ParseSizeInit ( void  )

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

References PARSE_REGEX, SC_ERR_PCRE_COMPILE, SC_ERR_PCRE_STUDY, and SCLogError.

Referenced by main().

Here is the caller graph for this function:

int ParseSizeStringU16 ( const char *  ,
uint16_t *   
)

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

Referenced by RunModeIdsNflogRegister(), and StreamTcpInitConfig().

Here is the caller graph for this function:

int ParseSizeStringU32 ( const char *  ,
uint32_t *   
)

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

Referenced by HTPFreeConfig(), PostRunDeinit(), RegisterModbusParsers(), RegisterSMBParsers(), and StreamTcpInitConfig().

Here is the caller graph for this function:

int ParseSizeStringU64 ( const char *  ,
uint64_t *   
)
int ParseSizeStringU8 ( const char *  ,
uint8_t *   
)

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

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

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

References length, MemcmpTest18Tests::result, str, and strlcat().

Referenced by DetectAppLayerMpmRegisterByParentId(), and LiveGetDeviceName().

Here is the call graph for this function:

Here is the caller graph for this function:

void UtilMiscRegisterTests ( void  )

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

References UtRegisterTest().

Here is the call graph for this function: