stumpless 2.2.0
Loading...
Searching...
No Matches
stumpless_element Struct Reference

An element of structured data. More...

#include <element.h>

Data Fields

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.
 

Detailed Description

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.

Examples
entry_example.c, file_example.c, socket_example.c, stream_example.c, tcp_example.c, and udp_example.c.

Field Documentation

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


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