File SolidSyslogOriginSd.h¶
FileList > Core > Interface > SolidSyslogOriginSd.h
#include "SolidSyslogExternC.h"#include <stddef.h>
Classes¶
| Type | Name |
|---|---|
| struct | SolidSyslogOriginSdConfig Wiring for the "origin" SD-ELEMENT (RFC 5424 §7.2). |
Detailed Description¶
A StructuredData source for the RFC 5424 §7.2 "origin" SD-ELEMENT (IANA SD-ID, so no enterprise-number suffix), emitted on every message the owning logger formats.
It can carry software, swVersion, enterpriseId, and any number of repeated ip PARAMs. Every field is independently optional: a NULL string omits its PARAM, and the ip PARAMs appear only when both GetIpCount and GetIpAt are supplied (GetIpAt is then called once per index). The config strings are borrowed, not copied, and read at Format time - they must outlive the created SD.
Public Types Documentation¶
SolidSyslogOriginIpAtFunction¶
Writes the index-th origin address into thevalue sink.
typedef void(* SolidSyslogOriginIpAtFunction) (struct SolidSyslogSdValue *value, void *context, size_t index);
context is passed through unchanged.
SolidSyslogOriginIpCountFunction¶
Returns how many origin "ip" PARAMs to emit; GetIpAt is then called for each index in [0, count).
context is the shared IpContext, passed through unchanged (the same value GetIpAt receives).
Public Functions Documentation¶
SolidSyslogOriginSd_Create¶
Create an origin SD source, emitted on every message the owning logger formats.
struct SolidSyslogStructuredData * SolidSyslogOriginSd_Create (
const struct SolidSyslogOriginSdConfig * config
)
Never returns NULL: an exhausted pool reports via SolidSyslog_Error and returns the shared no-op NullSd, so callers need not null-check the result.
SolidSyslogOriginSd_Destroy¶
Release the SD's pool slot.
The borrowed config strings are not freed; the caller owns them.
The documentation for this class was generated from the following file Core/Interface/SolidSyslogOriginSd.h