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

Go to the source code of this file.

Macros

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

Functions

 M0_BASSERT (offsetof(struct m0_confx_site, xi_header)==0)
 
static bool site_check (const void *bob)
 
 M0_CONF__BOB_DEFINE (m0_conf_site, M0_CONF_SITE_MAGIC, site_check)
 
 M0_CONF__INVARIANT_DEFINE (site_invariant, m0_conf_site)
 
static int site_decode (struct m0_conf_obj *dest, const struct m0_confx_obj *src)
 
static int site_encode (struct m0_confx_obj *dest, const struct m0_conf_obj *src)
 
static bool site_match (const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
 
static int site_lookup (const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
 
static const struct m0_fid ** site_downlinks (const struct m0_conf_obj *obj)
 
static void site_delete (struct m0_conf_obj *obj)
 
 M0_CONF__CTOR_DEFINE (site_create, m0_conf_site, &site_ops)
 

Variables

static const struct m0_conf_obj_ops site_ops
 
const struct m0_conf_obj_type M0_CONF_SITE_TYPE
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_CONF

Definition at line 22 of file site.c.

◆ XCAST

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

Definition at line 29 of file site.c.

Function Documentation

◆ M0_BASSERT()

M0_BASSERT ( offsetof(struct m0_confx_site, xi_header = =0)

◆ M0_CONF__BOB_DEFINE()

M0_CONF__BOB_DEFINE ( m0_conf_site  ,
M0_CONF_SITE_MAGIC  ,
site_check   
)

◆ M0_CONF__CTOR_DEFINE()

M0_CONF__CTOR_DEFINE ( site_create  ,
m0_conf_site  ,
site_ops 
)

◆ M0_CONF__INVARIANT_DEFINE()

M0_CONF__INVARIANT_DEFINE ( site_invariant  ,
m0_conf_site   
)

◆ site_check()

static bool site_check ( const void *  bob)
static

Definition at line 32 of file site.c.

Here is the call graph for this function:

◆ site_decode()

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

Definition at line 44 of file site.c.

Here is the call graph for this function:

◆ site_delete()

static void site_delete ( struct m0_conf_obj obj)
static

Definition at line 100 of file site.c.

Here is the call graph for this function:

◆ site_downlinks()

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

Definition at line 93 of file site.c.

Here is the call graph for this function:

◆ site_encode()

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

Definition at line 59 of file site.c.

Here is the call graph for this function:

◆ site_lookup()

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

Definition at line 82 of file site.c.

Here is the call graph for this function:

◆ site_match()

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

Definition at line 74 of file site.c.

Here is the call graph for this function:

Variable Documentation

◆ M0_CONF_SITE_TYPE

const struct m0_conf_obj_type M0_CONF_SITE_TYPE
Initial value:
= {
.cot_ftype = {
.ft_id = M0_CONF__SITE_FT_ID,
.ft_name = "conf_site"
},
.cot_create = &site_create,
.cot_xt = &m0_confx_site_xc,
.cot_branch = "u_site",
.cot_xc_init = &m0_xc_m0_confx_site_struct_init,
.cot_magic = M0_CONF_SITE_MAGIC
}

Definition at line 121 of file site.c.

◆ site_ops

const struct m0_conf_obj_ops site_ops
static
Initial value:
= {
.coo_invariant = site_invariant,
.coo_decode = site_decode,
.coo_encode = site_encode,
.coo_match = site_match,
.coo_lookup = site_lookup,
.coo_readdir = NULL,
.coo_downlinks = site_downlinks,
.coo_delete = site_delete
}
static int site_decode(struct m0_conf_obj *dest, const struct m0_confx_obj *src)
Definition: site.c:44
#define NULL
Definition: misc.h:38
static void site_delete(struct m0_conf_obj *obj)
Definition: site.c:100
static int site_encode(struct m0_confx_obj *dest, const struct m0_conf_obj *src)
Definition: site.c:59
static const struct m0_fid ** site_downlinks(const struct m0_conf_obj *obj)
Definition: site.c:93
static bool site_match(const struct m0_conf_obj *cached, const struct m0_confx_obj *flat)
Definition: site.c:74
static int site_lookup(const struct m0_conf_obj *parent, const struct m0_fid *name, struct m0_conf_obj **out)
Definition: site.c:82

Definition at line 108 of file site.c.