stumpless  2.1.0
Data Fields
stumpless_param Struct Reference

A parameter within a structured data element. More...

#include <param.h>

Data Fields

char * name
 The name of the parameter. More...
 
size_t name_length
 The number of characters in name (not including the NULL character). More...
 
char * value
 The value may be any UTF-8 string. More...
 
size_t value_length
 The number of characters in value (not including the NULL character). More...
 
stumpless_param_namer_func_t get_journald_name
 Gets the name to use for the journald field corresponding to this param. More...
 
void * mutex
 A pointer to a mutex which protects all target fields. More...
 

Detailed Description

A parameter within a structured data element.

A parameter must have both a name and a value in compliance with RFC 5424.

Field Documentation

◆ get_journald_name

stumpless_param_namer_func_t stumpless_param::get_journald_name

Gets the name to use for the journald field corresponding to this param.

◆ mutex

void* stumpless_param::mutex

A pointer to a mutex which protects all target fields.

The exact type of this mutex depends on the build.

◆ name

char* stumpless_param::name

The name of the parameter.

The name must be between 1 and 32 characters long and consist only of ASCII characters between '!' and '~', inclusive, with the exception of the '=', ' ', ']', and '"' characters, which are not allowed.

Note that the name will be NULL-terminated as of version 1.6.0. In earlier versions it is not NULL-terminated.

If you need to access the name, use the stumpless_(g|s)et_param_name functions. These will protect you from changes in the struct in future versions.

◆ name_length

size_t stumpless_param::name_length

The number of characters in name (not including the NULL character).

◆ value

char* stumpless_param::value

The value may be any UTF-8 string.

As specified in RFC 5424, the characters '"' (ABNF d34), '\' (ABNF d92), and ']' (ABNF d93) MUST be escaped by placing a backslash character '\' directly before them.

Unlike the name field, value will always be NULL-terminated. This is done to support their use for wel insertion strings.

If you need to access the value, use the stumpless_(g|s)et_param_value functions. These will protect you from changes in the struct in future versions.

◆ value_length

size_t stumpless_param::value_length

The number of characters in value (not including the NULL character).


The documentation for this struct was generated from the following file: