suricata
|
Go to the source code of this file.
Data Structures | |
struct | DataJsonType |
struct | DataJsonResultType |
Macros | |
#define | DATAJSON_JSON_LENGTH 1024 |
Typedefs | |
typedef struct DataJsonType | DataJsonType |
typedef struct DataJsonResultType | DataJsonResultType |
Functions | |
Dataset * | DatajsonGet (const char *name, enum DatasetTypes type, const char *load, uint64_t memcap, uint32_t hashsize, char *json_key_value, char *json_array_key, DatasetFormats format, bool remove_key) |
DataJsonResultType | DatajsonLookup (Dataset *set, const uint8_t *data, const uint32_t data_len) |
int | DatajsonAddSerialized (Dataset *set, const char *value, const char *json) |
add serialized data to json set More... | |
void | DatajsonUnlockElt (DataJsonResultType *r) |
int | DatajsonCopyJson (DataJsonType *dst, DataJsonType *src) |
Definition in file datasets-context-json.h.
#define DATAJSON_JSON_LENGTH 1024 |
Definition at line 31 of file datasets-context-json.h.
typedef struct DataJsonResultType DataJsonResultType |
typedef struct DataJsonType DataJsonType |
int DatajsonAddSerialized | ( | Dataset * | set, |
const char * | value, | ||
const char * | json | ||
) |
add serialized data to json set
int | 1 added |
int | 0 already in hash |
int | -1 API error (not added) |
int | -2 DATA error |
Definition at line 875 of file datasets-context-json.c.
References DataJsonType::value.
int DatajsonCopyJson | ( | DataJsonType * | dst, |
DataJsonType * | src | ||
) |
Definition at line 54 of file datasets-context-json.c.
References dst, SCMalloc, and src.
Referenced by IPv4JsonSet(), IPv6JsonSet(), Md5StrJsonSet(), Sha256StrJsonSet(), and StringJsonSet().
Dataset* DatajsonGet | ( | const char * | name, |
enum DatasetTypes | type, | ||
const char * | load, | ||
uint64_t | memcap, | ||
uint32_t | hashsize, | ||
char * | json_key_value, | ||
char * | json_array_key, | ||
DatasetFormats | format, | ||
bool | remove_key | ||
) |
Definition at line 631 of file datasets-context-json.c.
References DATASET_TYPE_MD5, DatasetGetOrCreate(), DatasetLock(), DatasetUnlock(), Dataset::hash, hashsize, Md5StrCompare(), Md5StrHash(), Md5StrJsonFree(), Md5StrJsonGetLength(), Md5StrJsonSet(), Dataset::name, name, Dataset::remove_key, SCLogDebug, SCLogError, THashInit(), and type.
DataJsonResultType DatajsonLookup | ( | Dataset * | set, |
const uint8_t * | data, | ||
const uint32_t | data_len | ||
) |
Definition at line 846 of file datasets-context-json.c.
References DATASET_TYPE_STRING, DataJsonResultType::found, and Dataset::type.
void DatajsonUnlockElt | ( | DataJsonResultType * | r | ) |
Definition at line 47 of file datasets-context-json.c.
References DataJsonResultType::hashdata.