Motr  M0
node.c File Reference
#include "lib/trace.h"
#include "conf/objs/common.h"
#include "conf/onwire_xc.h"
#include "lib/arith.h"
#include "motr/magic.h"
Include dependency graph for node.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF
 
#define XCAST(xobj)   ((struct m0_confx_node *)(&(xobj)->xo_u))
 

Functions

 M0_BASSERT (offsetof(struct m0_confx_node, xn_header)==0)
 
static bool node_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_node, M0_CONF_NODE_MAGIC, node_check)
 
 M0_CONF__INVARIANT_DEFINE (node_invariant, m0_conf_node)
 
static int node_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int node_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool node_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int node_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** node_downlinks (const struct m0_conf_obj *obj)
 
static void node_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (node_create, m0_conf_node, &node_ops)
 

Variables

static const struct m0_conf_obj_ops node_ops
 
const struct m0_conf_obj_type M0_CONF_NODE_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file node.c.

◆ XCAST

#define XCAST (   xobj)    ((struct m0_confx_node *)(&(xobj)->xo_u))

Definition at line 30 of file node.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_node, xn_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_node  ,
M0_CONF_NODE_MAGIC  ,
node_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( node_create  ,
m0_conf_node  ,
node_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( node_invariant  ,
m0_conf_node   
)

◆ node_check()

static bool node_check ( const void *  bob)
static

Definition at line 33 of file node.c.

Here is the call graph for this function:

◆ node_decode()

static int node_decode ( struct m0_conf_obj dest,
const struct m0_confx_obj src 
)
static

Definition at line 45 of file node.c.

Here is the call graph for this function:

◆ node_delete()

static void node_delete ( struct m0_conf_obj obj)
static

Definition at line 107 of file node.c.

Here is the call graph for this function:

◆ node_downlinks()

static const struct m0_fid** node_downlinks ( const struct m0_conf_obj obj)
static

Definition at line 99 of file node.c.

Here is the call graph for this function:

◆ node_encode()

static int node_encode ( struct m0_confx_obj dest,
const struct m0_conf_obj src 
)
static

Definition at line 60 of file node.c.

Here is the call graph for this function:

◆ node_lookup()

static int node_lookup ( const struct m0_conf_obj parent,
const struct m0_fid name,
struct m0_conf_obj **  out 
)
static

Definition at line 87 of file node.c.

Here is the call graph for this function:

◆ node_match()

static bool node_match ( const struct m0_conf_obj cached,
const struct m0_confx_obj flat 
)
static

Definition at line 75 of file node.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_NODE_TYPE

const struct m0_conf_obj_type M0_CONF_NODE_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__NODE_FT_ID,
.ft_name = "conf_node"
},
.cot_create = &node_create,
.cot_xt = &m0_confx_node_xc,
.cot_branch = "u_node",
.cot_xc_init = &m0_xc_m0_confx_node_struct_init,
.cot_magic = M0_CONF_NODE_MAGIC
}

Definition at line 128 of file node.c.

◆ node_ops

const struct m0_conf_obj_ops node_ops
static
Initial value:
= {
.coo_invariant = node_invariant,
.coo_decode = node_decode,
.coo_encode = node_encode,
.coo_match = node_match,
.coo_lookup = node_lookup,
.coo_readdir = NULL,
.coo_downlinks = node_downlinks,
.coo_delete = node_delete
}
static int node_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: node.c:87
#define NULL
Definition: misc.h:38
static int node_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: node.c:45
static bool node_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: node.c:75
static void node_delete(struct m0_conf_obj *obj)
Definition: node.c:107
static const struct m0_fid ** node_downlinks(const struct m0_conf_obj *obj)
Definition: node.c:99
static int node_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: node.c:60

Definition at line 115 of file node.c.