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_osadapter_socket.h File Reference

OS Abstraction Layer - Raw OS Socket Interface for OSAdapters. More...

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "rte/utils/status/rte_status.h"
#include "rte/utils/types/rte_types.h"
Include dependency graph for rte_osadapter_socket.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rte_os_socket_ops_t
 Vtable of low-level OS socket operations implemented by an OSAdapter. More...

Macros

#define RTE_OS_SOCKET_INVALID_HANDLE   ((intptr_t)(-1))
 Invalid socket handle sentinel.

Typedefs

typedef intptr_t rte_os_socket_handle_t
 Socket handle representation (pointer or file descriptor).

Enumerations

enum  rte_os_socket_type_t { RTE_OS_SOCKET_TYPE_UDP = 1 , RTE_OS_SOCKET_TYPE_TCP = 2 }
 Socket transport type. More...
enum  rte_os_socket_event_t { RTE_OS_SOCKET_EVENT_READ = 1U , RTE_OS_SOCKET_EVENT_WRITE = 2U , RTE_OS_SOCKET_EVENT_ERROR = 4U }
 Polling events bitmask. More...

Functions

rte_status_t rte_osadapter_register_socket_ops (const rte_os_socket_ops_t *ops)
 Registers the active OSAdapter's raw socket operations.
const rte_os_socket_ops_t * rte_osadapter_get_socket_ops (void)
 Retrieves the active OSAdapter's raw socket operations.

Detailed Description

OS Abstraction Layer - Raw OS Socket Interface for OSAdapters.

Exposes low-level OS socket operations (UDP/TCP creation, bind, connect, send, recv, poll, non-blocking configuration, close). OSAdapters (e.g. POSIX, QNX, FreeRTOS) provide these primitives, and ProtocolAdapters (e.g. UDP, TCP) consume them without calling platform-specific APIs directly.

Compliant with CENELEC EN 50128 SIL 4 and MISRA C:2012. No dynamic memory allocation. All functions are non-throwing and return rte_status_t.

Definition in file rte_osadapter_socket.h.