Motr  M0
commands.c File Reference
#include "lib/types.h"
#include "lib/misc.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/trace.h"
#include "net/test/serialize.h"
#include "net/test/str.h"
#include "net/test/commands.h"
#include "net/test/debug.h"
Include dependency graph for commands.c:

Go to the source code of this file.

Macros

#define NET_TEST_MODULE_NAME   commands
 

Functions

 TYPE_DESCR (m0_net_test_cmd)
 
 TYPE_DESCR (m0_net_test_cmd_done)
 
 TYPE_DESCR (m0_net_test_cmd_init)
 
 TYPE_DESCR (m0_net_test_msg_nr)
 
 TYPE_DESCR (m0_net_test_cmd_status_data)
 
static m0_bcount_t cmd_status_data_serialize (enum m0_net_test_serialize_op op, struct m0_net_test_cmd_status_data *sd, struct m0_bufvec *bv, m0_bcount_t offset)
 
static int cmd_serialize (enum m0_net_test_serialize_op op, struct m0_net_test_cmd *cmd, struct m0_net_buffer *buf, m0_bcount_t offset, m0_bcount_t *length)
 
static void cmd_free (struct m0_net_test_cmd *cmd)
 
static struct m0_net_test_cmd_ctxcmd_ctx_extract (struct m0_net_test_network_ctx *net_ctx)
 
static void commands_tm_event_cb (const struct m0_net_tm_event *ev)
 
static void commands_cb_msg_recv (struct m0_net_test_network_ctx *net_ctx, const uint32_t buf_index, enum m0_net_queue_type q, const struct m0_net_buffer_event *ev)
 
static void commands_cb_msg_send (struct m0_net_test_network_ctx *net_ctx, const uint32_t buf_index, enum m0_net_queue_type q, const struct m0_net_buffer_event *ev)
 
static void commands_cb_impossible (struct m0_net_test_network_ctx *ctx, const uint32_t buf_index, enum m0_net_queue_type q, const struct m0_net_buffer_event *ev)
 
static int commands_recv_enqueue (struct m0_net_test_cmd_ctx *ctx, size_t buf_index)
 
static void commands_recv_dequeue (struct m0_net_test_cmd_ctx *ctx, size_t buf_index)
 
static void commands_recv_ep_put (struct m0_net_test_cmd_ctx *ctx, size_t buf_index)
 
static bool is_buf_in_recv_q (struct m0_net_test_cmd_ctx *ctx, size_t buf_index)
 
static void commands_recv_dequeue_nr (struct m0_net_test_cmd_ctx *ctx, size_t nr)
 
static int commands_initfini (struct m0_net_test_cmd_ctx *ctx, const char *cmd_ep, m0_time_t send_timeout, m0_net_test_commands_send_cb_t send_cb, struct m0_net_test_slist *ep_list, bool init)
 
int m0_net_test_commands_init (struct m0_net_test_cmd_ctx *ctx, const char *cmd_ep, m0_time_t send_timeout, m0_net_test_commands_send_cb_t send_cb, struct m0_net_test_slist *ep_list)
 
void m0_net_test_commands_fini (struct m0_net_test_cmd_ctx *ctx)
 
int m0_net_test_commands_send (struct m0_net_test_cmd_ctx *ctx, struct m0_net_test_cmd *cmd)
 
void m0_net_test_commands_send_wait_all (struct m0_net_test_cmd_ctx *ctx)
 
int m0_net_test_commands_recv (struct m0_net_test_cmd_ctx *ctx, struct m0_net_test_cmd *cmd, m0_time_t deadline)
 
int m0_net_test_commands_recv_enqueue (struct m0_net_test_cmd_ctx *ctx, size_t buf_index)
 
void m0_net_test_commands_received_free (struct m0_net_test_cmd *cmd)
 
bool m0_net_test_commands_invariant (struct m0_net_test_cmd_ctx *ctx)
 

Variables

static const struct m0_net_tm_callbacks net_test_commands_tm_cb
 
static const struct m0_net_test_network_buffer_callbacks commands_buffer_cb
 

Macro Definition Documentation

◆ NET_TEST_MODULE_NAME

#define NET_TEST_MODULE_NAME   commands

Definition at line 34 of file commands.c.