suricata
datasets-string.c File Reference
#include "suricata-common.h"
#include "conf.h"
#include "datasets.h"
#include "datasets-string.h"
#include "util-thash.h"
#include "util-print.h"
#include "util-hash-lookup3.h"
#include "rust.h"
Include dependency graph for datasets-string.c:

Go to the source code of this file.

Functions

int StringAsBase64 (const void *s, char *out, size_t out_size)
 
int StringSet (void *dst, void *src)
 
int StringJsonSet (void *dst, void *src)
 
bool StringCompare (void *a, void *b)
 
uint32_t StringHash (uint32_t hash_seed, void *s)
 
uint32_t StringGetLength (void *s)
 
void StringFree (void *s)
 
void StringJsonFree (void *s)
 
uint32_t StringJsonGetLength (void *s)
 

Detailed Description

Function Documentation

◆ StringAsBase64()

int StringAsBase64 ( const void *  s,
char *  out,
size_t  out_size 
)

Definition at line 46 of file datasets-string.c.

References len, str, strlcat(), and strlcpy().

Here is the call graph for this function:

◆ StringCompare()

bool StringCompare ( void *  a,
void *  b 
)

Definition at line 95 of file datasets-string.c.

References StringType::len, and StringType::ptr.

◆ StringFree()

void StringFree ( void *  s)

Definition at line 119 of file datasets-string.c.

References SCFree, and str.

◆ StringGetLength()

uint32_t StringGetLength ( void *  s)

Definition at line 112 of file datasets-string.c.

References str.

◆ StringHash()

uint32_t StringHash ( uint32_t  hash_seed,
void *  s 
)

Definition at line 106 of file datasets-string.c.

References hashlittle_safe(), and str.

Here is the call graph for this function:

◆ StringJsonFree()

void StringJsonFree ( void *  s)

Definition at line 125 of file datasets-string.c.

References SCFree, and str.

◆ StringJsonGetLength()

uint32_t StringJsonGetLength ( void *  s)

Definition at line 134 of file datasets-string.c.

References str.

◆ StringJsonSet()

int StringJsonSet ( void *  dst,
void *  src 
)

Definition at line 79 of file datasets-string.c.

References DatajsonCopyJson(), dst, StringType::json, StringType::ptr, SCFree, src, and StringSet().

Here is the call graph for this function:

◆ StringSet()

int StringSet ( void *  dst,
void *  src 
)

Definition at line 60 of file datasets-string.c.

References dst, StringType::len, StringType::ptr, StringType::rep, SCLogDebug, SCLogError, SCMalloc, and src.

Referenced by StringJsonSet().

Here is the caller graph for this function: