Motr  M0
conn.c File Reference
#include "ut/ut.h"
#include "lib/mutex.h"
#include "lib/finject.h"
#include "fop/fop.h"
#include "motr/magic.h"
#include "rpc/rpc_internal.h"
Include dependency graph for conn.c:

Go to the source code of this file.

Enumerations

enum  { SENDER_ID = 1001 }
 

Functions

 M0_TL_DESCR_DEFINE (rpc_conn_ut, "rpc-conn", static, struct m0_rpc_conn, c_link, c_magic, M0_RPC_CONN_MAGIC, M0_RPC_CONN_HEAD_MAGIC)
 
 M0_TL_DEFINE (rpc_conn_ut, static, struct m0_rpc_conn)
 
static int conn_ut_init (void)
 
static int conn_ut_fini (void)
 
static void conn_init (void)
 
static void fop_set_session (struct m0_fop *fop)
 
static void conn_init_fini_test (void)
 
static void conn_init_and_establish (void)
 
static void conn_establish_reply (void)
 
static void conn_terminate (void)
 
static void conn_terminate_reply_and_fini (void)
 
static void conn_check (void)
 
static void conn_init_fail_test (void)
 
static void conn_establish_fail_test (void)
 
static void conn_establish_reply_fail_test (void)
 
static void conn_terminate_fail_test (void)
 
static void conn_terminate_reply_fail_test (void)
 

Variables

static struct m0_rpc_machine machine
 
static struct m0_rpc_conn conn
 
static struct m0_fop est_fop
 
static struct m0_fop term_fop
 
static struct m0_fop est_fop_rep
 
static struct m0_fop term_fop_rep
 
static struct m0_rpc_fop_conn_establish_rep est_reply
 
static struct m0_rpc_fop_conn_terminate_rep term_reply
 
static struct m0_net_end_point ep
 
struct m0_ut_suite conn_ut
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SENDER_ID 

Definition at line 30 of file conn.c.

Function Documentation

◆ conn_check()

static void conn_check ( void  )
static

Definition at line 184 of file conn.c.

Here is the call graph for this function:

◆ conn_establish_fail_test()

static void conn_establish_fail_test ( void  )
static

Definition at line 206 of file conn.c.

Here is the call graph for this function:

◆ conn_establish_reply()

static void conn_establish_reply ( void  )
static

Definition at line 144 of file conn.c.

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

◆ conn_establish_reply_fail_test()

static void conn_establish_reply_fail_test ( void  )
static

Definition at line 230 of file conn.c.

Here is the call graph for this function:

◆ conn_init()

static void conn_init ( void  )
static

Definition at line 86 of file conn.c.

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

◆ conn_init_and_establish()

static void conn_init_and_establish ( void  )
static

Definition at line 124 of file conn.c.

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

◆ conn_init_fail_test()

static void conn_init_fail_test ( void  )
static

Definition at line 192 of file conn.c.

Here is the call graph for this function:

◆ conn_init_fini_test()

static void conn_init_fini_test ( void  )
static

Definition at line 100 of file conn.c.

Here is the call graph for this function:

◆ conn_terminate()

static void conn_terminate ( void  )
static

Definition at line 153 of file conn.c.

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

◆ conn_terminate_fail_test()

static void conn_terminate_fail_test ( void  )
static

Definition at line 260 of file conn.c.

Here is the call graph for this function:

◆ conn_terminate_reply_and_fini()

static void conn_terminate_reply_and_fini ( void  )
static

Definition at line 171 of file conn.c.

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

◆ conn_terminate_reply_fail_test()

static void conn_terminate_reply_fail_test ( void  )
static

Definition at line 286 of file conn.c.

Here is the call graph for this function:

◆ conn_ut_fini()

static int conn_ut_fini ( void  )
static

Definition at line 69 of file conn.c.

Here is the call graph for this function:

◆ conn_ut_init()

static int conn_ut_init ( void  )
static

Definition at line 50 of file conn.c.

Here is the call graph for this function:

◆ fop_set_session()

static void fop_set_session ( struct m0_fop fop)
static

Definition at line 95 of file conn.c.

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

◆ M0_TL_DEFINE()

M0_TL_DEFINE ( rpc_conn_ut  ,
static  ,
struct m0_rpc_conn   
)

◆ M0_TL_DESCR_DEFINE()

M0_TL_DESCR_DEFINE ( rpc_conn_ut  ,
"rpc-conn ,
static  ,
struct m0_rpc_conn  ,
c_link  ,
c_magic  ,
M0_RPC_CONN_MAGIC  ,
M0_RPC_CONN_HEAD_MAGIC   
)

Variable Documentation

◆ conn

struct m0_rpc_conn conn
static

Definition at line 35 of file conn.c.

◆ conn_ut

struct m0_ut_suite conn_ut
Initial value:
= {
.ts_name = "rpc-connection-ut",
.ts_init = conn_ut_init,
.ts_fini = conn_ut_fini,
.ts_tests = {
{ "conn-init-fini", conn_init_fini_test },
{ "conn-check", conn_check },
{ "conn-init-fail", conn_init_fail_test },
{ "conn-establish-fail", conn_establish_fail_test },
{ "conn-terminate-fail", conn_terminate_fail_test },
{ "conn-establish-reply-fail", conn_establish_reply_fail_test},
{ "conn-terminate_reply-fail", conn_terminate_reply_fail_test},
{ NULL, NULL}
}
}
static void conn_init_fail_test(void)
Definition: conn.c:192
static int conn_ut_init(void)
Definition: conn.c:50
#define NULL
Definition: misc.h:38
static void conn_terminate_reply_fail_test(void)
Definition: conn.c:286
static void conn_check(void)
Definition: conn.c:184
static int conn_ut_fini(void)
Definition: conn.c:69
static void conn_establish_reply_fail_test(void)
Definition: conn.c:230
static void conn_establish_fail_test(void)
Definition: conn.c:206
static void conn_init_fini_test(void)
Definition: conn.c:100
static void conn_terminate_fail_test(void)
Definition: conn.c:260

Definition at line 318 of file conn.c.

◆ ep

struct m0_net_end_point ep
static

Definition at line 44 of file conn.c.

◆ est_fop

struct m0_fop est_fop
static

Definition at line 36 of file conn.c.

◆ est_fop_rep

struct m0_fop est_fop_rep
static

Definition at line 38 of file conn.c.

◆ est_reply

struct m0_rpc_fop_conn_establish_rep est_reply
static

Definition at line 41 of file conn.c.

◆ machine

struct m0_rpc_machine machine
static

Definition at line 34 of file conn.c.

◆ term_fop

struct m0_fop term_fop
static

Definition at line 37 of file conn.c.

◆ term_fop_rep

struct m0_fop term_fop_rep
static

Definition at line 39 of file conn.c.

◆ term_reply

struct m0_rpc_fop_conn_terminate_rep term_reply
static

Definition at line 42 of file conn.c.