Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Bdd/Targets/FreeRtos/solidsyslog_user_tunables.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
* mid-run). The library default of 1 would silently fall the second Create
* back to NullMutex — Lock/Unlock would become no-ops and the rebuild path
* could race the Service task. */
#define SOLIDSYSLOG_FREE_RTOS_MUTEX_POOL_SIZE 2U
#define SOLIDSYSLOG_MUTEX_POOL_SIZE 2U

#endif /* SOLIDSYSLOG_USER_TUNABLES_H */
2 changes: 1 addition & 1 deletion Bdd/Targets/FreeRtosLwip/solidsyslog_user_tunables.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
* `lifecycleMutex` (serialising SolidSyslog_Service against teardown). The
* library default of 1 would silently fall the second Create back to
* NullMutex — Lock/Unlock would become no-ops. */
#define SOLIDSYSLOG_FREE_RTOS_MUTEX_POOL_SIZE 2U
#define SOLIDSYSLOG_MUTEX_POOL_SIZE 2U

#endif /* SOLIDSYSLOG_USER_TUNABLES_H */
9 changes: 8 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ live under `Core/Interface/`; platform-specific helpers (the `SolidSyslogPosix*`
| `SolidSyslogPlusTcpResolverErrors.h` | Any code installing an error handler that wants to react to PlusTcpResolver-specific events (pointer-identity match on `PlusTcpResolverErrorSource`, switch on `enum SolidSyslogPlusTcpResolverErrors`) | `enum SolidSyslogPlusTcpResolverErrors` (`PLUSTCPRESOLVER_ERROR_*` codes + `PLUSTCPRESOLVER_ERROR_MAX` bookend), `extern const struct SolidSyslogErrorSource PlusTcpResolverErrorSource`. Integrators ignore if not handling errors per source. |
| `SolidSyslogLwipRawResolver.h` | System setup code on **any target using lwIP Raw API** that resolves numeric IPv4 hosts (no DNS) | `SolidSyslogLwipRawResolver_Create(void)`, `_Destroy(base)` — Resolve delegates to lwIP's `ipaddr_aton`: whatever the parser accepts, we accept; whatever it rejects (DNS names, alphabetic input, empty string), we reject. We do not enforce any specific shape on top of the parser. Transport is ignored. DNS-name resolution lands as the sibling `SolidSyslogLwipRawDnsResolver`. Instance struct lives in a library-internal static pool (E11). Pool-exhaustion fallback is the shared `SolidSyslogNullResolver`. |
| `SolidSyslogLwipRawResolverErrors.h` | Any code installing an error handler that wants to react to LwipRawResolver-specific events (pointer-identity match on `LwipRawResolverErrorSource`, switch on `enum SolidSyslogLwipRawResolverErrors`) | `enum SolidSyslogLwipRawResolverErrors` (`LWIPRAWRESOLVER_ERROR_*` codes + `LWIPRAWRESOLVER_ERROR_MAX` bookend), `extern const struct SolidSyslogErrorSource LwipRawResolverErrorSource`. Integrators ignore if not handling errors per source. |
| `SolidSyslogLwipRawDnsResolver.h` | System setup code on **any target using lwIP Raw API** that resolves hosts **by name** (DNS) — superset of the numeric resolver: literals, DNS-cache hits, and local-hostlist entries also resolve | `SolidSyslogLwipRawDnsResolverConfig` (required `Sleep`), `SolidSyslogLwipRawDnsResolver_Create(config)`, `_Destroy(base)` — wraps lwIP's async `dns_gethostbyname` under the `SolidSyslogLwipRaw_Marshal` hop (it touches lwIP core state, unlike the numeric resolver's `ipaddr_aton`), bridging it to the synchronous `Resolve()` via a bounded spin on the caller's thread (integrator-supplied `Sleep`; deadline `SOLIDSYSLOG_DNS_RESOLVE_TIMEOUT_MS`, poll `SOLIDSYSLOG_LWIP_RAW_DNS_RESOLVE_POLL_MS`). `ERR_OK` synchronous hit → immediate; `ERR_INPROGRESS` → spin to the `dns_found_callback`; deadline → fail + error report. Transport ignored. Requires `LWIP_DNS=1`. Instance struct lives in a library-internal static pool (E11; tunable `SOLIDSYSLOG_LWIP_RAW_DNS_RESOLVER_POOL_SIZE`, default 1). Pool-exhaustion and bad-config (`NULL` config or `NULL` `Sleep`) fallback is the shared `SolidSyslogNullResolver`. See [`docs/integrating-lwip.md`](docs/integrating-lwip.md). |
| `SolidSyslogLwipRawDnsResolver.h` | System setup code on **any target using lwIP Raw API** that resolves hosts **by name** (DNS) — superset of the numeric resolver: literals, DNS-cache hits, and local-hostlist entries also resolve | `SolidSyslogLwipRawDnsResolverConfig` (required `Sleep`), `SolidSyslogLwipRawDnsResolver_Create(config)`, `_Destroy(base)` — wraps lwIP's async `dns_gethostbyname` under the `SolidSyslogLwipRaw_Marshal` hop (it touches lwIP core state, unlike the numeric resolver's `ipaddr_aton`), bridging it to the synchronous `Resolve()` via a bounded spin on the caller's thread (integrator-supplied `Sleep`; deadline `SOLIDSYSLOG_DNS_RESOLVE_TIMEOUT_MS`, poll `SOLIDSYSLOG_LWIP_RAW_DNS_RESOLVE_POLL_MS`). `ERR_OK` synchronous hit → immediate; `ERR_INPROGRESS` → spin to the `dns_found_callback`; deadline → fail + error report. Transport ignored. Requires `LWIP_DNS=1`. Instance struct lives in a library-internal static pool (E11; role tunable `SOLIDSYSLOG_RESOLVER_POOL_SIZE`, default 1). Pool-exhaustion and bad-config (`NULL` config or `NULL` `Sleep`) fallback is the shared `SolidSyslogNullResolver`. See [`docs/integrating-lwip.md`](docs/integrating-lwip.md). |
| `SolidSyslogLwipRawDnsResolverErrors.h` | Any code installing an error handler that wants to react to LwipRawDnsResolver-specific events (pointer-identity match on `LwipRawDnsResolverErrorSource`, switch on `enum SolidSyslogLwipRawDnsResolverErrors`) | `enum SolidSyslogLwipRawDnsResolverErrors` (`LWIPRAWDNSRESOLVER_ERROR_*` codes incl. `_RESOLVE_TIMEOUT` + `LWIPRAWDNSRESOLVER_ERROR_MAX` bookend), `extern const struct SolidSyslogErrorSource LwipRawDnsResolverErrorSource`. Integrators ignore if not handling errors per source. |
| `SolidSyslogWinsockResolverErrors.h` | Any code installing an error handler that wants to react to WinsockResolver-specific events (pointer-identity match on `WinsockResolverErrorSource`, switch on `enum SolidSyslogWinsockResolverErrors`) | `enum SolidSyslogWinsockResolverErrors` (`WINSOCKRESOLVER_ERROR_*` codes + `WINSOCKRESOLVER_ERROR_MAX` bookend), `extern const struct SolidSyslogErrorSource WinsockResolverErrorSource`. Integrators ignore if not handling errors per source. |
| `SolidSyslogGetAddrInfoResolverErrors.h` | Any code installing an error handler that wants to react to GetAddrInfoResolver-specific events (pointer-identity match on `GetAddrInfoResolverErrorSource`, switch on `enum SolidSyslogGetAddrInfoResolverErrors`) | `enum SolidSyslogGetAddrInfoResolverErrors` (`GETADDRINFORESOLVER_ERROR_*` codes + `GETADDRINFORESOLVER_ERROR_MAX` bookend), `extern const struct SolidSyslogErrorSource GetAddrInfoResolverErrorSource`. Integrators ignore if not handling errors per source. |
Expand Down Expand Up @@ -582,6 +582,13 @@ Every stateful Created class lives in a library-internal static pool of N slots,
public `_Create` accepts a config struct and returns an opaque handle (a pointer into the
pool); `_Destroy` takes the handle and releases the slot. Pool semantics:

Platform- and vendor-selected classes (TCP stream, datagram, resolver, mutex, file,
atomic counter, TLS stream, HMAC policy) share a **role-named** tunable rather than one
name per implementation — `SOLIDSYSLOG_TCP_STREAM_POOL_SIZE`, not a per-platform
`SOLIDSYSLOG_POSIX_TCP_STREAM_*` name. A build links one implementation per role, so
the integrator tunes the role. See `docs/NAMING.md`, *Pool-size tunables are named by
role, not platform*, for the rule and the two-implementations-in-one-build caveat.

- **No `malloc`.** Pools are file-scope `static` arrays. Integrators on bare-metal /
FreeRTOS-static-allocation / DO-178C-style targets get the same code path as hosted targets.
- **Pool exhaustion** falls back to a shared null sibling — `SolidSyslogNullSender`,
Expand Down
Loading
Loading