Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
rte_netlink.c File Reference

Network link service: validates parameters, then dispatches to the OSAdapter registered via rte_osadapter_netlink_register() (ADR-005). See rte_ipc.c for the pattern this follows. More...

Include dependency graph for rte_netlink.c:

Go to the source code of this file.

Functions

rte_status_t rte_osadapter_netlink_register (const rte_osadapter_netlink_t *osadapter)
 Registers the OSAdapter network link implementation.
rte_status_t rte_netlink_open (rte_netlink_storage_t *storage, const rte_netlink_config_t *config, rte_netlink_handle_t *out_handle)
 Establishes a point-to-point link: binds+accepts (LISTEN) or dials (CONNECT), per config->role.
rte_status_t rte_netlink_send (rte_netlink_handle_t handle, const void *message, size_t message_size, rte_duration_ms_t timeout_ms)
 Sends one fixed-size message, blocking at most timeout_ms.
rte_status_t rte_netlink_receive (rte_netlink_handle_t handle, void *out_message, size_t buffer_size, rte_duration_ms_t timeout_ms)
 Receives one fixed-size message, blocking at most timeout_ms.
rte_status_t rte_netlink_close (rte_netlink_handle_t handle)
 Closes a link.

Variables

static const rte_osadapter_netlink_t * s_osadapter = NULL
 Currently registered OSAdapter, or NULL if none (ADR-005).

Detailed Description

Network link service: validates parameters, then dispatches to the OSAdapter registered via rte_osadapter_netlink_register() (ADR-005). See rte_ipc.c for the pattern this follows.

Definition in file rte_netlink.c.

Function Documentation

◆ rte_osadapter_netlink_register()

rte_status_t rte_osadapter_netlink_register ( const rte_osadapter_netlink_t * adapter)

Registers the OSAdapter network link implementation.

Global variables declarations Local function declarations Global functions

Parameters
adapterPointer to netlink operations vtable.
Returns
RTE_STATUS_OK on success, RTE_STATUS_INVALID_PARAM if adapter is NULL, or RTE_STATUS_INVALID_STATE if the setup phase is already locked (REQ-LIFECYCLE-001, ADR-026; the previous registration, if any, is kept).

Definition at line 26 of file rte_netlink.c.

Variable Documentation

◆ s_osadapter

const rte_osadapter_netlink_t* s_osadapter = NULL
static

Currently registered OSAdapter, or NULL if none (ADR-005).

Local makros Local types declarations Local variables declarations

Definition at line 18 of file rte_netlink.c.