File SolidSyslogTunablesDefaults.h¶
FileList > Core > Interface > SolidSyslogTunablesDefaults.h
Detailed Description¶
The default values for every compile-time tunable - pool sizes, message / path / integrity limits, and timeouts - each #ifndef-guarded so a user override wins.
Reached through the SolidSyslogTunables.h umbrella.
Macro Definition Documentation¶
SOLIDSYSLOG_ADDRESS_POOL_SIZE¶
Role pool: Address.
Number of address instances each compiled implementation's static pool can hold at once.
Default 3 - matches the canonical BDD multi-transport wiring (UDP + plain-TCP + TLS-stream, one Address per Sender) so common integrators are spared an override. Same trade-off as SOLIDSYSLOG_TCP_STREAM_POOL_SIZE / _STREAM_SENDER_POOL_SIZE: single-transport integrators pay for two unused slots; multi-transport integrators get the canonical wiring out of the box. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than three concurrent senders are needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_AES_GCM_POLICY_POOL_SIZE¶
Role pool: AES-256-GCM SecurityPolicy.
Number of keyed AEAD policy instances each compiled implementation's static pool can hold at once.
Default 1 - a single at-rest store with one confidentiality policy is the common case. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one store with an independent key is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_ATOMIC_COUNTER_POOL_SIZE¶
Role pool: AtomicCounter.
Number of atomic-counter instances each compiled implementation's static pool can hold at once.
Default 1 - RFC 5424 sequenceIds are scoped per SolidSyslog instance, and almost all integrators run a single SolidSyslog instance per process. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE¶
Number of SolidSyslogBlockStore instances the library's internal static pool can simultaneously hold.
Sizes three pools 1:1 - the BlockStore slot itself, plus the TU-internal RecordStore and BlockSequence pools that each BlockStore composes. The 1:1 invariant means a BlockStore slot is guaranteed a free RecordStore and BlockSequence on Create; if any inner Create returns its fallback under normal use, the BlockStore as a whole resolves to SolidSyslogNullStore.
Default 1 - almost all integrators wire a single store-and-forward BlockStore. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_CIRCULAR_BUFFER_POOL_SIZE¶
Number of SolidSyslogCircularBuffer instances the library's internal static pool can simultaneously hold.
Each instance is a small bookkeeping struct (vtable, mutex pointer, ring pointer, head/tail/wrap) * roughly 64 bytes on a 64-bit target, 32 on a 32-bit target. The caller's ring memory is separate (passed to SolidSyslogCircularBuffer_Create).
Most integrators only ever create one CircularBuffer per process; default 1. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if the integrator needs multiple concurrent buffer instances.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_DATAGRAM_POOL_SIZE¶
Role pool: Datagram (UDP transport).
Number of datagram instances each compiled implementation's static pool can hold at once.
Default 1 - almost all integrators wire a single datagram into a UdpSender. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_DATAGRAM_RESOLVE_WAIT_MS¶
How long a Datagram waits for the next hop's link address to resolve before it hands a record to a stack that would otherwise hold or drop it.
Used by the Datagram backends that confirm the next hop before sending; each says so on its platform page.
The wait is paid by the task that calls SolidSyslog_Service, or by the task that logs on an inline wiring, and only when the next hop is not already resolved: typically the first record after start-up or after the stack's entry has expired. A wait that ends unresolved returns FAILED; with a store the record is kept for the next pass, without one it is lost and reported. After a failed resolution a backend does not wait again until one succeeds, so an unreachable next hop costs one wait, not one per record.
Default 100 ms - an ARP reply on a local network arrives in well under a millisecond, so this allows for a slow peer without holding the servicing task for long. There is deliberately no runtime getter.
Floor: 1 ms. Sub-floor values rejected at compile time.
SOLIDSYSLOG_DNS_RESOLVE_TIMEOUT_MS¶
Bounded deadline (milliseconds) the SolidSyslogLwipRawDnsResolver waits for an async dns_gethostbyname lookup to complete before giving up and reporting a failed resolution.
The synchronous Resolve() contract bridges lwIP's async DNS by spinning on the caller's thread (sleeping via the injected SolidSyslogSleepFunction) until the dns_found_callback fires or this deadline elapses.
Default 5000 ms - DNS is markedly slower than the 200 ms TCP connect: a cold lookup may traverse a recursive resolver and the network round-trip dominates. There is deliberately no per-instance runtime getter (unlike the TCP connect timeout); DNS timeout rarely needs live tuning. Override at build time via SOLIDSYSLOG_USER_TUNABLES_FILE if a deployment's resolver is slower.
Floor: 1 ms. Sub-floor values rejected at compile time.
SOLIDSYSLOG_FILE_BLOCK_DEVICE_POOL_SIZE¶
Number of SolidSyslogFileBlockDevice instances the library's internal static pool can simultaneously hold.
Each instance carries the cached open-file handle plus the path-prefix pointer.
Default 1 - almost all integrators wire a single FileBlockDevice as the backing store for one BlockStore. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_FILE_DEFAULT_BLOCK_SIZE¶
Default per-block capacity (bytes) for file-backed block devices.
Supplied to SolidSyslogFileBlockDevice_Create when the integrator has no specific size in mind; passing 0 to SolidSyslogFileBlockDevice_Create selects this default. A larger block holds more records before rotating to a fresh file; a smaller block rotates (and fsyncs) more often.
The default clears both the record floor below and the sector size a filesystem beneath the device may impose. Set this from the media's erase granularity where that is known.
Floor: one worst-case record - the max message plus the widest integrity tag plus the 5-byte record framing (2 magic + 2 length + 1 sent-flag). Below that a block could not hold a single record, so the default must clear it for every SecurityPolicy. Sub-floor values rejected at compile time.
SOLIDSYSLOG_FILE_POOL_SIZE¶
Role pool: File.
Number of file instances each compiled implementation's static pool can hold at once.
Default 1 - almost all integrators wire a single file into a FileBlockDevice. Integrators using FileBlockDevice with BlockStore may want to bump this in line with SOLIDSYSLOG_BLOCK_STORE_POOL_SIZE via SOLIDSYSLOG_USER_TUNABLES_FILE.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_HMAC_SHA256_POLICY_POOL_SIZE¶
Role pool: HMAC-SHA256 SecurityPolicy.
Number of keyed HMAC policy instances each compiled implementation's static pool can hold at once.
Default 1 - a single at-rest store with one integrity policy is the common case. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one store with an independent key is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_LWIP_RAW_DNS_RESOLVE_POLL_MS¶
Period (milliseconds) the SolidSyslogLwipRawDnsResolver bounded-resolve spin loop sleeps between polls of the lwIP-side dns_found_callback done flag.
Each iteration calls the integrator-injected SolidSyslogSleepFunction so the loop never busy-waits - under NO_SYS=1 the integrator's Sleep ticks sys_check_timeouts and drives the DNS retransmit timer; under NO_SYS=0 it yields to the tcpip thread (vTaskDelay or equivalent). Mirrors SOLIDSYSLOG_LWIP_RAW_TCP_CONNECT_POLL_MS.
Default 10 ms gives 500 polls inside the default 5000 ms resolve deadline.
Floor: 1 ms. Sub-floor values rejected at compile time.
SOLIDSYSLOG_LWIP_RAW_TCP_CONNECT_POLL_MS¶
Period (milliseconds) the SolidSyslogLwipRawTcpStream bounded-connect spin loop sleeps between polls of the lwIP-side connected_cb flag.
Each iteration calls the integrator-injected SolidSyslogSleepFunction so the loop never busy-waits - under NO_SYS=1 the integrator's Sleep implementation ticks sys_check_timeouts and drives RX; under NO_SYS=0 it yields to the tcpip thread (vTaskDelay or equivalent).
Default 10 ms gives 20 polls inside the default 200 ms connect deadline.
Floor: 1 ms. Sub-floor values rejected at compile time.
SOLIDSYSLOG_LWIP_RAW_TCP_RX_QUEUE_SIZE¶
Maximum number of struct pbuf* the SolidSyslogLwipRawTcpStream RX queue holds before backpressuring lwIP.
Bounds the count of queued pbufs, not their byte volume - lwIP's TCP_WND and MEMP_NUM_PBUF cap upstream receive bytes; this knob caps how many segment-sized pbufs can pile up behind a slow Stream_Read drain before the tcp_recv callback returns non-ERR_OK so lwIP retains the pbuf and replays the callback later.
Default 8 - sized for the typical mTLS handshake flight (ServerHello + Certificate + ServerKeyExchange + ServerHelloDone is 2-4 segments; 8 leaves margin for cert chains and renegotiation traffic).
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_MAX_HMAC_KEY_SIZE¶
Maximum HMAC key length, in bytes, a keyed SecurityPolicy will fetch from its SolidSyslogKeyFunction into a transient on-stack buffer (wiped after each use).
Sized for the SHA-256 HMAC block (64 bytes): RFC 2104 keys up to the hash block size are used directly; longer keys are pre-hashed by the HMAC itself, so 64 covers the recommended range. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE only if an integrator's GetKey returns a longer key verbatim.
Floor: 32 (the SHA-256 output size, the RFC-recommended minimum key length).
SOLIDSYSLOG_MAX_INTEGRITY_SIZE¶
Maximum bytes of integrity-tag the library will reserve per record.
Drives the RecordStore per-record buffer width - every record carries a tag this wide regardless of the active SolidSyslogSecurityPolicy. Default 32 is large enough for HMAC-SHA256; CRC-16 uses 2 of those bytes; the rest is unused slack the integrator can recover by dropping this in their tunables override.
Floor: 4. Enough for CRC-32 or a truncated MAC. Sub-floor values rejected at compile time.
SOLIDSYSLOG_MAX_MESSAGE_SIZE¶
Maximum bytes the library will format for a single syslog message.
Caps the per-Log Formatter buffer (stack-allocated inside SolidSyslog_Log), the FileStore record size, and the minimum BlockStore block size. A longer message is truncated, not dropped. Lower values save stack and store footprint; higher values reduce truncation.
The default is the length RFC 5424 section 6.1 requires every transport receiver to accept, and so the largest a sender can emit with certainty of acceptance. That section recommends receivers accept more and permits any length: raise this where the receivers are known.
Floor: smallest size that can hold a meaningful RFC 5424 security event. A legal all-NILVALUE message is 16 bytes; this allows enough headroom for a real PRI, hostname, MSGID, and short payload. Sub-floor values rejected at compile time.
SOLIDSYSLOG_MAX_PATH_SIZE¶
Maximum bytes the library will format for a single on-disk path produced by SolidSyslogFileBlockDevice (path prefix + two-digit sequence number + ".log" + null terminator).
Caps both the per-call Formatter storage and the bounded prefix copy.
Floor: smallest size that still leaves room for a meaningful prefix after subtracting the 6-byte filename suffix and null terminator. 32 leaves 24 characters for the prefix - enough for any sane filesystem location. Sub-floor values rejected at compile time.
SOLIDSYSLOG_META_SD_POOL_SIZE¶
Number of SolidSyslogMetaSd instances the library's internal static pool can simultaneously hold.
Default 1 - meta SD is typically wired into SolidSyslogConfig.Sd[] once per process.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_MUTEX_POOL_SIZE¶
Role pool: Mutex.
Number of mutex instances each compiled implementation's static pool can hold at once.
Default 1 - most integrators wire a single mutex into a CircularBuffer or other thread-safe primitive. Targets that need more (e.g. a separate lifecycle mutex alongside a buffer mutex) bump this via SOLIDSYSLOG_USER_TUNABLES_FILE.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_ORIGIN_SD_POOL_SIZE¶
Number of SolidSyslogOriginSd instances the library's internal static pool can simultaneously hold.
Each instance carries the pre-formatted static-prefix Formatter storage (software, swVersion, enterpriseId) so the per-message Format only splices in the IP params. Larger per-slot footprint than the other SDs.
Default 1.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_PASSTHROUGH_BUFFER_POOL_SIZE¶
Number of SolidSyslogPassthroughBuffer instances the library's internal static pool can simultaneously hold.
Each instance is tiny (vtable + a Sender pointer).
PassthroughBuffer is the single-task "direct-send, no buffering" configuration - every integrator typically creates one. Default 1. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one process or task needs its own passthrough Buffer instance.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_POOL_SIZE¶
Number of SolidSyslog instances the library's internal static pool can simultaneously hold.
Each instance is a small bookkeeping struct (collaborator pointers + SD array pointer + count).
Most integrators only ever create one SolidSyslog per process; default 1. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if the integrator needs multiple concurrent SolidSyslog instances.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_POSIX_MESSAGE_QUEUE_BUFFER_POOL_SIZE¶
Number of SolidSyslogPosixMessageQueueBuffer instances the library's internal static pool can simultaneously hold.
Each instance carries an mqd_t plus the per-process queue name (Formatter storage).
Default 1 - almost all integrators wire a single MQ-backed buffer. The queue name derives from the process ID, so bumping above 1 in the same process would race multiple slots onto the same /solidsyslog_<pid> name; an integrator needing N > 1 must additionally distinguish the names (out of scope today).
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_RESOLVER_POOL_SIZE¶
Role pool: Resolver.
Number of resolver instances each compiled implementation's static pool can hold at once.
Default 1 - almost all integrators wire a single resolver shared across their Senders. Each resolver has its own pool, so a build that links two can already hold one of each at the default; raising this raises every one of them.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_STREAM_SENDER_POOL_SIZE¶
Number of SolidSyslogStreamSender instances the library's internal static pool can simultaneously hold.
Each instance carries its config (resolver/stream/endpoint pointers) and connection state.
Default 2 - common multi-transport wirings combine a plain TCP stream sender with a TLS stream sender behind a SwitchingSender so a TLS failure can fall back to plain TCP (or vice-versa). A pool of 1 would starve the second branch, resolving it to the shared SolidSyslogNullSender and reporting POOL_EXHAUSTED. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE for wirings that need more.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_SWITCHING_SENDER_POOL_SIZE¶
Number of SolidSyslogSwitchingSender instances the library's internal static pool can simultaneously hold.
Default 1 - a SwitchingSender wraps several inner senders, so one per process is the typical pattern. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_TCP_CONNECT_TIMEOUT_MS¶
Default bounded-connect deadline applied by every TCP Stream backend when the integrator does not install a SolidSyslogTcpConnectTimeoutFunction on the config struct.
The default sits below one SYN retransmission, which is deliberate rather than an oversight: a TCP stack waits on the order of a second to three before retrying a SYN it believes was lost, and a connect held open that long stalls the servicing pass behind it. So a connect whose SYN is lost fails here instead of waiting for the retry, and the next servicing pass attempts a fresh connect.
That is safe where a store is configured: a failed send leaves the record unsent and the store replays it. Where no store is configured the record is not retained anywhere, so one lost SYN loses one record. If you send over TCP or TLS without a store, and losing a record matters, raise this above your stack's initial SYN retransmission timeout so a lost SYN is retried inside the budget.
Weigh that against what a longer deadline costs, which differs by configuration. With a store, one record is sent per servicing pass, so an unreachable destination stalls a pass by one deadline. Without one, every buffered record is sent in the same pass and each attempts its own connect, so the stall is the deadline multiplied by how many records are waiting. Raising it therefore costs most in exactly the configuration that needs it: service often enough that few records accumulate, or accept the loss and keep the deadline short.
Runtime override: install GetConnectTimeoutMs on the per-Stream config - the getter is invoked on every connect attempt so live tuning takes effect without rebuilding or recreating the stream.
Floor: 1 ms. Sub-floor values rejected at compile time.
SOLIDSYSLOG_TCP_KEEPALIVE_IDLE_SECONDS¶
Idle period a TCP connection may sit silent before the first keepalive probe is sent.
This and the two tunables below are applied by every TCP Stream backend that can set keepalive on its own connection; a backend whose stack sets keepalive globally says so on its platform page.
SOLIDSYSLOG_TCP_KEEPALIVE_INTERVAL_SECONDS¶
Interval between keepalive probes once the idle period has elapsed.
SOLIDSYSLOG_TCP_KEEPALIVE_PROBE_COUNT¶
Unanswered keepalive probes tolerated before the peer is declared dead.
SOLIDSYSLOG_TCP_STREAM_POOL_SIZE¶
Role pool: TCP stream.
Number of TCP stream instances each compiled implementation's static pool can hold at once.
Default 2 - common multi-transport wirings combine a plain TCP stream with a second TCP stream that underlies a TLS stream (TLS wraps an injected Stream as its byte transport), so with a pool of 1 the second Create falls back to NullStream and reports POOL_EXHAUSTED. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE for wirings that need more.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_TIME_QUALITY_SD_POOL_SIZE¶
Number of SolidSyslogTimeQualitySd instances the library's internal static pool can simultaneously hold.
Default 1.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_TLS_CREDENTIALS_POOL_SIZE¶
Role pool: TLS credentials.
Number of credentials instances each compiled implementation's static pool can hold at once.
Default 1 - one source per TLS stream is the ordinary wiring. Bump it alongside SOLIDSYSLOG_TLS_STREAM_POOL_SIZE where several streams draw on separate sources.
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_TLS_HANDSHAKE_TIMEOUT_MS¶
Default bounded TLS handshake deadline applied by every TLS Stream backend when the integrator does not install a SolidSyslogTlsHandshakeTimeoutFunction on the config struct.
5 s covers a full TLS 1.2 / 1.3 exchange on a healthy LAN with cert validation; raise it for WAN deployments or constrained MCUs that handshake slowly.
Runtime override: install GetHandshakeTimeoutMs on the per-Stream config - the getter is invoked on every handshake attempt so live tuning takes effect without rebuilding or recreating the stream.
Floor: 1 ms. Sub-floor values rejected at compile time.
SOLIDSYSLOG_TLS_STREAM_POOL_SIZE¶
Role pool: TLS stream.
Number of TLS stream instances each compiled implementation's static pool can hold at once.
Default 1 - TLS senders are scoped per destination and almost all integrators wire a single TLS sender per process. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one is genuinely needed (e.g. multi-destination egress with separate TLS sessions per peer).
Floor: 1. Sub-floor values rejected at compile time.
SOLIDSYSLOG_UDP_SENDER_POOL_SIZE¶
Number of SolidSyslogUdpSender instances the library's internal static pool can simultaneously hold.
Each instance carries its config (resolver/datagram/endpoint pointers), the resolved address storage, and connection state.
Default 1 - almost all integrators wire a single UDP sender into either SolidSyslogConfig directly or as one branch of a SwitchingSender. Bump via SOLIDSYSLOG_USER_TUNABLES_FILE if more than one is genuinely needed.
Floor: 1. Sub-floor values rejected at compile time.
The documentation for this class was generated from the following file Core/Interface/SolidSyslogTunablesDefaults.h