stumpless 2.2.0
载入中...
搜索中...
未找到
stumpless_param结构体 参考

A parameter within a structured data element. 更多...

#include <param.h>

成员变量

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

详细描述

A parameter within a structured data element.

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

结构体成员变量说明

◆ 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[32+1]

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).


该结构体的文档由以下文件生成: