![]() |
kinetic-c
v0.12.0
Seagate Kinetic Protocol Client Library for C
|
#include <unistd.h>#include <err.h>#include <assert.h>#include "syscall.h"#include "listener_cmd.h"#include "listener_cmd_internal.h"#include "listener_task.h"#include "listener_helper.h"Go to the source code of this file.
Functions | |
| static void | msg_handler (listener *l, listener_msg *pmsg) |
| static void | add_socket (listener *l, connection_info *ci, int notify_fd) |
| static void | remove_socket (listener *l, int fd, int notify_fd) |
| static void | hold_response (listener *l, int fd, int64_t seq_id, int16_t timeout_sec, int notify_fd) |
| static void | expect_response (listener *l, boxed_msg *box) |
| static void | shutdown (listener *l, int notify_fd) |
| void | ListenerCmd_NotifyCaller (listener *l, int fd) |
| Notify the listener's caller that a command has completed. More... | |
| void | ListenerCmd_CheckIncomingMessages (listener *l, int *res) |
| Process incoming commands, if any. More... | |
| static void | swap (listener *l, int a, int b) |
|
static |
Definition at line 112 of file listener_cmd.c.
References add_socket(), listener_msg::add_socket, listener::bus, BUS_ASSERT, BUS_LOG_SNPRINTF, listener_msg::expect, expect_response(), listener_msg::hold, hold_response(), listener::is_idle, ListenerTask_ReleaseMsg(), LOG_LISTENER, MSG_ADD_SOCKET, MSG_EXPECT_RESPONSE, MSG_HOLD_RESPONSE, MSG_NONE, MSG_REMOVE_SOCKET, MSG_SHUTDOWN, remove_socket(), listener_msg::remove_socket, shutdown(), listener_msg::shutdown, listener_msg::type, listener_msg::u, and bus::udata.
|
static |
Definition at line 161 of file listener_cmd.c.
References listener::bus, BUS_ASSERT, BUS_LOG, connection_info::fd, listener::fd_info, listener::fds, bus_sink_cb_res_t::full_msg_buffer, listener::inactive_fds, INCOMING_MSG_PIPE, ListenerCmd_NotifyCaller(), ListenerTask_GrowReadBuf(), LOG_LISTENER, MAX_FDS, bus_sink_cb_res_t::next_read, listener::read_buf, bus::sink_cb, swap(), connection_info::to_read_size, listener::tracked_fds, bus::udata, and connection_info::udata.
|
static |
Definition at line 218 of file listener_cmd.c.
References listener::bus, BUS_LOG_SNPRINTF, listener::fds, listener::inactive_fds, INCOMING_MSG_PIPE, ListenerCmd_NotifyCaller(), LOG_LISTENER, swap(), listener::tracked_fds, and bus::udata.
|
static |
Definition at line 258 of file listener_cmd.c.
References listener::bus, BUS_ASSERT, BUS_LOG_SNPRINTF, rx_info_t::hold, rx_info_t::id, ListenerCmd_NotifyCaller(), ListenerHelper_GetFreeRXInfo(), LOG_LISTENER, RIS_HOLD, RIS_INACTIVE, rx_info_t::state, rx_info_t::timeout_sec, rx_info_t::u, and bus::udata.
Definition at line 288 of file listener_cmd.c.
References listener::bus, BUS_ASSERT, BUS_LOG_SNPRINTF, BUS_SEND_RX_FAILURE, BUS_SEND_UNDEFINED, rx_info_t::expect, boxed_msg::fd, rx_info_t::hold, rx_info_t::id, ListenerHelper_FindInfoBySequenceID(), ListenerTask_AttemptDelivery(), ListenerTask_NotifyMessageFailure(), LOG_LISTENER, boxed_msg::out_seq_id, boxed_msg::result, RIS_EXPECT, RIS_HOLD, RX_ERROR_NONE, RX_ERROR_READY_FOR_DELIVERY, rx_info_t::state, bus_msg_result_t::status, boxed_msg::timeout_sec, rx_info_t::timeout_sec, rx_info_t::u, and bus::udata.
|
static |
Definition at line 349 of file listener_cmd.c.
References listener::shutdown_notify_fd.
| void ListenerCmd_NotifyCaller | ( | listener * | l, |
| int | fd | ||
| ) |
Notify the listener's caller that a command has completed.
Definition at line 42 of file listener_cmd.c.
References listener::bus, BUS_LOG_SNPRINTF, LISTENER_MSG_TAG, ListenerTask_GetBackpressure(), LOG_LISTENER, syscall_write(), and bus::udata.
| void ListenerCmd_CheckIncomingMessages | ( | listener * | l, |
| int * | res | ||
| ) |
Process incoming commands, if any.
Definition at line 73 of file listener_cmd.c.
References listener::bus, BUS_LOG_SNPRINTF, listener::fds, INCOMING_MSG_PIPE_ID, LISTENER_CMD_BUF_SIZE, LOG_LISTENER, msg_handler(), listener::msgs, syscall_read(), and bus::udata.
|
static |
Definition at line 148 of file listener_cmd.c.
References listener::fd_info, listener::fds, and INCOMING_MSG_PIPE.
1.8.8