39 return lifecycle_status;
49 if ((storage == NULL) || (config == NULL) || (out_handle == NULL))
78 if ((handle == NULL) || (message == NULL) || (message_size == 0U))
90 return s_backend->
send(handle, message, message_size, timeout_ms);
98 if ((handle == NULL) || (out_message == NULL) || (buffer_size == 0U))
sapi_status_t sapi_lifecycle_check_setup_allowed(void)
Convenience check for a setup-only constructor: call this as one of the first checks in any function ...
sapi_status_t sapi_netlink_register_backend(const sapi_netlink_backend_t *backend)
Registers the backend implementation used by every sapi_netlink_* call (ADR-005 section 2....
sapi_status_t sapi_netlink_close(sapi_netlink_handle_t handle)
Closes a link.
sapi_status_t sapi_netlink_send(sapi_netlink_handle_t handle, const void *message, size_t message_size, sapi_duration_ms_t timeout_ms)
Sends one fixed-size message, blocking at most timeout_ms.
struct sapi_netlink_impl_s * sapi_netlink_handle_t
Opaque handle to an established link, returned by sapi_netlink_open().
sapi_status_t sapi_netlink_receive(sapi_netlink_handle_t handle, void *out_message, size_t buffer_size, sapi_duration_ms_t timeout_ms)
Receives one fixed-size message, blocking at most timeout_ms.
sapi_status_t sapi_netlink_open(sapi_netlink_storage_t *storage, const sapi_netlink_config_t *config, sapi_netlink_handle_t *out_handle)
Establishes a point-to-point link: binds+accepts (LISTEN) or dials (CONNECT), per config->role.
@ SAPI_NETLINK_ROLE_CONNECT
sapi_status_t
Common result/status codes.
@ SAPI_STATUS_NOT_SUPPORTED
@ SAPI_STATUS_INVALID_PARAM
@ SAPI_STATUS_NOT_INITIALIZED
uint32_t sapi_duration_ms_t
static const sapi_clocksync_backend_t * s_backend
Process-wide application setup-phase lock (ADR-026).
OS Abstraction Layer - Point-to-point network link service.
OS-backend adaptation surface for the Point-to-Point Network Link service (ADR-005,...
Backend vtable: an integrator's implementation of the network link service for a specific transport/t...
sapi_status_t(*) send(sapi_netlink_handle_t handle, const void *message, size_t message_size, sapi_duration_ms_t timeout_ms)
Backend implementation of sapi_netlink_send(). May be NULL.
sapi_status_t(*) open(sapi_netlink_storage_t *storage, const sapi_netlink_config_t *config, sapi_netlink_handle_t *out_handle)
Backend implementation of sapi_netlink_open(). May be NULL.
sapi_status_t(*) close(sapi_netlink_handle_t handle)
Backend implementation of sapi_netlink_close(). May be NULL.
sapi_status_t(*) receive(sapi_netlink_handle_t handle, void *out_message, size_t buffer_size, sapi_duration_ms_t timeout_ms)
Backend implementation of sapi_netlink_receive(). May be NULL.
Configuration for sapi_netlink_open().