Skip to content

File SolidSyslogMetaSd.h

FileList > Core > Interface > SolidSyslogMetaSd.h

Go to the source code of this file

A StructuredData source for the RFC 5424 §7.3 "meta" SD-ELEMENT (IANA SD-ID, so no enterprise-number suffix), emitted on every message the owning logger formats. More...

  • #include "ExternC.h"
  • #include "SolidSyslogSdValueFunction.h"
  • #include <stdint.h>

Classes

Type Name
struct SolidSyslogMetaSdConfig
Wiring for the "meta" SD-ELEMENT (RFC 5424 §7.3).

Public Types

Type Name
typedef uint32_t(* SolidSyslogSysUpTimeFunction
Returns system uptime in hundredths of a second (RFC 3418 TimeTicks), wrapping on overflow.

Public Functions

Type Name
struct SolidSyslogStructuredData * SolidSyslogMetaSd_Create (const struct SolidSyslogMetaSdConfig * config)
Create a meta SD source, emitted on every message the owning logger formats.
void SolidSyslogMetaSd_Destroy (struct SolidSyslogStructuredData * base)
Release the SD's pool slot.

Detailed Description

It always carries sequenceId, taken from one Increment of the injected AtomicCounter per message, and optionally sysUpTime and language. The two optional PARAMs are independently omitted when their config member is NULL, so a bare meta element is just [meta sequenceId="..."].

Public Types Documentation

typedef SolidSyslogSysUpTimeFunction

Returns system uptime in hundredths of a second (RFC 3418 TimeTicks), wrapping on overflow.

typedef uint32_t(* SolidSyslogSysUpTimeFunction) (void);

Feeds the meta element's sysUpTime PARAM.


Public Functions Documentation

function SolidSyslogMetaSd_Create

Create a meta SD source, emitted on every message the owning logger formats.

struct SolidSyslogStructuredData * SolidSyslogMetaSd_Create (
    const struct SolidSyslogMetaSdConfig * config
) 

Never returns NULL: a NULL config, a NULL Counter, or an exhausted pool reports via SolidSyslog_Error and returns the shared no-op NullSd, so callers need not null-check the result.


function SolidSyslogMetaSd_Destroy

Release the SD's pool slot.

void SolidSyslogMetaSd_Destroy (
    struct SolidSyslogStructuredData * base
) 

Does not touch the injected Counter; the caller owns it.



The documentation for this class was generated from the following file Core/Interface/SolidSyslogMetaSd.h