kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Functions
listener_cmd.c File Reference
#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)
 

Function Documentation

static void msg_handler ( listener l,
listener_msg pmsg 
)
static
static void add_socket ( listener l,
connection_info ci,
int  notify_fd 
)
static
static void remove_socket ( listener l,
int  fd,
int  notify_fd 
)
static
static void hold_response ( listener l,
int  fd,
int64_t  seq_id,
int16_t  timeout_sec,
int  notify_fd 
)
static
static void expect_response ( listener l,
boxed_msg box 
)
static
static void shutdown ( listener l,
int  notify_fd 
)
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 
)
static void swap ( listener l,
int  a,
int  b 
)
static

Definition at line 148 of file listener_cmd.c.

References listener::fd_info, listener::fds, and INCOMING_MSG_PIPE.