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

An element of structured data. 更多...

#include <element.h>

成员变量

char name [32+1]
 The name of the element.
 
size_t name_length
 The number of characters in name.
 
struct stumpless_param ** params
 The parameters this element contains.
 
size_t param_count
 The number of params in the array.
 
stumpless_element_namer_func_t get_journald_name
 Gets the name to use for the journald field corresponding to this element.
 
void * mutex
 A pointer to a mutex which protects all element fields.
 

详细描述

An element of structured data.

Elements must have a name, but may or may not have any parameters. Their components must comply with RFC 5424.

结构体成员变量说明

◆ get_journald_name

stumpless_element_namer_func_t stumpless_element::get_journald_name

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

◆ mutex

void* stumpless_element::mutex

A pointer to a mutex which protects all element fields.

The exact type of this mutex depends on the build.

◆ name

char stumpless_element::name[32+1]

The name of the element.

As specified in RFC 5424, the '=', ']', '"' characters are not allowed in element names. In addition, the '@' character is only allowed in names that are private. All other characters between '!' and '~', inclusive, are allowed.

According to the standard names must either be private (of the form name<private enterprise number>) or registered with the IANA. This library assumes that you have done your due diligence and does not enforce the registration requirement.

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_element_name functions. These will protect you from changes in the struct in future versions.

◆ name_length

size_t stumpless_element::name_length

The number of characters in name.

◆ param_count

size_t stumpless_element::param_count

The number of params in the array.

◆ params

struct stumpless_param** stumpless_element::params

The parameters this element contains.

This is an array of pointers to param structures. Use the param_count member to iterate through the array if needed. This may be NULL if there are no params in the element, but not necessarily - the param_count is the only way to tell for sure.


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