|
RTE OSAdapter POSIX 0.1.0 build 41b3eb3
POSIX/Linux OAL OSAdapter for Platform_RTE
|
POSIX named-channel adapter. More...
#include "rte/posix_osadapter/rte_posix_osadapter_channel_service.h"#include <arpa/inet.h>#include <errno.h>#include <fcntl.h>#include <netdb.h>#include <netinet/in.h>#include <poll.h>#include <stdio.h>#include <time.h>#include <sys/socket.h>#include <sys/types.h>#include <unistd.h>#include "rte/oal/memory/rte_mem_util.h"#include "rte_posix_osadapter_poll.h"#include "rte_posix_osadapter_sockbuf.h"Go to the source code of this file.
Data Structures | |
| struct | rte_posix_channel_state_t |
Macros | |
| #define | _POSIX_C_SOURCE 200809L |
| #define | RTE_POSIX_CHANNEL_REHELLO_MS 2000U |
Typedefs | |
| typedef char | rte_posix_channel_state_fits_[(sizeof(rte_posix_channel_state_t)<=sizeof(rte_channel_service_storage_t)) ? 1 :-1] |
Functions | |
| static uint64_t | channel_now_ms (void) |
| static rte_posix_channel_state_t * | channel_state (rte_channel_service_storage_t *storage) |
| static rte_status_t | set_nonblocking (int fd) |
| static rte_status_t | init_listen_socket (rte_posix_channel_state_t *state) |
| static rte_status_t | init_connect_socket (rte_posix_channel_state_t *state) |
| static rte_status_t | osadapter_setup (rte_channel_service_storage_t *storage, const char *channel_name) |
| static rte_status_t | do_read (rte_channel_service_storage_t *storage, void *data, size_t data_size, rte_duration_ms_t timeout_ms, size_t *out_actual_size) |
| static rte_status_t | osadapter_read (rte_channel_service_storage_t *storage, void *data, size_t data_size, rte_duration_ms_t timeout_ms) |
| static rte_status_t | osadapter_read_ex (rte_channel_service_storage_t *storage, void *data, size_t data_size, rte_duration_ms_t timeout_ms, size_t *out_actual_size) |
| static rte_status_t | backend_send (rte_channel_service_storage_t *storage, const void *data, size_t data_size, rte_duration_ms_t timeout_ms) |
| static rte_status_t | osadapter_close (rte_channel_service_storage_t *storage) |
| rte_status_t | rte_posix_osadapter_channel_service_register_resolver (rte_posix_channel_resolve_fn resolver, void *context) |
| Registers the channel-name resolver and the POSIX channel service OSAdapter (ADR-005 seam). | |
| const rte_osadapter_channel_service_t * | rte_posix_osadapter_channel_service (void) |
| The POSIX channel service OSAdapter vtable (UDP; setup binds or dials and returns, the peer handshake is deferred to the first read). A setup returns RTE_STATUS_INTERNAL_ERROR when a configured socket buffer size is refused (REQ-OAL-NETLINK-015); a later read/send that has to re-init the socket maps any failure to RTE_STATUS_TIMEOUT. A listen-role link learns its peer from the first datagram it reads; a send before that sends nothing and returns RTE_STATUS_NOT_CONNECTED (Platform_RTE REQ-CHANSVC-001). | |
Variables | |
| static rte_posix_channel_resolve_fn | s_resolver |
| static void * | s_resolver_context |
| static const rte_osadapter_channel_service_t | s_osadapter |
POSIX named-channel adapter.
Definition in file rte_posix_osadapter_channel_service.c.
| #define _POSIX_C_SOURCE 200809L |
Definition at line 1 of file rte_posix_osadapter_channel_service.c.
| #define RTE_POSIX_CHANNEL_REHELLO_MS 2000U |
Definition at line 42 of file rte_posix_osadapter_channel_service.c.
| typedef char rte_posix_channel_state_fits_[(sizeof(rte_posix_channel_state_t)<= sizeof(rte_channel_service_storage_t)) ? 1 :-1] |
Definition at line 35 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 402 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 44 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 55 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 238 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 138 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 74 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 485 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 386 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 392 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 208 of file rte_posix_osadapter_channel_service.c.
| const rte_osadapter_channel_service_t * rte_posix_osadapter_channel_service | ( | void | ) |
The POSIX channel service OSAdapter vtable (UDP; setup binds or dials and returns, the peer handshake is deferred to the first read). A setup returns RTE_STATUS_INTERNAL_ERROR when a configured socket buffer size is refused (REQ-OAL-NETLINK-015); a later read/send that has to re-init the socket maps any failure to RTE_STATUS_TIMEOUT. A listen-role link learns its peer from the first datagram it reads; a send before that sends nothing and returns RTE_STATUS_NOT_CONNECTED (Platform_RTE REQ-CHANSVC-001).
Definition at line 527 of file rte_posix_osadapter_channel_service.c.
| rte_status_t rte_posix_osadapter_channel_service_register_resolver | ( | rte_posix_channel_resolve_fn | resolver, |
| void * | context ) |
Registers the channel-name resolver and the POSIX channel service OSAdapter (ADR-005 seam).
| resolver | Resolver called by every setup. Must not be NULL. |
| context | Passed to resolver unchanged. |
Definition at line 516 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 60 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 508 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 52 of file rte_posix_osadapter_channel_service.c.
|
static |
Definition at line 53 of file rte_posix_osadapter_channel_service.c.