Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
sapi_netlink.h
Go to the documentation of this file.
1
41#ifndef SAFEAPI_OS_NETLINK_H
42#define SAFEAPI_OS_NETLINK_H
43
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
52SAFEAPI_DECLARE_STORAGE(sapi_netlink_storage_t, 64U);
53
55typedef struct sapi_netlink_impl_s *sapi_netlink_handle_t;
56
66typedef enum sapi_netlink_role_e
67{
71
73typedef struct sapi_netlink_config_s
74{
80 const char *host;
82 uint16_t port;
89
105sapi_status_t sapi_netlink_open(sapi_netlink_storage_t *storage,
106 const sapi_netlink_config_t *config,
107 sapi_netlink_handle_t *out_handle);
108
125 const void *message,
126 size_t message_size,
127 sapi_duration_ms_t timeout_ms);
128
146 void *out_message,
147 size_t buffer_size,
148 sapi_duration_ms_t timeout_ms);
149
158
159/*
160 * The backend vtable (sapi_netlink_backend_t) and
161 * sapi_netlink_register_backend() live in
162 * safeapi_backend/netlink/sapi_netlink_backend.h, not here (ADR-021). This
163 * header is the consumer-facing surface only.
164 */
165
166#ifdef __cplusplus
167}
168#endif
169
170#endif /* SAFEAPI_OS_NETLINK_H */
171 /* NETLINK */
sapi_status_t
Common result/status codes.
Definition sapi_status.h:27
uint32_t sapi_duration_ms_t
Definition sapi_types.h:27
#define SAFEAPI_DECLARE_STORAGE(type_name, byte_size)
Declares an opaque, fixed-size, aligned storage type for a service's handle. The real internal layout...
Definition sapi_types.h:69
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
Common fixed-width types and the caller-owned-storage handle pattern used by every OAL service (see A...