kinetic-c  v0.12.0
Seagate Kinetic Protocol Client Library for C
Data Structures | Macros | Typedefs | Enumerations
listener_internal_types.h File Reference
#include "bus_types.h"
#include "bus_internal_types.h"
#include <poll.h>

Go to the source code of this file.

Data Structures

struct  listener_msg
 A queue message, with a command in the tagged union. More...
 
struct  rx_info_t
 Record in table for partially processed messages. More...
 
struct  listener
 Receiver of responses. More...
 

Macros

#define DEFAULT_READ_BUF_SIZE   (1024L * 1024L)
 Default size for the read buffer, which will grow on demand. More...
 
#define INCOMING_MSG_PIPE_ID   0
 ID of the struct pollfd for the listener's incoming command pipe. More...
 
#define INCOMING_MSG_PIPE   1
 Offset to account for the first file descriptor being the incoming message pipe. More...
 
#define LISTENER_TASK_TIMEOUT_DELAY   100
 How long the listener should wait for responses before becoming idle and blocking. More...
 
#define MAX_FDS   1000
 Max number of sockets to monitor. More...
 
#define MAX_PENDING_MESSAGES   (1024)
 
#define MAX_QUEUE_MESSAGES   (32)
 Max number of unprocessed queue messages. More...
 
#define INFINITE_DELAY   (-1)
 Special value meaning poll should block indefinitely. More...
 
#define LISTENER_NO_FD   (-1)
 Sentinel values used for listener.shutdown_notify_fd. More...
 
#define LISTENER_SHUTDOWN_COMPLETE_FD   (-2)
 

Typedefs

typedef uint32_t msg_flag_t
 

Enumerations

enum  MSG_TYPE
 
enum  rx_info_state
 

Macro Definition Documentation

#define DEFAULT_READ_BUF_SIZE   (1024L * 1024L)

Default size for the read buffer, which will grow on demand.

Definition at line 29 of file listener_internal_types.h.

#define INCOMING_MSG_PIPE_ID   0

ID of the struct pollfd for the listener's incoming command pipe.

This is in the same pollfd array as the sockets being watched so that an incoming command will wake it from its blocking poll.

Definition at line 35 of file listener_internal_types.h.

#define INCOMING_MSG_PIPE   1

Offset to account for the first file descriptor being the incoming message pipe.

Definition at line 39 of file listener_internal_types.h.

#define LISTENER_TASK_TIMEOUT_DELAY   100

How long the listener should wait for responses before becoming idle and blocking.

Definition at line 83 of file listener_internal_types.h.

#define MAX_FDS   1000

Max number of sockets to monitor.

If listening to more sockets than this, use multiple listener threads.

Definition at line 118 of file listener_internal_types.h.

#define MAX_PENDING_MESSAGES   (1024)

Definition at line 122 of file listener_internal_types.h.

#define MAX_QUEUE_MESSAGES   (32)

Max number of unprocessed queue messages.

Definition at line 125 of file listener_internal_types.h.

#define INFINITE_DELAY   (-1)

Special value meaning poll should block indefinitely.

Definition at line 129 of file listener_internal_types.h.

#define LISTENER_NO_FD   (-1)

Sentinel values used for listener.shutdown_notify_fd.

Definition at line 132 of file listener_internal_types.h.

#define LISTENER_SHUTDOWN_COMPLETE_FD   (-2)

Definition at line 133 of file listener_internal_types.h.

Typedef Documentation

typedef uint32_t msg_flag_t

Definition at line 126 of file listener_internal_types.h.

Enumeration Type Documentation

enum MSG_TYPE
Enumerator
MSG_NONE 
MSG_ADD_SOCKET 
MSG_REMOVE_SOCKET 
MSG_HOLD_RESPONSE 
MSG_EXPECT_RESPONSE 
MSG_SHUTDOWN 

Definition at line 41 of file listener_internal_types.h.

Enumerator
RIS_HOLD 
RIS_EXPECT 
RIS_INACTIVE 

Definition at line 85 of file listener_internal_types.h.