Skip to content

File SolidSyslogSdValue.h

FileList > Core > Interface > SolidSyslogSdValue.h

The per-param value sink of the SD authoring API: streams a PARAM value with RFC 5424 escaping applied by the library, so an author cannot break SD framing.

  • #include "SolidSyslogExternC.h"
  • #include <stddef.h>
  • #include <stdint.h>

Public Functions Documentation

SolidSyslogSdValue_BoundedString

As SolidSyslogSdValue_String, but caps the value at maxDecodedLength decoded bytes, for SD params a receiver parses into a width-limited field.

void SolidSyslogSdValue_BoundedString (
    struct SolidSyslogSdValue * value,
    const char * source,
    size_t maxDecodedLength
) 

The bound counts what the reader's un-escaping decoder extracts (an escape pair as one byte, a substituted U+FFFD as three), not the on-wire byte count.


SolidSyslogSdValue_String

Streams source (a NUL-terminated UTF-8 chunk) into the value, escaping each of '"', '\', ']' and substituting ill-formed UTF-8 with U+FFFD.

void SolidSyslogSdValue_String (
    struct SolidSyslogSdValue * value,
    const char * source
) 

May be called repeatedly on the same value; a multi-byte codepoint split across two calls is reassembled. Output is bounded by the message buffer.


SolidSyslogSdValue_Uint32

Emits the decimal digits of number .

void SolidSyslogSdValue_Uint32 (
    struct SolidSyslogSdValue * value,
    uint32_t number
) 

Digits are never escapable, so no escaping applies. Output is bounded by the message buffer.



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