Motr  M0
client.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/time.h>
#include <getopt.h>
#include <libgen.h>
#include "lib/string.h"
#include "conf/obj.h"
#include "fid/fid.h"
#include "lib/memory.h"
#include "lib/trace.h"
#include "motr/client.h"
#include "motr/idx.h"
#include "motr/st/utils/helper.h"
#include "motr/client_internal.h"
#include "lib/getopts.h"
Include dependency graph for client.c:

Go to the source code of this file.

Macros

#define GET_ARG(arg, cmd, saveptr)
 
#define GET_COMMON_ARG(arg, fname, saveptr, id, block_size, block_count, blocks_per_io)
 

Enumerations

enum  { CMD_SIZE = 128 }
 

Functions

static void help (void)
 
static void c0client_usage (FILE *file, char *prog_name)
 
int main (int argc, char **argv)
 

Variables

static struct m0_clientm0_instance = NULL
 
static struct m0_container container
 
static struct m0_config conf
 
static struct m0_idx_dix_config dix_conf
 
struct m0_addb_ctx m0_addb_ctx
 

Macro Definition Documentation

◆ GET_ARG

#define GET_ARG (   arg,
  cmd,
  saveptr 
)
Value:
arg = strtok_r(cmd, "\n ", saveptr); \
if (arg == NULL) { \
help(); \
continue; \
}
#define NULL
Definition: misc.h:38

Definition at line 66 of file client.c.

◆ GET_COMMON_ARG

#define GET_COMMON_ARG (   arg,
  fname,
  saveptr,
  id,
  block_size,
  block_count,
  blocks_per_io 
)
Value:
GET_ARG(arg, NULL, &saveptr); \
m0_obj_id_sscanf(arg, &id); \
GET_ARG(arg, NULL, &saveptr); \
fname = strdup(arg); \
GET_ARG(arg, NULL, &saveptr); \
block_size = atoi(arg); \
GET_ARG(arg, NULL, &saveptr); \
block_count = atoi(arg); \
GET_ARG(arg, NULL, &saveptr); \
blocks_per_io = atoi(arg);
#define NULL
Definition: misc.h:38
#define GET_ARG(arg, cmd, saveptr)
Definition: client.c:66

Definition at line 73 of file client.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CMD_SIZE 

Definition at line 42 of file client.c.

Function Documentation

◆ c0client_usage()

static void c0client_usage ( FILE *  file,
char *  prog_name 
)
static

Definition at line 86 of file client.c.

Here is the caller graph for this function:

◆ help()

static void help ( void  )
static

Definition at line 53 of file client.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 110 of file client.c.

Here is the call graph for this function:

Variable Documentation

◆ conf

struct m0_config conf
static

Definition at line 48 of file client.c.

◆ container

struct m0_container container
static

Definition at line 47 of file client.c.

◆ dix_conf

struct m0_idx_dix_config dix_conf
static

Definition at line 49 of file client.c.

◆ m0_addb_ctx

struct m0_addb_ctx m0_addb_ctx

◆ m0_instance

struct m0_client* m0_instance = NULL
static

Definition at line 46 of file client.c.